git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Registry@4481 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
992a0352cb
commit
522c3e5e0a
|
@ -15,6 +15,7 @@ import org.apache.axis.components.uuid.UUIDGen;
|
||||||
import org.apache.axis.components.uuid.UUIDGenFactory;
|
import org.apache.axis.components.uuid.UUIDGenFactory;
|
||||||
import org.gcube.common.core.contexts.GHNContext;
|
import org.gcube.common.core.contexts.GHNContext;
|
||||||
import org.gcube.common.core.faults.GCUBEFault;
|
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.GCUBEHostingNode;
|
||||||
import org.gcube.common.core.resources.GCUBEResource;
|
import org.gcube.common.core.resources.GCUBEResource;
|
||||||
import org.gcube.common.core.resources.impl.kxml.GCUBEResourceImpl;
|
import org.gcube.common.core.resources.impl.kxml.GCUBEResourceImpl;
|
||||||
|
@ -134,6 +135,10 @@ public class RegistryFactory{
|
||||||
try {
|
try {
|
||||||
resource = ResourceType.valueOf(mess.getType()).getResourceClass();
|
resource = ResourceType.valueOf(mess.getType()).getResourceClass();
|
||||||
resource.load(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(profile.getBytes("UTF-8")), "UTF-8")));
|
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
|
//the parse Profile class allows to extract from profiles information about type/SCOPE/UniqueID
|
||||||
//in order to distinguish among different Resource Type
|
//in order to distinguish among different Resource Type
|
||||||
//Adding scopes to Profile
|
//Adding scopes to Profile
|
||||||
|
@ -147,6 +152,7 @@ public class RegistryFactory{
|
||||||
}
|
}
|
||||||
//check ID
|
//check ID
|
||||||
if (resource.getID()== null || resource.getID().compareTo("")==0) {resource.setID(uuidgen.nextUUID()); }
|
if (resource.getID()== null || resource.getID().compareTo("")==0) {resource.setID(uuidgen.nextUUID()); }
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
logger.error("Error trying to load profile", ex);
|
logger.error("Error trying to load profile", ex);
|
||||||
|
|
Loading…
Reference in New Issue