public class BigdataStatementImpl extends Object implements BigdataStatement
true for
AbstractTripleStore#isStatement(IV). When used to model a quad, the
4th position will be a BigdataValue but its term identifier will
report false for AbstractTripleStore#isStatement(IV).
Note: The ctors are intentionally protected. Use the
BigdataValueFactory to create instances of this class - it will
ensure that term identifiers are propagated iff the backing lexicon is the
same.
| Constructor and Description |
|---|
BigdataStatementImpl(BigdataResource subject,
BigdataURI predicate,
BigdataValue object,
BigdataResource context,
StatementEnum type,
boolean userFlag)
Used by
BigdataValueFactory |
| Modifier and Type | Method and Description |
|---|---|
IV |
c()
The term identifier for the SID/context position (slot 3) -or-
#NULL. |
boolean |
equals(Object o) |
boolean |
equals(org.openrdf.model.Statement stmt)
Note: implementation per
Statement interface, which specifies
that only the (s,p,o) positions are to be considered. |
IV |
get(int index)
Return the s,p,o, or c value corresponding to the given index.
|
BigdataResource |
getContext()
Specialized return type.
|
ModifiedEnum |
getModified()
Return the state of the transient modified flag.
|
BigdataValue |
getObject()
Specialized return type.
|
BigdataURI |
getPredicate()
Specialized return type.
|
IV |
getStatementIdentifier()
The statement identifier (optional).
|
StatementEnum |
getStatementType()
|
BigdataResource |
getSubject()
Specialized return type.
|
boolean |
getUserFlag()
Return
true IFF the SPO user flag is set |
int |
hashCode()
Note: implementation per Statement interface, which does not consider the
context position.
|
boolean |
hasStatementIdentifier()
|
boolean |
hasStatementType()
Return
true iff the statement type is known. |
boolean |
isAxiom()
true if the statement is an axiom that is not present as
an explicit assertion. |
boolean |
isExplicit()
true if the statement is an explicit assertion. |
boolean |
isFullyBound()
Return true iff all position (s,p,o) are non-
#NULL. |
boolean |
isInferred()
true if the statement is an inference that is not present
as an explicit assertion or an axiom. |
boolean |
isModified() |
boolean |
isOverride()
When
true the statement will be written onto the database
with exactly its current ISPO.getStatementType() (default
false). |
IV |
o()
The term identifier for the object position (slot 2) -or-
#NULL. |
IV |
p()
The term identifier for the predicate position (slot 1) -or-
#NULL. |
IV |
s()
The term identifier for the subject position (slot 0) -or-
#NULL. |
void |
setModified(ModifiedEnum modified)
Set a transient flag indicating whether or not the persistent state of
the statement was modified when it was last written onto the database.
|
void |
setOverride(boolean override)
Set the override flag.
|
void |
setStatementType(StatementEnum type)
Set the statement type for this statement.
|
void |
setUserFlag(boolean userFlag)
Set
SPO user flag |
String |
toString() |
String |
toString(IRawTripleStore storeIsIgnored)
Note: this implementation is equivalent to
toString() since the
Values are already resolved. |
public BigdataStatementImpl(BigdataResource subject, BigdataURI predicate, BigdataValue object, BigdataResource context, StatementEnum type, boolean userFlag)
BigdataValueFactorypublic final BigdataResource getSubject()
BigdataStatementgetSubject in interface BigdataStatementgetSubject in interface org.openrdf.model.Statementpublic final BigdataURI getPredicate()
BigdataStatementgetPredicate in interface BigdataStatementgetPredicate in interface org.openrdf.model.Statementpublic final BigdataValue getObject()
BigdataStatementgetObject in interface BigdataStatementgetObject in interface org.openrdf.model.Statementpublic final BigdataResource getContext()
BigdataStatementgetContext in interface BigdataStatementgetContext in interface org.openrdf.model.Statementpublic final boolean hasStatementType()
ISPOtrue iff the statement type is known.
true iff the statement type is known for this statement.hasStatementType in interface ISPOpublic final StatementEnum getStatementType()
ISPOgetStatementType in interface ISPOStatementEnum type -or- null if the
statement type has not been specified.public final void setStatementType(StatementEnum type)
ISPOsetStatementType in interface ISPOtype - The statement type.public final void setUserFlag(boolean userFlag)
ISPOSPO user flagsetUserFlag in interface ISPOpublic final boolean isAxiom()
BigdataStatementtrue if the statement is an axiom that is not present as
an explicit assertion.isAxiom in interface BigdataStatementisAxiom in interface ISPOpublic final boolean isInferred()
BigdataStatementtrue if the statement is an inference that is not present
as an explicit assertion or an axiom.isInferred in interface BigdataStatementisInferred in interface ISPOpublic final boolean isExplicit()
BigdataStatementtrue if the statement is an explicit assertion.isExplicit in interface BigdataStatementisExplicit in interface ISPOpublic final boolean getUserFlag()
ISPOtrue IFF the SPO user flag is setgetUserFlag in interface ISPOpublic boolean equals(Object o)
public boolean equals(org.openrdf.model.Statement stmt)
Statement interface, which specifies
that only the (s,p,o) positions are to be considered.public final int hashCode()
public final IV s()
ISPO#NULL.public final IV p()
ISPO#NULL.public final IV o()
ISPO#NULL.public final IV c()
ISPO#NULL. The semantics of the returned value depend on the database
mode. For triples, it is unused. For triples+SIDs, it is the statement
identifier as assigned by the lexicon. For quads, it is the context (aka
named graph) and #NULL iff the context was not bound.public IV get(int index)
ISPOpublic final boolean isFullyBound()
ISPO#NULL.
Note: SPOs are sometimes used to represent triple patterns, e.g.,
in the tail of a Justification. This method will return
true if the "triple pattern" is fully bound and
false if there are any unbound positions.
Note: BigdataStatements are not fully bound when they are
instantiated during parsing until their term identifiers have been
resolved against a database's lexicon.
isFullyBound in interface ISPOpublic final IV getStatementIdentifier()
ISPOISPO.c(), but will throw an exception if the 4th position is not
bound.
Statement identifiers are a unique per-triple identifier assigned when a
statement is first asserted against the database and are are defined iff
AbstractTripleStore.Options#STATEMENT_IDENTIFIERS was specified.
getStatementIdentifier in interface ISPOpublic final boolean hasStatementIdentifier()
ISPOhasStatementIdentifier in interface ISPOpublic final boolean isOverride()
ISPOtrue the statement will be written onto the database
with exactly its current ISPO.getStatementType() (default
false).
Note: This feature is used by TruthMaintenance when we need to
downgrade an ISPO from "Explicit" to "Inferred". Normally, a
statement is automatically upgraded from "Inferred" to "Explicit" so
without ISPO.setOverride(boolean) you could not downgrade the
StatementEnum in the database without first deleting the
statement (which would also delete its justifications).
isOverride in interface ISPOpublic final void setOverride(boolean override)
ISPOsetOverride in interface ISPOoverride - the new value.public String toString(IRawTripleStore storeIsIgnored)
toString() since the
Values are already resolved.public boolean isModified()
isModified in interface ISPOpublic void setModified(ModifiedEnum modified)
ISPOStatementEnum in the database updated.setModified in interface ISPOpublic ModifiedEnum getModified()
ISPOStatementEnum in the database updated.getModified in interface ISPOCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.