This commit is contained in:
Lucio Lelii 2008-10-09 22:02:20 +00:00
parent 1c4eafb06a
commit 992a0352cb
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,8 @@
package org.gcube.informationsystem.registry.impl;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.io.StringWriter;
import java.lang.reflect.Method;
@ -126,9 +129,11 @@ public class RegistryFactory{
logger.debug(msg);
throw new RemoteException(msg);
}
System.out.println("profile:" +profile);
try {
resource = ResourceType.valueOf(mess.getType()).getResourceClass();
resource.load(new StringReader(profile));
resource.load(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(profile.getBytes("UTF-8")), "UTF-8")));
//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