Ejemplo n.º 1
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;
 }
 public void setServiceMetadata(gov.nih.nci.cagrid.metadata.ServiceMetadata serviceMetadata)
     throws ResourceException {
   ResourceProperty prop = getResourcePropertySet().get(HelperServiceConstants.SERVICEMETADATA);
   prop.set(0, serviceMetadata);
 }