public abstract class BaseAxioms extends Object implements Axioms, Externalizable
Axioms are generated by AbstractTripleStore.create()
based on
its configured properties. While the implementation class declares axioms in
terms of RDF Value
s, the BaseAxioms
only retains the set of
{s:p:o} tuples for the term identifiers corresponding those those
Value
s. That {s:p:o} tuple array is the serialized state of this
class. When an AbstractTripleStore
is reopened, the axioms are
de-serialized from a property in the global row store.
Modifier | Constructor and Description |
---|---|
protected |
BaseAxioms()
De-serialization constructor.
|
protected |
BaseAxioms(String namespace)
Ctor variant used by
AbstractTripleStore.create() . |
Modifier and Type | Method and Description |
---|---|
protected void |
addAxioms(Collection<BigdataStatement> axioms)
Adds all axioms declared by this class into axioms.
|
Iterator<SPO> |
axioms()
The axioms in {s:p:o} order by their term identifiers.
|
String |
getNamespace()
The namespace of the owning
LexiconRelation . |
protected BigdataValueFactory |
getValueFactory()
The value factory to be used when creating axioms.
|
void |
init(AbstractTripleStore db)
Uses
addAxioms(Collection) to collect the declared axioms and
then writes the axioms onto the database specified to the
BaseAxioms#BaseAxioms(AbstractTripleStore) ctor. |
boolean |
isAxiom(IV s,
IV p,
IV o)
Test for an axiom.
|
void |
readExternal(ObjectInput in) |
int |
size()
The #of defined axioms.
|
void |
writeExternal(ObjectOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isNone, isOwlSameAs, isRdfSchema
protected BaseAxioms()
protected BaseAxioms(String namespace)
AbstractTripleStore.create()
.
Note: When de-serializing a BaseAxioms
object the zero-arg ctor
will be used.
namespace
- The namespace for the AbstractTripleStore
instance.public final String getNamespace()
Axioms
LexiconRelation
.getNamespace
in interface Axioms
protected final BigdataValueFactory getValueFactory()
IllegalStateException
- unless the ctor variant was used that specifies the database.public final void init(AbstractTripleStore db)
addAxioms(Collection)
to collect the declared axioms and
then writes the axioms onto the database specified to the
BaseAxioms#BaseAxioms(AbstractTripleStore)
ctor.IllegalStateException
- if that ctor was not used.protected void addAxioms(Collection<BigdataStatement> axioms)
Note: Subclasses MUST extend this method to add their axioms into the axioms collection.
axioms
- A collection into which the axioms will be inserted.IllegalArgumentException
- if the parameter is null
.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public final boolean isAxiom(IV s, IV p, IV o)
Axioms
public final int size()
Axioms
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.