|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rdf.vocab.BaseVocabulary
public abstract class BaseVocabulary
Base class for Vocabulary implementations.
| Nested Class Summary | |
|---|---|
static class |
BaseVocabulary.VocabularyVersioningException
An instance of this class indicates a versioning problem with the declaration classes. |
| Constructor Summary | |
|---|---|
protected |
BaseVocabulary()
De-serialization ctor. |
protected |
BaseVocabulary(String namespace)
Ctor used by AbstractTripleStore.create(). |
| Method Summary | |
|---|---|
protected void |
addDecl(VocabularyDecl decl)
Add a declared vocabulary. |
protected abstract void |
addValues()
Hook for subclasses to provide their VocabularyDecls using
addDecl(VocabularyDecl). |
BigdataValue |
asValue(IV iv)
Reverse lookup of an IV defined by this vocabulary. |
IV |
get(Value value)
The term identifier for the pre-defined Value. |
IConstant<IV> |
getConstant(Value value)
Returns the IConstant for the Value. |
String |
getNamespace()
The namespace of the owning LexiconRelation. |
void |
init()
Invoked by AbstractTripleStore.create() to initialize the
Vocabulary. |
void |
readExternal(ObjectInput in)
Note: The de-serialized state contains Values but not
BigdataValues since the AbstractTripleStore reference is
not available and we can not obtain the appropriate
BigdataValueFactory instance without it. |
int |
size()
The #of defined Values. |
Iterator<BigdataValue> |
values()
The Values in an arbitrary order. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected BaseVocabulary()
protected BaseVocabulary(String namespace)
AbstractTripleStore.create().
database - The database.| Method Detail |
|---|
public final void init()
AbstractTripleStore.create() to initialize the
Vocabulary.
IllegalStateException - if init() has already been invoked.protected abstract void addValues()
VocabularyDecls using
addDecl(VocabularyDecl).
protected final void addDecl(VocabularyDecl decl)
decl - The vocabulary declaration.public final String getNamespace()
VocabularyLexiconRelation.
getNamespace in interface Vocabularypublic final int size()
VocabularyValues.
size in interface Vocabularypublic final Iterator<BigdataValue> values()
VocabularyValues in an arbitrary order.
values in interface Vocabularypublic final BigdataValue asValue(IV iv)
VocabularyIV defined by this vocabulary.
asValue in interface Vocabularyiv - The IV.
BigdataValue -or- null if the IV
was not defined by the vocabulary.public final IV get(Value value)
VocabularyValue.
get in interface Vocabularyvalue - The value.
IV for that Value -or- null if
the Value was not defined by this Vocabulary.public final IConstant<IV> getConstant(Value value)
VocabularyIConstant for the Value.
getConstant in interface Vocabularyvalue - The value.
IConstant.
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
Values but not
BigdataValues since the AbstractTripleStore reference is
not available and we can not obtain the appropriate
BigdataValueFactory instance without it. This should not matter
since the only access to the Values is via get(Value)
and getConstant(Value).
readExternal in interface ExternalizableIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizableIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||