diff --git a/src/org/gcube/informationsystem/registry/impl/RegistryFactory.java b/src/org/gcube/informationsystem/registry/impl/RegistryFactory.java index 6b8eab7..a448aa4 100644 --- a/src/org/gcube/informationsystem/registry/impl/RegistryFactory.java +++ b/src/org/gcube/informationsystem/registry/impl/RegistryFactory.java @@ -15,6 +15,7 @@ import org.apache.axis.components.uuid.UUIDGen; import org.apache.axis.components.uuid.UUIDGenFactory; import org.gcube.common.core.contexts.GHNContext; import org.gcube.common.core.faults.GCUBEFault; +import org.gcube.common.core.resources.GCUBEGenericResource; import org.gcube.common.core.resources.GCUBEHostingNode; import org.gcube.common.core.resources.GCUBEResource; import org.gcube.common.core.resources.impl.kxml.GCUBEResourceImpl; @@ -134,6 +135,10 @@ public class RegistryFactory{ try { resource = ResourceType.valueOf(mess.getType()).getResourceClass(); resource.load(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(profile.getBytes("UTF-8")), "UTF-8"))); + + if (mess.getType().compareTo("GenericResource")==0){ + System.out.println(((GCUBEGenericResource) resource).getBody()); + } //the parse Profile class allows to extract from profiles information about type/SCOPE/UniqueID //in order to distinguish among different Resource Type //Adding scopes to Profile @@ -147,6 +152,7 @@ public class RegistryFactory{ } //check ID if (resource.getID()== null || resource.getID().compareTo("")==0) {resource.setID(uuidgen.nextUUID()); } + } catch (Exception ex) { logger.error("Error trying to load profile", ex);