* @see org.apache.uima.resource.service.ResourceServiceStub#callGetMetaData()
*/
public ResourceMetaData callGetMetaData() throws ResourceServiceException {
try {
// create Vinci Frame
VinciFrame queryFrame = new VinciFrame();
// Add Vinci Command, so that the receiving service knows what to do
queryFrame.fadd("vinci:COMMAND", "GetMeta");
// Send the request to the service and wait for response
if (debug) {
System.out.println("Calling GetMeta");
}
VinciFrame resultFrame = mVinciClient.rpc(queryFrame, mGetMetaDataTimeout);
if (debug) {
System.out.println("Success");
}
// Extract the data from Vinci Response frame
// System.out.println(resultFrame.toXML()); //DEBUG
// Remove things from the result frame that are not the MetaData objects we expect.
// In the future other things may go in here.
int i = 0;
while (i < resultFrame.getKeyValuePairCount()) {
String key = resultFrame.getKeyValuePair(i).getKey();
if (key.length() < 8 || !key.substring(key.length() - 8).equalsIgnoreCase("metadata")) {
resultFrame.fdrop(key);
} else {
i++;
}
}