Lucio Lelii 7 years ago
parent f6fb798eca
commit 2db1843427

@ -285,29 +285,6 @@
<version>10.2.2.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.abdera</groupId>
<artifactId>abdera-bundle</artifactId>
<version>1.1.3</version>
<exclusions>
<exclusion>
<artifactId>xmlsec</artifactId>
<groupId>xml-security</groupId>
</exclusion>
<exclusion>
<artifactId>geronimo-activation_1.0.2_spec</artifactId>
<groupId>org.apache.geronimo.specs</groupId>
</exclusion>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-exec</artifactId>
@ -391,6 +368,12 @@
<groupId>org.n52.mc</groupId>
<artifactId>mc-runtime</artifactId>
<version>1.1</version>
<exclusions>
<exclusion>
<artifactId>abdera-bundle</artifactId>
<groupId>org.apache.abdera</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.n52.mc</groupId>
@ -555,6 +538,10 @@
<artifactId>52n-wps-algorithm</artifactId>
<groupId>org.n52.wps</groupId>
</exclusion>
<exclusion>
<artifactId>abdera-bundle</artifactId>
<groupId>org.apache.abdera</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>

@ -177,7 +177,7 @@ public class RequestHandler {
try {
LOGGER.trace("Parsing Document...");
System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
//System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
fac.setNamespaceAware(true);

@ -1,6 +1,7 @@
package org.gcube.data.analysis.wps.repository;
import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE;
import static java.nio.file.StandardWatchEventKinds.OVERFLOW;
import java.io.IOException;
@ -82,7 +83,7 @@ public final class AlgorithmUpdater {
log.debug("parent class loader is {}", parentLoader.getClass().getSimpleName());
dir = Paths.get(algorithmDirectory);
installedURLS = updateClassLoader();
dir.register(watcher, ENTRY_CREATE);
dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE );
} catch (IOException e) {
throw new RuntimeException(e);
}
@ -131,9 +132,9 @@ public final class AlgorithmUpdater {
if (filename.getFileName().toString().endsWith("_interface.jar") ){
try{
if (installedURLS.contains(filename.getFileName().toString())){
log.debug("modifying an already installed algorithm");
log.debug("{} an already installed algorithm",(kind==ENTRY_CREATE?"modifying":"removing"));
installedURLS = updateClassLoader();
} else {
} else if (kind==ENTRY_CREATE){
log.debug("installing new algorithm");
final Class<URLClassLoader> sysclass = URLClassLoader.class;
// TODO some kind of a hack. Need to invent better solution.

@ -25,7 +25,7 @@ no. 654119), SoBigData (grant no. 654024);
Version
--------------------------------------------------
1.1.0-SNAPSHOT (2017-09-21)
1.1.0-SNAPSHOT (2017-09-25)
Please see the file named "changelog.xml" in this directory for the release notes.

@ -0,0 +1,45 @@
package org.gcube.data.analysis;
import static org.gcube.resources.discovery.icclient.ICFactory.clientFor;
import static org.gcube.resources.discovery.icclient.ICFactory.queryFor;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.resources.gcore.GenericResource;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
import org.junit.Test;
public class TestIS {
@Test
public void getFromIS() throws Exception{
ScopeProvider.instance.set("/gcube/devNext/NextNext");
SecurityTokenProvider.instance.set("a5b623b6-6577-4271-aba6-7ada687d29cf-98187548");
SimpleQuery query = queryFor(GenericResource.class);
query.addCondition("$resource/Profile/SecondaryType/text() eq 'ISO'").
addCondition("$resource/Profile/Name/text() eq 'MetadataConstants'");
DiscoveryClient<GenericResource> client = clientFor(GenericResource.class);
//XStream xstream = new XStream();
for(GenericResource resource : client.submit(query)){
try{
// Refactor logic to integrate
// // parse body as a XML serialization of a Computational Infrastructure
// StringWriter writer = new StringWriter();
// transformer.transform(new DOMSource(resource.profile().body()), new StreamResult(writer));
// String theXML=writer.getBuffer().toString();
// // String theXML = writer.getBuffer().toString().replaceAll("\n|\r", "");
//EnvironmentConfiguration config=(EnvironmentConfiguration) xstream.fromXML(resource.profile().bodyAsString());
System.out.println(resource.profile().bodyAsString());
}catch(Exception e){
e.printStackTrace();
}
}
}
}
Loading…
Cancel
Save