minor fixes on gcore endpoint social discovery

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/catalogue-ws@148331 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-05-05 14:17:44 +00:00
parent 64b2c80116
commit 106e71e779
2 changed files with 10 additions and 16 deletions

18
pom.xml
View File

@ -131,18 +131,6 @@
<artifactId>common-smartgears</artifactId>
<scope>provided</scope>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.gcube.common</groupId> -->
<!-- <artifactId>home-library</artifactId> -->
<!-- <version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version> -->
<!-- <scope>compile</scope> -->
<!-- </dependency> -->
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>${version.jersey}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.grundid.opendatalab</groupId>
<artifactId>geojson-jackson</artifactId>
@ -158,6 +146,12 @@
<artifactId>commons-lang</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>${version.jersey}</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -39,10 +39,10 @@ public class GcoreEndpointReaderSNL {
try{
SimpleQuery query = queryFor(GCoreEndpoint.class);
query.addCondition(String.format("$RESOURCE/Profile/SERVICE_CLASSE/text() eq '%s'",SERVICE_CLASSE));
query.addCondition("$RESOURCE/Profile/DeploymentData/Status/text() eq 'ready'");
query.addCondition(String.format("$RESOURCE/Profile/SERVICE_NAME/text() eq '%s'",SERVICE_NAME));
query.setResult("$RESOURCE/Profile/AccessPoint/RunningInstanceInterfaces//Endpoint[@EntryName/string() eq \""+RESOURCE+"\"]/text()");
query.addCondition(String.format("$resource/Profile/ServiceClass/text() eq '%s'",SERVICE_CLASSE));
query.addCondition("$resource/Profile/DeploymentData/Status/text() eq 'ready'");
query.addCondition(String.format("$resource/Profile/ServiceName/text() eq '%s'",SERVICE_NAME));
query.setResult("$resource/Profile/AccessPoint/RunningInstanceInterfaces//Endpoint[@EntryName/string() eq \""+RESOURCE+"\"]/text()");
DiscoveryClient<String> client = client();
List<String> endpoints = client.submit(query);