示例#1
0
 protected gov.nih.nci.cagrid.metadata.ServiceMetadata getServiceMetadataMD() {
   BaseResource serviceBaseResource;
   try {
     serviceBaseResource = (BaseResource) ResourceContext.getResourceContext().getResource();
   } catch (ResourceContextException e) {
     return null;
   } catch (ResourceException e) {
     return null;
   }
   return serviceBaseResource.getServiceMetadataMD();
 }
示例#2
0
 protected Object getMetadata(QName metadataQName) {
   BaseResource serviceBaseResource = null;
   try {
     serviceBaseResource = (BaseResource) ResourceContext.getResourceContext().getResource();
   } catch (ResourceContextException e) {
     return null;
   } catch (ResourceException e) {
     return null;
   }
   ResourcePropertySet resourcePropertySet = serviceBaseResource.getResourcePropertySet();
   if (resourcePropertySet != null) {
     ResourceProperty property = resourcePropertySet.get(metadataQName);
     if (property != null) {
       return property.get(0);
     }
   }
   return null;
 }