Start a Conversation

Unsolved

This post is more than 5 years old

875

November 16th, 2016 07:00

Retrieve a file using its clip-id but with different Tag Name

Hi,

I have been trying centera Java SDK to test a scenario where by application A stores a file. Application B tries to retrieve the file based on the clip-id of the file. Both A and B uses the same .pea file .

I have been trying the sample applications shared along with Centera SDK.

I have been experiencing issues while trying to retrieve the file from Application B in case if I pass a different tag name to retrieve content function. There reason for passing a different tag name is because, in my solution Application A stores the file and its application B that retrieves the file while Application B doesnt have a knowledge around the CDF metadata of the file.

Question :

1. Is it possible to retrieve a file just with clip-id and without knowledge around CDF data.

2. Is there a way to know the CDF information before an attempt to retrieve file.

I tried to print TAG name of the file that was stored by Application A.

Code

FPClip theClip =

  new FPClip(thePool, clipID, FPLibraryConstants.FP_OPEN_FLAT);

  System.out.println("Ok.");

  FPTag topTag = theClip.getTopTag();

  System.out.println( " TAG :: " + topTag.getTagName());

  // check clip metadata to see if this is 'our' data format

  if (!topTag.getTagName().equals(TAG_NAME)) {

  throw new IllegalArgumentException("This clip was not written by the 'Store Content' sample.");

  }

  // Get filename from tag attributes

  String origFilename = topTag.getStringAttribute("filename");

I see an error :

Centera SDK Error: The use of this operation is restricted (transid='srikrishna/7/READ_CLIP’) (-10204)

Please can you help me correct understanding and solve the issue.

Thank you.

January 5th, 2017 22:00

Hi openrayit

You can walk the tags and test if a tag has a blob associated with it. If yes read the blob into a file.

Holger

No Events found!

Top