This commit is contained in:
Lucio Lelii 2008-10-30 18:54:34 +00:00
parent cd8c26cc5f
commit fd737902c1
16 changed files with 195 additions and 76 deletions

View File

@ -4,19 +4,22 @@
<service name="gcube/vremanagement/vremodeler">
<environment
name="configDir"
value="@config.dir@"
type="java.lang.String"
<environment
name="configDir"
value="@config.dir@"
type="java.lang.String"
override="false" />
<environment
name="securityManagerClass"
value="org.gcube.common.core.security.GCUBEServiceSecurityManagerImpl"
type="java.lang.String"
<environment
name="securityManagerClass"
value="org.gcube.common.core.security.GCUBEServiceSecurityManagerImpl"
type="java.lang.String"
override="false" />
</service>
</service>
<service name="gcube/vremanagement/vremodeler/ModelFactoryService"/>
<service name="gcube/vremanagement/vremodeler/ModelerService">
@ -24,7 +27,7 @@
name="RPDName"
value="ModelerProperties"
type="java.lang.String"
override="false"/> >
override="false"/>
<resource name="publicationProfile" type="org.gcube.common.core.state.GCUBEPublicationProfile">
<resourceParams>
@ -43,7 +46,7 @@
</resourceParams>
</resource>
<resource name="home" type="org.gcube.vremanagement.vremodeler.ModelerHome">
<resource name="home" type="org.gcube.vremanagement.vremodeler.impl.ModelerHome">
<resourceParams>
<parameter>
<name>factory</name>
@ -51,16 +54,12 @@
</parameter>
<parameter>
<name>resourceClass</name>
<value>org.gcube.vremanagement.vremodeler.ModelerResource</value>
<value>org.gcube.vremanagement.vremodeler.impl.ModelerResource</value>
</parameter>
</resourceParams>
</resource>
<environment
name="frequentUserLimit"
value="3"
type="java.lang.Integer"
override="false" />
</service>
</jndiConfig>

View File

@ -15,8 +15,8 @@
<!--<parameter name="securityDescriptor" value="@config.dir@/security_descriptor.xml"/> -->
</service>
<service name="gcube/vremanagement/vremodeler" provider="Handler" use="literal" style="document">
<parameter name="className" value="org.gcube.vremanagement.vremodeler.impl.ModelerFactory"/>
<service name="gcube/vremanagement/vremodeler/ModelFactoryService" provider="Handler" use="literal" style="document">
<parameter name="className" value="org.gcube.vremanagement.vremodeler.impl.ModelFactoryService"/>
<wsdlFile>share/schema/org.gcube.vremanagement.vremodeler/ModelerFactory_service.wsdl</wsdlFile>
<parameter name="allowedMethods" value="*"/>
<parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>

View File

@ -0,0 +1,17 @@
#HSQL Database Engine 1.8.0.7
#Thu Oct 09 14:33:14 CEST 2008
hsqldb.script_format=0
runtime.gc_interval=0
sql.enforce_strict_size=false
hsqldb.cache_size_scale=8
readonly=false
hsqldb.nio_data_file=true
hsqldb.cache_scale=14
version=1.8.0
hsqldb.default_table_type=memory
hsqldb.cache_file_scale=1
hsqldb.log_size=200
modified=yes
hsqldb.cache_version=1.7.0
hsqldb.original_version=1.8.0
hsqldb.compatible_version=1.8.0

56
etc/hsqldb/vdldb.script Normal file
View File

@ -0,0 +1,56 @@
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE MEMORY TABLE COLLECTION(ID VARCHAR NOT NULL PRIMARY KEY,NAME VARCHAR,DESCRIPTION VARCHAR,MEMBERS VARCHAR,CREATION VARCHAR,LASTUPDATE VARCHAR)
CREATE MEMORY TABLE GHN(ID VARCHAR NOT NULL PRIMARY KEY,HOST VARCHAR,SECURITY VARCHAR,UPTIME VARCHAR,MAINMEMORYVA VARCHAR,MAINMEMORYVS VARCHAR,LOCALAS VARCHAR,LOCATION VARCHAR,COUNTRY VARCHAR,DOMAIN VARCHAR)
CREATE MEMORY TABLE MDCOLLECTION(ID VARCHAR NOT NULL PRIMARY KEY,NAME VARCHAR,DESCRIPTION VARCHAR,RELATEDCOLLECTIONID VARCHAR NOT NULL,CONSTRAINT SYS_FK_50 FOREIGN KEY(RELATEDCOLLECTIONID) REFERENCES COLLECTION(ID))
CREATE MEMORY TABLE VRE(ID VARCHAR NOT NULL PRIMARY KEY,NAME VARCHAR NOT NULL,DESCRIPTION VARCHAR NOT NULL,VREDESIGNER VARCHAR NOT NULL,VREMANAGER VARCHAR NOT NULL,INTERVALFROM DATE,INTERVALTO DATE,EPR VARCHAR,STATUS VARCHAR)
CREATE MEMORY TABLE CS(ID VARCHAR NOT NULL PRIMARY KEY,NAME VARCHAR NOT NULL,DESCRIPTION VARCHAR NOT NULL)
CREATE MEMORY TABLE RUNNINGINSTANCE(ID VARCHAR NOT NULL PRIMARY KEY,NAME VARCHAR NOT NULL, CLASS VARCHAR NOT NULL)
CREATE MEMORY TABLE GHNRELATEDRI(DHNID VARCHAR NOT NULL,RIID VARCHAR NOT NULL,PRIMARY KEY(DHNID,RIID))
CREATE MEMORY TABLE RIRELATEDPKG(RIID VARCHAR NOT NULL,PKGID INTEGER NOT NULL,PRIMARY KEY(RIID,PKGID))
CREATE MEMORY TABLE FUNCTIONALITY(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 0) NOT NULL PRIMARY KEY,NAME VARCHAR NOT NULL,DESCRIPTION VARCHAR NOT NULL,FATHER INTEGER,FLAG INTEGER NOT NULL)
CREATE MEMORY TABLE PACKAGE(ID VARCHAR NOT NULL,SCLASS VARCHAR NOT NULL,SNAME VARCHAR NOT NULL,PNAME VARCHAR NOT NULL,PRIMARY KEY(SCLASS,SNAME,PNAME))
CREATE MEMORY TABLE MDFORMAT(ID VARCHAR NOT NULL PRIMARY KEY,NAME VARCHAR NOT NULL,SCHEMAURI VARCHAR NOT NULL,LANGUAGE VARCHAR NOT NULL)
CREATE MEMORY TABLE DERIVABLEMDF(MDCOLLID VARCHAR NOT NULL,MDFID VARCHAR NOT NULL,TPID VARCHAR NOT NULL,PRIMARY KEY(MDCOLLID,MDFID),CONSTRAINT SYS_FK_170 FOREIGN KEY(MDCOLLID) REFERENCES MDCOLLECTION(ID),CONSTRAINT SYS_FK_171 FOREIGN KEY(MDFID) REFERENCES MDFORMAT(ID))
CREATE MEMORY TABLE NATIVEMDF(MDCOLLID VARCHAR NOT NULL,MDFID VARCHAR NOT NULL,PRIMARY KEY(MDCOLLID,MDFID),CONSTRAINT SYS_FK_178 FOREIGN KEY(MDCOLLID) REFERENCES MDCOLLECTION(ID),CONSTRAINT SYS_FK_179 FOREIGN KEY(MDFID) REFERENCES MDFORMAT(ID))
CREATE MEMORY TABLE VRERELATEDCOLLECTION(VREID VARCHAR NOT NULL,COLLID VARCHAR NOT NULL,PRIMARY KEY(VREID,COLLID))
CREATE MEMORY TABLE VRERELATEDGHN(VREID VARCHAR NOT NULL,DHNID VARCHAR NOT NULL,PRIMARY KEY(VREID,DHNID))
CREATE MEMORY TABLE VRERELATEDCS(VREID VARCHAR NOT NULL,CSID VARCHAR NOT NULL,PRIMARY KEY(VREID,CSID))
CREATE MEMORY TABLE VRERELATEDMETADATAFORMAT(VREID VARCHAR,COLLID VARCHAR,MFID VARCHAR)
CREATE MEMORY TABLE VRERELATEDFUNC(VREID VARCHAR NOT NULL,FUNCID VARCHAR NOT NULL,PRIMARY KEY(VREID,FUNCID))
CREATE MEMORY TABLE SERVICES(ID INTEGER NOT NULL,NAME VARCHAR NOT NULL,CLASS VARCHAR NOT NULL,PRIMARY KEY(NAME,CLASS),CONSTRAINT SYS_FK_189 FOREIGN KEY(ID) REFERENCES FUNCTIONALITY(ID))
CREATE MEMORY TABLE VRERELATEDFUNCT(VREID VARCHAR NOT NULL,FUNCID VARCHAR NOT NULL,PRIMARY KEY(VREID,FUNCID))
CREATE MEMORY TABLE RELATEDSERVICEID(ID VARCHAR NOT NULL PRIMARY KEY,NAME VARCHAR NOT NULL,CLASS VARCHAR NOT NULL)
ALTER TABLE FUNCTIONALITY ALTER COLUMN ID RESTART WITH 17
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
SET SCHEMA PUBLIC
INSERT INTO FUNCTIONALITY VALUES(0,'Simple Search','By selecting this function VRE users will be provided with facilities supporting the discovery of Information Objects by issuing simple keyword based queries. This is the simplest modality for discovering the Information Objects constituting the VRE Information Space. In addition to the specification of the keywords characterising the Information Objects the user is interested in, this function permit to restrict the Information Space in which to search by specifying the set of Collections against which the query will be evaluated.',9,0)
INSERT INTO FUNCTIONALITY VALUES(1,'Fielded Search (Advanced)','By selecting this function VRE users will be provided with facilities supporting the discovery of Information Objects by issuing complex queries specifying per field conditions, e.g. queries like "Title contains Diligent and Creator contains Diligent Team". Such per-field conditions can be combined to request objects matching all the specified conditions (conjunctive queries) or any of the specified conditions (disjunctive queries). In addition to the specification of the conditions characterising the Information Objects the user is interested in, this function permit to restrict the Information Space in which to search by specifying the set of Collections against which the query will be evaluated.',9,0)
INSERT INTO FUNCTIONALITY VALUES(2,'Geospatial Search (Advanced)','By selecting this function VRE users will be provided with facilities supporting the discovery of Information Objects by issuing complex queries specifying temporal and geographical conditions. Temporal conditions will be specified by selecting the time frame of interest; this function provide VRE users with appropriate facilities for supporting this specification. Geographical conditions will be specified by selecting the geographical area of interest; this function provide VRE users with various facilities for specifying such an area ranging from the drawing of the area borders to the specification of the two opposite vertex of a square or the selection of a predefined area via its name. In addition to the specification of the temporal and geographical conditions characterising the Information Objects the user is interested in, this function permit to restrict the Information Space in which to search by specifying the set of Collections against which the query will be evaluated.',9,0)
INSERT INTO FUNCTIONALITY VALUES(3,'Google Search','By selecting this function VRE users will be provided with facilities supporting the discovery of Information Objects through Google and thus conceptually residing in the Web. Google is nowadays one of the most used search engines for the World Wide Web, the activation of this function integrates the power of such a search engine into the Virtual Research Environment providing thus providing the VRE users with operations for searching the Web and using the discovered objects to accomplish their activities.',9,0)
INSERT INTO FUNCTIONALITY VALUES(4,'Browse','By selecting this function VRE users will be provided with facilities supporting the discovery of Information Objects by browsing the specified Information Space. The function provide VRE users with facilities for specifying the field to organise the objects (e.g. Title), the criterion to sort the discovered objects (ascending versus descending), the number of objects per page, and the set of collections in which to search. Finally, the VRE user is provided with two visualisations options, i.e. to browse the possible values of the selected field only or to browse the whole objects according to the specified criteria.',9,0)
INSERT INTO FUNCTIONALITY VALUES(5,'Annotation','By selecting this function VRE users will be provided with facilities for annotating Information Objects. Annotations are additional Information Objects including notes, structured comments or links that an Actor may associate to an existing Information Object to add an interpretative value. This function is particularly useful to support co-operation between the users of a VRE since it allows not only to enrich an Information Object with personal observation and thus share this comment within the VRE community but, in general, also as a mean for transmitting and sharing ideas and thus doing research.',8,0)
INSERT INTO FUNCTIONALITY VALUES(6,'Report definition','By selecting this function VRE users will be provided with facilities for report management, e.g. report creation. Reports are a special type of Information Object that is characterised by an intensional definition, i.e. the creator defines the report template that characterised the report in a definitional way by specifying the shape and content of this compound Information Object. Such an Information Objects is a "living object", i.e. each time the report is accessed its specification is interpreted and the constituent parts are materialised by using the information currently available in the VRE. Each of such "living objects" can be materialised as to produce a version of it to be recorded into the VRE either as an HTML or a PDF Information Object.',8,0)
INSERT INTO FUNCTIONALITY VALUES(7,'Course management','By selecting this function VRE users will be provided with facilities for courses management, e.g. course creation and course attendance. Each course is a learning environment providing consumers with an organised set of Information Objects and tools (e.g. chats, forums) tailored to support distant learning activities on a specific topic. This function rely on the MooVREe system, i.e. an open-source e-Learning environment system, and is fully integrated with the rest of the VRE content and functions, e.g. a course will be populated by using Information Objects residing into the VRE Information Space and discovered by using the search function. In addition to curate the content of each course, teachers (designated users) can customise each course by selecting among the activity modules supported by the system, e.g. chat, Glossary, Survey.',8,0)
INSERT INTO FUNCTIONALITY VALUES(8,'Content Functions','This class of functions characterises the additional Content Management facilities that can be activated in the Virtual Research Environment. The meaning of additional is related to the fact that a fundamental set of Content Management facilities are supported by any VRE and not subject to design choices, e.g. Information Object storage and visualisation. This class contains only the functions providing potential extra-features that can be activated in this specific VRE, e.g. the possibility to annotate Information Object and the possibility to edit Information Objects.',NULL,0)
INSERT INTO FUNCTIONALITY VALUES(9,'Access Functions','This class of functions characterises the facilities that can be activated in the Virtual Research Environment to support users in requesting, locating, and delivering the Virtual Research Environment Content.',NULL,0)
INSERT INTO FUNCTIONALITY VALUES(10,'Workflow definition and execution','By selecting this function VRE users will be provided with facilities for defining, executing and monitoring workflows, i.e. processes delivering new functions by combining various service invocations into an organised (and even complex) sequence of steps.',NULL,0)
INSERT INTO FUNCTIONALITY VALUES(11,'Transparent Replication','By selecting this function the Virtual Research Environment will be equipped with a feature acting in the background with the goal to guarantee that the Content managed by the Virtual Research Environment is stored with an adequate level of replication as to improve the content reliability and availability quality parameters. This feature is not directly perceived by the end-users of the VRE but its operation will contribute to improve the quality of the service of the resulting VRE. This function will transparently replicate the Information Objects and their constituents by relying on the distributed storage capacity the with which VRE will be provided.',8,0)
INSERT INTO FUNCTIONALITY VALUES(12,'Transparent Distribution','By selecting this function the Virtual Research Environment will be equipped with a feature acting in the background with the goal to guarantee that the Content managed by the Virtual Research Environment is stored with an adequate level of distribution among the available storage devices as to improve the load balancing quality parameter. This feature is not directly perceived by the end-users of the VRE but its operation will contribute to improve the quality of the service of the resulting VRE. This function will transparently distribute the Information Objects and their constituents by relying on the distributed storage capacity with which the VRE will be provided.',8,0)
INSERT INTO FUNCTIONALITY VALUES(13,'Content Watermarking','By selecting this function the Virtual Research Environment will be equipped with a feature acting in the background with the goal to guarantee that the Content managed by the Virtual Research Environment is automatically watermarked before its storage as to prevent unauthorised exploitation of it. This feature is not directly perceived by the end-users of the VRE but its operation will contribute to improve the quality of the service of the resulting VRE. This function will transparently apply watermarking algorithms to the Information Objects and their constituents before to store them on third party storage services as well as take care of their decoding before their consumption. The activation of this function will lead to an improvement of the content security parameter but also to an augment of the access time, i.e. the time needed to consume the object.',8,0)
INSERT INTO FUNCTIONALITY VALUES(14,'Content Encryption','By selecting this function the Virtual Research Environment will be equipped with a feature acting in the background with the goal to guarantee that the Content managed by the Virtual Research Environment is automatically encrypted before its storage as to avoid unauthorised use of it. This feature is not directly perceived by the end-users of the VRE but its operation will contribute to improve the quality of the service of the resulting VRE. This function will transparently apply encryption algorithms to the Information Objects and their constituents before to store them on third party storage services as well as take care of their decoding before their consumption. The activation of this function will lead to an improvement of the content security parameter but also to an augment of the access time, i.e. the time needed to consume the object.',8,0)
INSERT INTO FUNCTIONALITY VALUES(15,'Information Object Editing','By selecting this function VRE users will be provided with facilities for editing existing Information Objects. In particular, this function provides users with operation to modify existing Information Objects, more specifically their associated metadata.',8,0)
INSERT INTO SERVICES VALUES(5,'ABE','Annotation')
INSERT INTO SERVICES VALUES(0,'BooleanResultSetCompareService','Search')
INSERT INTO SERVICES VALUES(0,'FilterResultSetByXPathOperatorService','Search')
INSERT INTO SERVICES VALUES(0,'JoinInnerOperatorService','Search')
INSERT INTO SERVICES VALUES(0,'KeepTopOperatorService','Search')
INSERT INTO SERVICES VALUES(0,'MergeOperatorService','Search')
INSERT INTO SERVICES VALUES(3,'QueryExtSourceGoogleService','Search')
INSERT INTO SERVICES VALUES(0,'ResultSetScannerService','Search')
INSERT INTO SERVICES VALUES(0,'ResultSetService','Search')
INSERT INTO SERVICES VALUES(0,'SearchManagerService','Search')
INSERT INTO SERVICES VALUES(0,'SearchMasterService','Search')
INSERT INTO SERVICES VALUES(0,'SortOperatorService','Search')
INSERT INTO SERVICES VALUES(0,'TransformByXSLTOperatorService','Search')

View File

@ -26,7 +26,7 @@
</Dependencies>
<GARArchive>org.gcube.vremanagement.vremodeler.gar</GARArchive>
<PortType>
<Name>gcube/vdlmanagement/vdlmodeler</Name>
<Name>gcube/vremanagement/vremodeler/ModelFactoryService</Name>
<WSDL/>
</PortType>
<PortType>

View File

@ -1,26 +1,26 @@
<ServiceGroupRegistrationParameters
xmlns:sgc="http://mds.globus.org/servicegroup/client"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:agg="http://mds.globus.org/aggregator/types"
xmlns="http://mds.globus.org/servicegroup/client">
<ServiceGroupRegistrationParameters
xmlns:sgc="http://mds.globus.org/servicegroup/client"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:agg="http://mds.globus.org/aggregator/types"
xmlns="http://mds.globus.org/servicegroup/client">
<!-- Specifies that the registration will be renewed every 30 seconds -->
<!-- Specifies that the RPD registration will be renewed every 60 seconds -->
<RefreshIntervalSecs>60</RefreshIntervalSecs>
<!-- <Content> specifies registration specific information -->
<Content xsi:type="agg:AggregatorContent">
<agg:AggregatorConfig>
<agg:GetMultipleResourcePropertiesPollType xmlns:modeler="http://gcube-system.org/namespaces/vremanagement/vremodeler">
<!-- <Content> specifies registration specific information -->
<Content xsi:type="agg:AggregatorContent"
xmlns:agg="http://mds.globus.org/aggregator/types">
<agg:AggregatorConfig xsi:type="agg:AggregatorConfig">
<agg:GetMultipleResourcePropertiesPollType xmlns:xmlindexer="http://gcube-system.org/namespaces/metadatamanagement/xmlindexer/gcubedaix">
<!-- the polling time: how often the IS synchronizes its content with the RPD values -->
<agg:PollIntervalMillis>60000</agg:PollIntervalMillis>
<agg:ResourcePropertyNames>modeler:Id</agg:ResourcePropertyNames>
</agg:GetMultipleResourcePropertiesPollType>
</agg:AggregatorConfig>
</agg:AggregatorConfig>
<agg:AggregatorData/>
</Content>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="ModelerFactory"
<definitions name="ModelFactoryService"
targetNamespace="http://gcube-system.org/namespaces/vremanagement/vremodeler"
xmlns:tns="http://gcube-system.org/namespaces/vremanagement/vremodeler"
xmlns="http://schemas.xmlsoap.org/wsdl/"
@ -19,7 +19,8 @@
<types>
<xsd:schema targetNamespace="http://gcube-system.org/namespaces/vremanagement/vremodeler"
xmlns:tns="http://gcube-system.org/namespaces/vremanagement/vremodeler">
xmlns:tns="http://gcube-system.org/namespaces/vremanagement/vremodeler"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://gcube-system.org/namespaces/common/core/types" schemaLocation="../gcube/common/core/types/GCUBETypes.xsd"/>
<xsd:import namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing" schemaLocation="../ws/addressing/WS-Addressing.xsd" />

View File

@ -268,8 +268,8 @@
============================================================-->
<portType name="ModelerServicePortType"
wsrp:ResourceProperties="tns:ModelerProperties"
wsdlpp:extends="provider:GCUBEProvider">
wsdlpp:extends="provider:GCUBEProvider"
wsrp:ResourceProperties="tns:ModelerProperties">
<operation name="setVREModel">
<input message="tns:SetVREModelInputMessage"/>

View File

@ -10,6 +10,7 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import org.gcube.common.core.faults.GCUBEFault;
import org.gcube.common.core.utils.logging.GCUBELog;
/**
*
@ -21,9 +22,9 @@ public class DBInterface {
private static Connection conn;
private static String dbFile = System.getenv("GLOBUS_LOCATION") + File.separator + "etc" + File.separator + "org_diligentproject_vdlgeneratorservice_model" + File.separator + "hsqldb" + File.separator + "vdldb";
private static String dbFile = System.getenv("GLOBUS_LOCATION") + File.separator + "etc" + File.separator + "org.gcube.vremanagement.vremodeler" + File.separator + "hsqldb" + File.separator + "vdldb";
private static GCUBELog logger = new GCUBELog(DBInterface.class.getName());
/**
*
* @return
@ -83,38 +84,41 @@ public class DBInterface {
if (values==null) throw new GCUBEFault();
Statement st = null;
ResultSet rs = null;
try{
st = conn.createStatement(); // statement objects can be reused with
}catch(SQLException e){//logger.error("error creating SQL statement");
throw new GCUBEFault(e);}
StringBuffer insertQuery=new StringBuffer();
StringBuffer insertQuery;
for (List<String> row: values)
{
insertQuery=new StringBuffer();
insertQuery.append("INSERT INTO ").append(table.toUpperCase()).append(" VALUES(");
try{
for(String value: row){
insertQuery.append("'").append(value.replaceAll("'", " ")).append("'");
insertQuery.append("'").append(value.replaceAll("'", " ")).append("',");
}
insertQuery.deleteCharAt(insertQuery.length()-1).append(");");
//logger.debug(insertQuery);
st.executeUpdate(insertQuery.toString()); // run the query
}catch(SQLException e){//logger.error("HSQLDB ERROR: Problem inserting data "+e.getMessage()+" -- "+insertQuery);
}catch(SQLException e){logger.error("HSQLDB ERROR: Problem inserting data "+e.getMessage()+" -- "+ insertQuery);
System.out.println("HSQLDB ERROR: Problem inserting data "+e.getMessage()+" -- "+ insertQuery);
e.printStackTrace();
}
catch(Exception e){//logger.error("VDLModelService error: Problem inserting data "+e.getMessage());
catch(Exception e){logger.error("VDLModelService error: Problem inserting data "+e.getMessage());
}
}
try{
st.close();
}catch(SQLException e){//logger.error("error closing SQL statement");
}catch(SQLException e){logger.error("error closing SQL statement");
throw new GCUBEFault(e);}
}

View File

@ -4,8 +4,8 @@ import java.rmi.RemoteException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.apache.axis.components.uuid.UUIDGen;
import org.apache.axis.components.uuid.UUIDGenFactory;
/*import org.apache.axis.components.uuid.UUIDGen;
import org.apache.axis.components.uuid.UUIDGenFactory;*/
import org.apache.axis.message.addressing.EndpointReferenceType;
import org.gcube.common.core.contexts.GHNContext;
import org.gcube.common.core.faults.GCUBEFault;
@ -32,7 +32,7 @@ import org.gcube.common.core.utils.logging.GCUBELog;
*/
public class IStoDBUtil {
private static UUIDGen uuidMFGEN=UUIDGenFactory.getUUIDGen();
//private static UUIDGen uuidMFGEN=UUIDGenFactory.getUUIDGen();
private static GCUBELog logger = new GCUBELog(IStoDBUtil.class.getName());
@ -46,14 +46,14 @@ public class IStoDBUtil {
cleanDB();
insertCollection(scope);
//logger.debug("initialization: collection");
logger.debug("initialization: collection");
insertMetadataCollection(scope);
//logger.debug("initialization: metadata");
logger.debug("initialization: metadata");
insertCS(scope);
//logger.debug("initialization: cs");
logger.debug("initialization: CS");
insertServices(scope);
insertGHN(scope);
//logger.debug("initialization: DHN");
logger.debug("initialization: GHN");
}
private static void cleanDB() throws GCUBEFault
@ -64,7 +64,7 @@ public class IStoDBUtil {
DBInterface.deleteAll("VRERELATEDCS");
DBInterface.deleteAll("VRERELATEDMETADATAFORMAT");
DBInterface.deleteAll("VRERELATEDFUNCT");
DBInterface.deleteAll("VRERELATEDDHN");
DBInterface.deleteAll("VRERELATEDGHN");
DBInterface.deleteAll("VRE");
DBInterface.deleteAll("nativemdf");
DBInterface.deleteAll("derivablemdf");
@ -436,6 +436,7 @@ public class IStoDBUtil {
}
@SuppressWarnings("unused")
private static void insertQuality(EndpointReferenceType epr) throws RemoteException {
}

View File

@ -111,7 +111,7 @@ public class ModelFactoryService extends GCUBEStartupPortType{
* @return void
* @throws RemoteException -
*/
public void removeDL(String request) throws GCUBEFault{
public void removeVRE(String request) throws GCUBEFault{
try{
ResultSet res=DBInterface.queryDB("Select VRE.epr from VRE where VRE.id='"+request+"';");
EndpointReferenceType dlEpr;

View File

@ -5,25 +5,23 @@ import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
public class ModelerContext extends GCUBEStatefulPortTypeContext{
public static String FREQUENT_USER_LIMIT_JNDI_NAME = "frequentUserLimit";
private static ModelerContext cache = new ModelerContext();
private static ModelerContext cache = new ModelerContext();
private ModelerContext(){}
@Override
public String getJNDIName() {
return "gcube/vdlmanagement/vdlmodeler/ModelerService";
return "gcube/vremanagement/vremodeler/ModelerService";
}
@Override
public String getNamespace() {
return null;
return "http://gcube-system.org/namespaces/vremanagement/vremodeler";
}
@Override
public ServiceContext getServiceContext() {
return ServiceContext.getContext();
return ServiceContext.getContext();
}
public static ModelerContext getPortTypeContext() {

View File

@ -10,7 +10,6 @@ public class ModelerResource extends GCUBEWSResource {
@Override
protected void initialise(Object... arg0) throws ResourceException {
// TODO Auto-generated method stub
}

View File

@ -10,6 +10,7 @@ import java.util.List;
import javax.xml.rpc.ServiceException;
import org.gcube.common.core.faults.GCUBEFault;
import org.gcube.common.core.types.VOID;
import org.gcube.vremanagement.vremanager.stubs.vremanager.VREManagerPortType;
import org.gcube.vremanagement.vremanager.stubs.vremanager.service.VREManagerServiceAddressingLocator;
import org.gcube.vremanagement.vremodeler.db.DBInterface;
@ -82,7 +83,7 @@ public class ModelerService {
* @return VoidType
* @throws RemoteException -
*/
public String getVREModel() throws GCUBEFault{
public String getVREModel(VOID var) throws GCUBEFault{
String toReturn =null;
@ -108,14 +109,14 @@ public class ModelerService {
* @return a XML String
* @throws RemoteException -
*/
public String getGHNs() throws GCUBEFault{
public String getGHNs(VOID var) throws GCUBEFault{
ResultSet res;
ArrayList<String> relatedGHN=new ArrayList<String>();
try{
DBInterface.connect();
res= DBInterface.queryDB("select * from GHN;");
ResultSet resRelated= DBInterface.queryDB("select ghnid from VRERELATEDGHN where VRERELATEDGHN.dlid='"+getResource().getId()+"';");
ResultSet resRelated= DBInterface.queryDB("select ghnid from VRERELATEDGHN where VRERELATEDGHN.vreid='"+getResource().getId()+"';");
while(resRelated.next()){
relatedGHN.add(resRelated.getString(1));
}
@ -165,7 +166,7 @@ public class ModelerService {
* @return the collection retreived from the database
* @throws RemoteException -
*/
public String getCollection() throws GCUBEFault{
public String getCollection(VOID var) throws GCUBEFault{
ResultSet res;
ArrayList<String> relatedCollection=new ArrayList<String>();
try{
@ -283,7 +284,7 @@ public class ModelerService {
public void setMetadataRelatedToCollection(SetMDFormatArgs request) throws GCUBEFault {
try{
DBInterface.ExecuteUpdate("DELETE FROM DLRELATEDMETADATAFORMAT WHERE DLRELATEDMETADATAFORMAT.dlid='"+getResource().getId()+"';");
String[] singleElement;
//String[] singleElement;
String key=(String) getResource().getId();
//logger.debug(request.getCollectionIDArray().length+" "+request.getMdFormatIDArray().length+" "+request.getCheckedArray().length+" "+request.getCheckedArray(0).getCheckedRowElement().length);
@ -315,7 +316,7 @@ public class ModelerService {
* @return an xml String containing selectable functionalities
* @throws RemoteException -
*/
public String getFunctionality() throws GCUBEFault {
public String getFunctionality(VOID var) throws GCUBEFault {
ResultSet resFunct=null;
ResultSet selectedFuncRes=null;
@ -398,7 +399,7 @@ public class ModelerService {
* @return a XML format String
* @throws RemoteException -
*/
public String getQuality() throws GCUBEFault{
public String getQuality(VOID var) throws GCUBEFault{
return XMLUtil.PrepareQualityXML();
}
@ -421,7 +422,7 @@ public class ModelerService {
* @return
* @throws RemoteException -
*/
public void setVREtoPendingState() throws GCUBEFault{
public void setVREtoPendingState(VOID var) throws GCUBEFault{
try{
DBInterface.ExecuteUpdate("UPDATE VRE SET STATUS='Pending' WHERE VRE.id='"+getResource().getId()+"';");
}catch(Exception e){throw new GCUBEFault(e);}
@ -433,7 +434,7 @@ public class ModelerService {
* @return
* @throws RemoteException -
*/
public void deployVRE() throws GCUBEFault{
public void deployVRE(VOID var) throws GCUBEFault{
try {
DBInterface.ExecuteUpdate("UPDATE VRE SET STATUS='Deploying' WHERE VRE.id='"+getResource().getId()+"';");
} catch (ResourceException e1) {

View File

@ -16,7 +16,7 @@ public class ServiceContext extends GCUBEServiceContext{
private ServiceContext(){};
/** {@inheritDoc} */
protected String getJNDIName() {return "gcube/vdlmanagement/vdlmodeler";}
protected String getJNDIName() {return "gcube/vremanagement/vremodeler";}
protected void onReady() throws Exception{
logger.info("ready event invoked on " + this.getName());

View File

@ -0,0 +1,43 @@
package org.gcube.vremanagement.vremodeler.test;
import java.util.List;
import org.apache.axis.message.addressing.EndpointReferenceType;
import org.gcube.common.core.contexts.GCUBERemotePortTypeContext;
import org.gcube.common.core.contexts.GHNContext;
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.types.VOID;
import org.gcube.vremanagement.vremodeler.stubs.ModelerFactoryPortType;
import org.gcube.vremanagement.vremodeler.stubs.ModelerServicePortType;
import org.gcube.vremanagement.vremodeler.stubs.service.ModelFactoryServiceAddressingLocator;
import org.gcube.vremanagement.vremodeler.stubs.service.ModelerServiceAddressingLocator;
public class ModelerTest {
public static void main(String[] args) throws Exception{
ISClient client = GHNContext.getImplementation(ISClient.class);
GCUBERIQuery riquery= client.getQuery(GCUBERIQuery.class);
riquery.addAtomicConditions(new AtomicCondition("//ServiceName", "VREModeler"));
List<GCUBERunningInstance> results=client.execute(riquery, GCUBEScope.getScope("/gcube/devsec"));
ModelFactoryServiceAddressingLocator mfal =new ModelFactoryServiceAddressingLocator();
EndpointReferenceType epr= results.get(0).getAccessPoint().getEndpoint("gcube/vremanagement/vremodeler/ModelFactoryService");
System.out.println(epr);
ModelerFactoryPortType mfptp= mfal.getModelerFactoryPortTypePort(epr);
mfptp = GCUBERemotePortTypeContext.getProxy(mfptp, GCUBEScope.getScope("/gcube/devsec"));
ModelerServiceAddressingLocator msal=new ModelerServiceAddressingLocator();
ModelerServicePortType msptp=msal.getModelerServicePortTypePort(mfptp.createResource(new VOID()));
msptp =GCUBERemotePortTypeContext.getProxy(msptp, GCUBEScope.getScope("/gcube/devsec"));
System.out.println(msptp.getGHNs(new VOID()));
}
}