Permalink
Browse files

Also return the label

  • Loading branch information...
egonw committed Nov 13, 2010
1 parent c7c9439 commit dd68f715c364444f7ece5e719d8b31fa3fe82458
Showing with 4 additions and 2 deletions.
  1. +4 −2 plugins/net.bioclipse.opentox/src/net/bioclipse/opentox/api/Dataset.java
@@ -48,12 +48,13 @@
private static final Logger logger = Logger.getLogger(Dataset.class);
private final static String QUERY_PREDICTED_FEATURES =
- "SELECT ?desc ?numval WHERE {" +
+ "SELECT ?desc ?label ?numval WHERE {" +
" ?entry a <http://www.opentox.org/api/1.1#DataEntry> ;" +
" <http://www.opentox.org/api/1.1#values> ?value ." +
" ?value <http://www.opentox.org/api/1.1#feature> ?feature;" +
" <http://www.opentox.org/api/1.1#value> ?numval ." +
" ?feature <http://purl.org/dc/elements/1.1/creator> ?desc ." +
+ " ?feature <http://purl.org/dc/elements/1.1/title> ?label ." +
"}";
static CDKManager cdk = new CDKManager();
@@ -117,10 +118,11 @@ public static StringMatrix listPredictedFeatures(String datasetURI)
HttpMethod method = new GetMethod(fullURI);
method.setRequestHeader("Accept", "application/rdf+xml");
client.executeMethod(method);
- method.getResponseBodyAsString(); // without this things will fail??
+ String result = method.getResponseBodyAsString(); // without this things will fail??
IRDFStore store = rdf.createInMemoryStore();
rdf.importFromStream(store, method.getResponseBodyAsStream(), "RDF/XML", null);
method.releaseConnection();
+ String dump = rdf.asRDFN3(store);
return rdf.sparql(store, QUERY_PREDICTED_FEATURES);
}

0 comments on commit dd68f71

Please sign in to comment.