Compare commits
2 Commits
master
...
rest-colle
Author | SHA1 | Date |
---|---|---|
lucio | 1375852ca4 | |
lucio | c722f022e0 |
14
.classpath
14
.classpath
|
@ -6,23 +6,14 @@
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
|
@ -30,6 +21,7 @@
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
|
13
.project
13
.project
|
@ -5,6 +5,11 @@
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
<arguments>
|
<arguments>
|
||||||
|
@ -15,9 +20,17 @@
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
|
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.resources.discovery</groupId>
|
<groupId>org.gcube.resources.discovery</groupId>
|
||||||
<artifactId>discovery-client</artifactId>
|
<artifactId>discovery-client</artifactId>
|
||||||
<version>1.0.1</version>
|
<version>1.0.2-SNASPHOT</version>
|
||||||
<name>Discovery Client</name>
|
<name>Discovery Client</name>
|
||||||
<description>Base API for resource discovery clients</description>
|
<description>Base API for resource discovery clients</description>
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ public class QueryTemplate extends QueryBox implements Query {
|
||||||
|
|
||||||
public static final String DEFAULT = "def";
|
public static final String DEFAULT = "def";
|
||||||
|
|
||||||
|
public static final String STATEMENT = "statement";
|
||||||
|
|
||||||
private static final XMLInputFactory xmlif = XMLInputFactory.newInstance();
|
private static final XMLInputFactory xmlif = XMLInputFactory.newInstance();
|
||||||
|
|
||||||
|
@ -157,9 +158,14 @@ public class QueryTemplate extends QueryBox implements Query {
|
||||||
if (name.equals(wrapper))
|
if (name.equals(wrapper))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (parameters.containsKey(name))
|
if (parameters.containsKey(name)) {
|
||||||
|
String statement =xmlr.getAttributeValue(null,STATEMENT);
|
||||||
|
if (statement != null) {
|
||||||
|
builder.append(statement).append(" ");
|
||||||
|
}
|
||||||
builder.append(parameters.get(name));
|
builder.append(parameters.get(name));
|
||||||
else {
|
|
||||||
|
}else {
|
||||||
// is there a default value?
|
// is there a default value?
|
||||||
String def = xmlr.getAttributeValue(null,DEFAULT);
|
String def = xmlr.getAttributeValue(null,DEFAULT);
|
||||||
if (def != null)
|
if (def != null)
|
||||||
|
|
|
@ -33,8 +33,8 @@ public class XQuery extends QueryTemplate implements SimpleQuery {
|
||||||
public static final String cond = "cond";
|
public static final String cond = "cond";
|
||||||
public static final String result = "result";
|
public static final String result = "result";
|
||||||
|
|
||||||
public static final String template = "<ns/> for $resource in <" + range + "/><vars/> where <" + cond + " " + DEFAULT
|
public static final String template = "<ns/> for $resource in <" + range + "/><vars/> <" + cond + " "+ STATEMENT +"='where' "+ DEFAULT
|
||||||
+ "='$resource'/> return <" + result + " " + DEFAULT + "='$resource'/>";
|
+ "=''/> return <" + result + " " + DEFAULT + "='$resource'/>";
|
||||||
|
|
||||||
public XQuery(Map<String, String> parameters) {// add static parameters
|
public XQuery(Map<String, String> parameters) {// add static parameters
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue