various minor improvements
This commit is contained in:
parent
aad1f023cc
commit
3a5fa4c551
3 changed files with 12 additions and 4 deletions
|
@ -226,7 +226,8 @@ public abstract class RDFServiceJena extends RDFServiceImpl implements RDFServic
|
|||
}
|
||||
}
|
||||
if (subjQueue.isEmpty()) {
|
||||
throw new RuntimeException("No named subject in statement patterns");
|
||||
log.warn("No named subject in statement patterns");
|
||||
return stmts;
|
||||
}
|
||||
while(remaining.size() > 0) {
|
||||
if(subjQueue.isEmpty()) {
|
||||
|
|
|
@ -295,7 +295,8 @@ public class ABoxRecomputer {
|
|||
*/
|
||||
protected Collection<String> getAllIndividualURIs() {
|
||||
|
||||
String queryString = "select ?s where {?s a ?type}";
|
||||
String queryString = "SELECT DISTINCT ?s WHERE { GRAPH ?g { ?s a ?type } " +
|
||||
" FILTER (!bound(?g) || !regex(str(?g),\"tbox\")) } ORDER BY ?s";
|
||||
return getIndividualURIs(queryString);
|
||||
}
|
||||
|
||||
|
|
|
@ -82,8 +82,14 @@ public class ApplicationConfigurationOntologyUtils {
|
|||
String domainURI = (domainRes != null) ? domainRes.getURI() : null;
|
||||
String rangeURI = qsoln.getResource("range").getURI();
|
||||
if (appropriateDomain(domainRes, subject, tboxModel)) {
|
||||
additionalProps.add(opDao.getObjectPropertyByURIs(
|
||||
opURI, domainURI, rangeURI));
|
||||
ObjectProperty faux = opDao.getObjectPropertyByURIs(
|
||||
opURI, domainURI, rangeURI);
|
||||
if (faux != null) {
|
||||
additionalProps.add(faux);
|
||||
} else {
|
||||
log.error("Could not retrieve " + opURI + " qualified by " +
|
||||
" domain " + domainURI + " and range " + rangeURI);
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue