git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vre-management/VREModeler@7779 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8c9328e299
commit
55c38d9cb6
|
@ -289,8 +289,8 @@ public class IStoDBUtil {
|
|||
}
|
||||
|
||||
|
||||
|
||||
//insert the values in the database
|
||||
System.out.println(derivateMetadataFormatList.size());
|
||||
//insert values in the database
|
||||
DBInterface.connect();
|
||||
DBInterface.InsertInto("mdcollection", values);
|
||||
DBInterface.insertIntoListable("mdformat", metadataFormatList );
|
||||
|
@ -315,16 +315,15 @@ public class IStoDBUtil {
|
|||
FindPossibleTransformationPrograms fptp= new FindPossibleTransformationPrograms();
|
||||
MetadataBrokerFormat mbInFormat= new MetadataBrokerFormat();
|
||||
mbInFormat.setType("collection");
|
||||
mbInFormat.setLanguage(getParameter().getLanguage());
|
||||
mbInFormat.setSchema(getParameter().getName()+"="+getParameter().getSchemaURI().toString());
|
||||
String lng=getParameter().getLanguage();
|
||||
mbInFormat.setLanguage(lng);
|
||||
String schema=getParameter().getName()+"="+getParameter().getSchemaURI().toString();
|
||||
mbInFormat.setSchema(schema);
|
||||
fptp.setInputFormat(mbInFormat);
|
||||
|
||||
MetadataBrokerFormat mbOutFormat= new MetadataBrokerFormat();
|
||||
mbOutFormat.setType("collection");
|
||||
fptp.setOutputFormat(mbOutFormat);
|
||||
fptp.setOutputFormat(null);
|
||||
FindPossibleTransformationProgramsResponse tpRes= mbportType.findPossibleTransformationPrograms(fptp);
|
||||
|
||||
return tpRes.getTransformationProgram();
|
||||
String[] toReturn= tpRes.getTransformationProgram();
|
||||
return toReturn;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -333,6 +332,9 @@ public class IStoDBUtil {
|
|||
sHandler.run();
|
||||
String[] resList=sHandler.getReturnValue();
|
||||
|
||||
List<MFRelationDerivate> derivatedList= new ArrayList<MFRelationDerivate>();
|
||||
if (resList!=null && resList.length>0){
|
||||
System.out.println("resList is not null");
|
||||
XPath xpath= XPathFactory.newInstance().newXPath();
|
||||
String schemaExpr="//TransformationProgram/Output[@name='TPOutput']/Schema/text()";
|
||||
String languageExpr="//TransformationProgram/Output[@name='TPOutput']/Language[@isVariable='false']/text()";
|
||||
|
@ -344,7 +346,7 @@ public class IStoDBUtil {
|
|||
Transformer transformer = TransformerFactory.newInstance().newTransformer();
|
||||
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,"yes");
|
||||
|
||||
List<MFRelationDerivate> derivatedList= new ArrayList<MFRelationDerivate>();
|
||||
|
||||
|
||||
NodeList set;
|
||||
StreamResult sr;
|
||||
|
@ -389,6 +391,7 @@ public class IStoDBUtil {
|
|||
|
||||
}
|
||||
}
|
||||
}else System.out.println("resList is null");
|
||||
return derivatedList;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.gcube.common.core.informationsystem.client.AtomicCondition;
|
|||
import org.gcube.common.core.informationsystem.client.ISClient;
|
||||
import org.gcube.common.core.informationsystem.client.queries.GCUBERIQuery;
|
||||
import org.gcube.common.core.resources.GCUBERunningInstance;
|
||||
import org.gcube.common.core.scope.GCUBEScope;
|
||||
import org.gcube.common.core.utils.handlers.GCUBEServiceClient;
|
||||
import org.gcube.common.core.utils.handlers.GCUBEServiceHandler;
|
||||
import org.gcube.common.vremanagement.ghnmanager.impl.contexts.ServiceContext;
|
||||
|
@ -19,9 +18,9 @@ import org.gcube.metadatamanagement.metadatabroker.stubs.service.MetadataBrokerS
|
|||
|
||||
public abstract class MBrokerServiceHandler<T, P> extends GCUBEServiceHandler<GCUBEServiceClient> {
|
||||
|
||||
private T returnValue= null;
|
||||
private T returnValue;
|
||||
|
||||
private P parameter= null;
|
||||
private P parameter;
|
||||
|
||||
public T getReturnValue(){
|
||||
return returnValue;
|
||||
|
@ -57,10 +56,12 @@ public abstract class MBrokerServiceHandler<T, P> extends GCUBEServiceHandler<GC
|
|||
|
||||
|
||||
protected void interact(EndpointReferenceType arg0) throws Exception{
|
||||
MetadataBrokerPortType mbpt= null;
|
||||
try{
|
||||
MetadataBrokerServiceAddressingLocator mbsal= new MetadataBrokerServiceAddressingLocator();
|
||||
|
||||
MetadataBrokerPortType mbpt= mbsal.getMetadataBrokerPortTypePort(arg0);
|
||||
mbpt= mbsal.getMetadataBrokerPortTypePort(arg0);
|
||||
mbpt = GCUBERemotePortTypeContext.getProxy(mbpt,ServiceContext.getContext().getScope());
|
||||
this.setReturnValue(this.makeCall(mbpt));
|
||||
}catch(Exception e){throw e;}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue