Skip to content

Commit

Permalink
LOV dependency #34 #39
Browse files Browse the repository at this point in the history
  • Loading branch information
jimkont committed Sep 26, 2015
1 parent e3b01f8 commit 26b99aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.aksw.rdfunit.utils;
package org.aksw.rdfunit.prefix;

/**
* Encapsulates an LOV Entry
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.aksw.rdfunit.utils;
package org.aksw.rdfunit.prefix;

import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.QuerySolution;
Expand Down Expand Up @@ -59,16 +59,16 @@ public static List<LOVEntry> getAllLOVEntries() {
while (rs.hasNext()) {
QuerySolution row = rs.next();

String prefix = row.get("vocabPrefix").toString();
String vocab = row.get("vocabURI").toString();
String ns = row.get("vocabNamespace").toString();
String prefix = row.get("vocabPrefix").asLiteral().getLexicalForm();
String vocab = row.get("vocabURI").asLiteral().getLexicalForm();
String ns = row.get("vocabNamespace").asLiteral().getLexicalForm();
String definedBy = ns; // default
if (ns == null || ns.isEmpty()) {
ns = vocab;
}

if (row.get("definedBy") != null) {
definedBy = row.get("definedBy").toString();
definedBy = row.get("definedBy").asLiteral().getLexicalForm();
}
lovEntries.add(new LOVEntry(prefix, vocab, ns, definedBy));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.aksw.rdfunit.utils;

import org.aksw.rdfunit.prefix.LOVEntry;
import org.aksw.rdfunit.prefix.LOVUtils;
import org.aksw.rdfunit.services.SchemaService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down

0 comments on commit 26b99aa

Please sign in to comment.