java.lang.Object
org.apache.jena.rdf.model.impl.ModelReifier
This class impedance-matches the reification requests of Model[Com] to the operations
supplied by it's Graph's Reifier.
-
Constructor Summary
ConstructorsConstructorDescriptionModelReifier
(ModelCom model) establish the internal state of this ModelReifier: the associated Model[Com] and its graph's Reifier. -
Method Summary
Modifier and TypeMethodDescriptioncreateReifiedStatement
(String uri, Statement s) Answer a reification of a statement with a given uri.Answer a fresh reification of a statement associated with a fresh bnode.Find any existing reified statement that reifies a givem statement.boolean
Answer true iff a given statement is reified in this modelAnswer an iterator that iterates over all the reified statements in this model.Answer an iterator that iterates over all the reified statements in this model that reify a given statement.void
noteIfReified
(RDFNode s, RDFNode p, RDFNode o) the triple (s, p, o) has been asserted into the model.void
Remove all the reifications of a given statement in this model, whatever their associated resources.void
Remove a given reification from this model.
-
Constructor Details
-
ModelReifier
establish the internal state of this ModelReifier: the associated Model[Com] and its graph's Reifier.
-
-
Method Details
-
createReifiedStatement
Answer a fresh reification of a statement associated with a fresh bnode.- Parameters:
s
- a Statement to reifiy- Returns:
- a reified statement object who's name is a new bnode
-
createReifiedStatement
Answer a reification of a statement with a given uri. If that uri already reifies a distinct Statement, throw an AlreadyReifiedException.- Parameters:
uri
- the URI of the resource which will reifys
s
- the Statement to reify- Returns:
- a reified statement object associating
uri
withs
. - Throws:
AlreadyReifiedException
- if uri already reifies something else.
-
getAnyReifiedStatement
Find any existing reified statement that reifies a givem statement. If there isn't one, create one.- Parameters:
s
- a Statement for which to find [or create] a reification- Returns:
- a reification for s, re-using an existing one if possible
-
isReified
Answer true iff a given statement is reified in this model- Parameters:
s
- the statement for which a reification is sought- Returns:
- true iff s has a reification in this model
-
removeAllReifications
Remove all the reifications of a given statement in this model, whatever their associated resources.- Parameters:
s
- the statement whose reifications are to be removed
-
removeReification
Remove a given reification from this model. Other reifications of the same statement are untouched.- Parameters:
rs
- the reified statement to be removed
-
listReifiedStatements
Answer an iterator that iterates over all the reified statements in this model.- Returns:
- an iterator over all the reifications of the model.
-
listReifiedStatements
Answer an iterator that iterates over all the reified statements in this model that reify a given statement.- Parameters:
s
- the statement whose reifications are sought.- Returns:
- an iterator over the reifications of s.
-
noteIfReified
the triple (s, p, o) has been asserted into the model. Any reified statements among them need to be added to this model.
-