several major fixings on PTs and XQuery
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Collector@14849 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
2737757ad1
commit
71ce2a93da
|
@ -1,8 +1,12 @@
|
||||||
|
|
||||||
v. 2.0.0 (30-08-2009)
|
v. 2.0.0 (30-08-2009)
|
||||||
|
* test-suite
|
||||||
|
* Data e Query specialized managers
|
||||||
|
* scheduled backups
|
||||||
|
* remote connect/shutdown
|
||||||
|
* remote backup/restore
|
||||||
* portTypes reorganization
|
* portTypes reorganization
|
||||||
* internal refactoring
|
* internal refactoring
|
||||||
* hot and cold backups
|
|
||||||
|
|
||||||
v. 1.0.0 (10-01-2009)
|
v. 1.0.0 (10-01-2009)
|
||||||
* gCore refactoring
|
* gCore refactoring
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<environment name="scheduledBackupInHours" value="2"
|
<environment name="scheduledBackupInHours" value="2"
|
||||||
type="java.lang.String" override="false" />
|
type="java.lang.String" override="false" />
|
||||||
|
|
||||||
<environment name="sweeperIntervalinMillis" value="120000"
|
<environment name="sweeperIntervalInMillis" value="120000"
|
||||||
type="java.lang.String" override="false" />
|
type="java.lang.String" override="false" />
|
||||||
|
|
||||||
<environment name="registrationURI" value="http://...."
|
<environment name="registrationURI" value="http://...."
|
||||||
|
|
|
@ -105,14 +105,7 @@
|
||||||
<wsdl:input message="tns:VoidMessage"/>
|
<wsdl:input message="tns:VoidMessage"/>
|
||||||
<wsdl:output message="tns:VoidMessage"/>
|
<wsdl:output message="tns:VoidMessage"/>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="Dispose">
|
|
||||||
<wsdl:input message="tns:VoidMessage"/>
|
|
||||||
<wsdl:output message="tns:VoidMessage"/>
|
|
||||||
</wsdl:operation>
|
|
||||||
<wsdl:operation name="Initialize">
|
|
||||||
<wsdl:input message="tns:VoidMessage"/>
|
|
||||||
<wsdl:output message="tns:VoidMessage"/>
|
|
||||||
</wsdl:operation>
|
|
||||||
</wsdl:portType>
|
</wsdl:portType>
|
||||||
|
|
||||||
</wsdl:definitions>
|
</wsdl:definitions>
|
|
@ -76,7 +76,7 @@ public class XQueryAccess extends GCUBEPortType {
|
||||||
dataset.append("<" + rootElement + ">\n");
|
dataset.append("<" + rootElement + ">\n");
|
||||||
for (int i = 0; i < (int) result.getSize(); i++) {
|
for (int i = 0; i < (int) result.getSize(); i++) {
|
||||||
XMLResource xmlres = (XMLResource) result.getResource((long) i);
|
XMLResource xmlres = (XMLResource) result.getResource((long) i);
|
||||||
dataset.append("<"+recordElement+">\n" + xmlres.getContent() + "\n</"+recordElement+"\n");
|
dataset.append("<"+recordElement+">\n" + xmlres.getContent() + "\n</"+recordElement+">\n");
|
||||||
}
|
}
|
||||||
dataset.append("</"+rootElement+">");
|
dataset.append("</"+rootElement+">");
|
||||||
return dataset.toString();
|
return dataset.toString();
|
||||||
|
|
|
@ -21,7 +21,7 @@ public abstract class Scheduler implements Runnable {
|
||||||
*/
|
*/
|
||||||
public Scheduler(int intervalInHours) {
|
public Scheduler(int intervalInHours) {
|
||||||
this.intervalInMS = intervalInHours * 3600 * 1000;
|
this.intervalInMS = intervalInHours * 3600 * 1000;
|
||||||
logger.info("Scheduler will work every : " + intervalInHours + " hour(s)");
|
logger.info("Scheduler will work every " + intervalInHours + " hour(s)");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Scheduler() {}
|
public Scheduler() {}
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class State {
|
||||||
logger.info("Initialising the sweeper...");
|
logger.info("Initialising the sweeper...");
|
||||||
// start the sweeper to periodically cleanup the storage and some data structures
|
// start the sweeper to periodically cleanup the storage and some data structures
|
||||||
if (State.sweeperT == null) {
|
if (State.sweeperT == null) {
|
||||||
Sweeper sweeper = new Sweeper(Long.valueOf((String) ICServiceContext.getContext().getProperty("sweeperIntervalinMillis", true)), Long.valueOf((String) ICServiceContext.getContext()
|
Sweeper sweeper = new Sweeper(Long.valueOf((String) ICServiceContext.getContext().getProperty("sweeperIntervalInMillis", true)), Long.valueOf((String) ICServiceContext.getContext()
|
||||||
.getProperty("resourceExpirationTimeInMillis", true)));
|
.getProperty("resourceExpirationTimeInMillis", true)));
|
||||||
State.sweeperT = new Thread(sweeper);
|
State.sweeperT = new Thread(sweeper);
|
||||||
State.sweeperT.start();
|
State.sweeperT.start();
|
||||||
|
|
|
@ -7,6 +7,8 @@ import java.io.FileReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.rmi.RemoteException;
|
import java.rmi.RemoteException;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.gcube.common.core.contexts.GCUBERemotePortTypeContext;
|
import org.gcube.common.core.contexts.GCUBERemotePortTypeContext;
|
||||||
import org.gcube.common.core.scope.GCUBEScope;
|
import org.gcube.common.core.scope.GCUBEScope;
|
||||||
|
@ -59,6 +61,12 @@ public class XQueryExecuteTester {
|
||||||
logger.info("Number of returned records: " + response.getSize());
|
logger.info("Number of returned records: " + response.getSize());
|
||||||
logger.info("Dataset: \n" + response.getDataset());
|
logger.info("Dataset: \n" + response.getDataset());
|
||||||
|
|
||||||
|
Pattern p = Pattern.compile("<Record>(.*?)</Record>", Pattern.DOTALL);
|
||||||
|
Matcher m = p.matcher(response.getDataset());
|
||||||
|
while (m.find()) {
|
||||||
|
logger.debug(m.group(1));
|
||||||
|
}
|
||||||
|
|
||||||
} catch (XQueryFaultType e) {
|
} catch (XQueryFaultType e) {
|
||||||
logger.error("XQuery Fault Error received", e);
|
logger.error("XQuery Fault Error received", e);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|
Loading…
Reference in New Issue