convenience method for logging statement changes
This commit is contained in:
parent
f935249374
commit
63648a0d18
1 changed files with 8 additions and 0 deletions
|
@ -5,6 +5,7 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hp.hpl.jena.ontology.OntModel;
|
import com.hp.hpl.jena.ontology.OntModel;
|
||||||
|
import com.hp.hpl.jena.rdf.model.Literal;
|
||||||
import com.hp.hpl.jena.rdf.model.Model;
|
import com.hp.hpl.jena.rdf.model.Model;
|
||||||
import com.hp.hpl.jena.rdf.model.ModelFactory;
|
import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||||
import com.hp.hpl.jena.rdf.model.Property;
|
import com.hp.hpl.jena.rdf.model.Property;
|
||||||
|
@ -100,4 +101,11 @@ public class ABoxUpdater {
|
||||||
record.recordRetractions(renamePropRetractModel);
|
record.recordRetractions(renamePropRetractModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void logChange(Statement statement, boolean add) throws IOException {
|
||||||
|
logger.log( (add ? "Added " : "Removed") + "Statement: subject = " + statement.getSubject().getURI() +
|
||||||
|
" property = " + statement.getPredicate().getURI() +
|
||||||
|
" object = " + (statement.getObject().isLiteral() ? ((Resource)statement.getObject()).getURI() : ((Literal)statement.getObject()).getLexicalForm()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue