Skip to content

Commit

Permalink
I think this corrects #335
Browse files Browse the repository at this point in the history
There is a method in the GPAD sparql export that gathers model annotations such as state.  This was getting confused because, at that point in the code, the RDF for the model also contains the RDF for all the Arachne rules.  See comment in CoreMMM .
  • Loading branch information
goodb committed Aug 5, 2020
1 parent 7304c44 commit 0876442
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ private Map<String, String> getModelAnnotations(Model model) {
Map<String, String> modelAnnotations = new HashMap<>();
while (result.hasNext()) {
QuerySolution qs = result.next();
//"http://therules.org"
if (qs.get("model_state") != null) {
String modelState = qs.getLiteral("model_state").getLexicalForm();
modelAnnotations.put("model-state", modelState);
Expand All @@ -202,7 +203,7 @@ private Map<String, String> getModelAnnotations(Model model) {
String providedBy = qs.getLiteral("provided_by").getLexicalForm();
modelAnnotations.put("assigned-by", providedBy);
}
break;
//break;
}
return modelAnnotations;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ public WorkingMemory createInferredModel(OWLOntology abox, IRI modelId) {
// Using model's ontology IRI so that a spurious different ontology declaration triple isn't added
// OWLOntology schemaOntology = OWLManager.createOWLOntologyManager().createOntology(getOntology().getRBoxAxioms(Imports.INCLUDED), modelId);
// I think the re-use of the model IRI as the IRI of the rule ontology has some weird effects on the model in question, rendering its contents inaccesible.
//this influences GPAD export
OWLOntologyManager tmp_man = OWLManager.createOWLOntologyManager();
OWLOntology schemaOntology = tmp_man.createOntology(IRI.create("http://therules.org"));
Set<OWLAxiom> owl_rules = getOntology().getRBoxAxioms(Imports.INCLUDED);
Expand Down

0 comments on commit 0876442

Please sign in to comment.