public interface InfModel extends Model
In Jena the primary use of inference is to generate additional entailments from a set of RDF data. These entailments just appear as additional RDF data in the inferred model and are accessed through the normal API. For example, if an inference engine can determine the class of a resource "foo" is "fooClass" then all Model API calls such as listStatements and getProperty should act as if the triple:
foo rdf:type fooClass .were in the data.
A few reasoner services cannot be made directly available in this way and the InfGraph extension gives access to these - specifically access to validation/consistency checking, derivation traces and find-with-posits.
Note that this interface, and especially the interface onto ValidityReports and Derivations are not yet stable.
PrefixMapping.Factory, PrefixMapping.IllegalPrefixException, PrefixMapping.JenaLockedException
Extended, Standard
Modifier and Type | Method and Description |
---|---|
Model |
getDeductionsModel()
Returns a derivations model.
|
Iterator<Derivation> |
getDerivation(Statement statement)
Return the derivation of the given statement (which should be the result of
some previous list operation).
|
Model |
getRawModel()
Return the raw RDF model being processed (i.e.
|
Reasoner |
getReasoner()
Return the Reasoner which is being used to answer queries to this graph.
|
StmtIterator |
listStatements(Resource subject,
Property predicate,
RDFNode object,
Model posit)
Find all the statements matching a pattern.
|
void |
prepare()
Perform any initial processing and caching.
|
void |
rebind()
Cause the inference model to reconsult the underlying data to take
into account changes.
|
void |
reset()
Reset any internal caches.
|
void |
setDerivationLogging(boolean logOn)
Switch on/off drivation logging.
|
ValidityReport |
validate()
Test the consistency of the underlying data.
|
abort, add, add, add, add, add, begin, calculateInTxn, clearNsPrefixMap, close, commit, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, containsResource, createList, createList, createList, createLiteral, createLiteral, createProperty, createReifiedStatement, createReifiedStatement, createResource, createResource, createResource, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, equals, executeInTransaction, executeInTxn, getAnyReifiedStatement, getLock, getProperty, getProperty, getProperty, getRequiredProperty, getRequiredProperty, getResource, independent, intersection, isClosed, isEmpty, isIsomorphicWith, isReified, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listReifiedStatements, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, notifyEvent, query, read, read, read, read, read, read, read, register, remove, remove, remove, removeAll, removeAll, removeAllReifications, removeNsPrefix, removeReification, setNsPrefix, setNsPrefixes, setNsPrefixes, size, supportsSetOperations, supportsTransactions, union, unregister, withDefaultMappings, write, write, write, write, write, write
add, add, add, add, add, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, contains, contains, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, createAlt, createAlt, createBag, createBag, createLiteral, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createProperty, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, getAlt, getAlt, getBag, getBag, getList, getList, getProperty, getRDFNode, getResource, getSeq, getSeq, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listSubjectsWithProperty, listSubjectsWithProperty, remove, remove, remove
asRDFNode, asStatement, getGraph, wrapAsResource
getReader, getReader, removeReader, resetRDFReaderF, setReaderClassName
getWriter, getWriter, removeWriter, resetRDFWriterF, setWriterClassName
expandPrefix, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, hasNoMappings, lock, numPrefixes, qnameFor, samePrefixMappingAs, shortForm
enterCriticalSection, leaveCriticalSection
Model getRawModel()
Reasoner getReasoner()
void rebind()
void prepare()
void reset()
ValidityReport validate()
Logically inconsistent models will be indicated by a ValidityReport which reports isValid() as false. Additional non.error problems, such as uninstantiatable classes, may be reported as warnings.
StmtIterator listStatements(Resource subject, Property predicate, RDFNode object, Model posit)
Return an iterator over all the statements in a model
that match a pattern. The statements selected are those
whose subject matches the subject
argument,
whose predicate matches the predicate
argument
and whose object matchesthe object
argument.
If an argument is null
it matches anything.
The s/p/o terms may refer to resources which are temporarily defined in the "posit" model. This allows one, for example, to query what resources are of type CE where CE is a class expression rather than a named class - put CE in the posit arg.
subject
- The subject soughtpredicate
- The predicate soughtobject
- The value soughtvoid setDerivationLogging(boolean logOn)
Iterator<Derivation> getDerivation(Statement statement)
Derviation
Model getDeductionsModel()
Licenced under the Apache License, Version 2.0