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)
|
||||
* test-suite
|
||||
* Data e Query specialized managers
|
||||
* scheduled backups
|
||||
* remote connect/shutdown
|
||||
* remote backup/restore
|
||||
* portTypes reorganization
|
||||
* internal refactoring
|
||||
* hot and cold backups
|
||||
* internal refactoring
|
||||
|
||||
v. 1.0.0 (10-01-2009)
|
||||
* gCore refactoring
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<environment name="scheduledBackupInHours" value="2"
|
||||
type="java.lang.String" override="false" />
|
||||
|
||||
<environment name="sweeperIntervalinMillis" value="120000"
|
||||
<environment name="sweeperIntervalInMillis" value="120000"
|
||||
type="java.lang.String" override="false" />
|
||||
|
||||
<environment name="registrationURI" value="http://...."
|
||||
|
|
|
@ -105,14 +105,7 @@
|
|||
<wsdl:input message="tns:VoidMessage"/>
|
||||
<wsdl:output message="tns:VoidMessage"/>
|
||||
</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:definitions>
|
|
@ -76,7 +76,7 @@ public class XQueryAccess extends GCUBEPortType {
|
|||
dataset.append("<" + rootElement + ">\n");
|
||||
for (int i = 0; i < (int) result.getSize(); 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+">");
|
||||
return dataset.toString();
|
||||
|
|
|
@ -21,7 +21,7 @@ public abstract class Scheduler implements Runnable {
|
|||
*/
|
||||
public Scheduler(int intervalInHours) {
|
||||
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() {}
|
||||
|
|
|
@ -65,7 +65,7 @@ public class State {
|
|||
logger.info("Initialising the sweeper...");
|
||||
// start the sweeper to periodically cleanup the storage and some data structures
|
||||
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)));
|
||||
State.sweeperT = new Thread(sweeper);
|
||||
State.sweeperT.start();
|
||||
|
|
|
@ -7,6 +7,8 @@ import java.io.FileReader;
|
|||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
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.scope.GCUBEScope;
|
||||
|
@ -59,6 +61,12 @@ public class XQueryExecuteTester {
|
|||
logger.info("Number of returned records: " + response.getSize());
|
||||
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) {
|
||||
logger.error("XQuery Fault Error received", e);
|
||||
} catch (RemoteException e) {
|
||||
|
|
Loading…
Reference in New Issue