com.bigdata.rdf.vocab
Interface Vocabulary

All Known Implementing Classes:
BaseVocabulary, BSBMVocabulary, LUBMVocabulary, NoVocabulary, RDFSVocabulary, SampleVocab

public interface Vocabulary

Interface for a pre-defined vocabulary.

Version:
$Id: Vocabulary.java 4642 2011-06-08 17:38:38Z thompsonbry $
Author:
Bryan Thompson

Method Summary
 Value 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.
 int size()
          The #of defined Values.
 Iterator<? extends Value> values()
          The Values in an arbitrary order.
 

Method Detail

getNamespace

String getNamespace()
The namespace of the owning LexiconRelation.

Returns:

size

int size()
The #of defined Values.

Throws:
IllegalStateException - if the values have not been defined.

values

Iterator<? extends Value> values()
The Values in an arbitrary order.

Throws:
IllegalStateException - if the values have not been defined.

get

IV get(Value value)
The term identifier for the pre-defined Value.

Parameters:
value - The value.
Returns:
The IV for that Value -or- null if the Value was not defined by this Vocabulary.

getConstant

IConstant<IV> getConstant(Value value)
Returns the IConstant for the Value.

Parameters:
value - The value.
Returns:
The IConstant.
Throws:
IllegalArgumentException - if that Value is not defined for this vocabulary.

asValue

Value asValue(IV iv)
Reverse lookup of an IV defined by this vocabulary.

Parameters:
iv - The IV.
Returns:
The BigdataValue -or- null if the IV was not defined by the vocabulary.
Since:
TERMS_REFACTOR_BRANCH


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.