Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improved SPARQL query to include description, then commented it out, …

…added a FIXME and filed bug #1933 for egonw.
  • Loading branch information...
commit a3cf58dcca88495ca2c19302a41cb127ed207ebb 1 parent 20307dc
Ola Spjuth authored
14 plugins/net.bioclipse.qsar/src/net/bioclipse/qsar/business/OntologyHelper.java
View
@@ -118,8 +118,13 @@ public static DescriptorModel addDescriptorHierarchy(
"PREFIX dc: <http://purl.org/dc/elements/1.1/> " +
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> " +
"SELECT ?s ?label ?date ?definition WHERE { " +
+
+// FIXME: Why does not the below work? See bug 1933.
+// "SELECT ?s ?label ?date ?definition ?description WHERE { " +
+
" ?s ?p <" + identifier + ">;" +
" qsar:definition ?definition; " +
+// " qsar:description ?description; " +
" dc:date ?date; " +
" rdfs:label ?label." +
"}";
@@ -130,7 +135,13 @@ public static DescriptorModel addDescriptorHierarchy(
String descriptorID = descriptor.get(0);
String label = descriptor.get(1);
String date = descriptor.get(2);
- String definition = descriptor.get(3);
+ String definition = descriptor.get(3).trim();
+// String description = descriptor.get(4).trim();
+
+ if (definition.indexOf("^^")>0)
+ definition=definition.substring(0,definition.indexOf("^^"));
+// if (description.indexOf("^^")>0)
+// description=description.substring(0,description.indexOf("^^"));
// logger.debug(" " + descriptorID + " = " + label + "\n");
//Remove the starting qsar:
@@ -141,6 +152,7 @@ public static DescriptorModel addDescriptorHierarchy(
desc.addCategory(dcat);
desc.setDate(date);
desc.setDefinition( definition);
+// desc.setDescription(description);
dcat.addDescriptor(desc);
Please sign in to comment.
Something went wrong with that request. Please try again.