com.bigdata.rdf.internal
Class LexiconConfiguration<V extends BigdataValue>

java.lang.Object
  extended by com.bigdata.rdf.internal.LexiconConfiguration<V>
All Implemented Interfaces:
ILexiconConfiguration<V>

public class LexiconConfiguration<V extends BigdataValue>
extends Object
implements ILexiconConfiguration<V>

An object which describes which kinds of RDF Values are inlined into the statement indices and how other RDF Values are coded into the lexicon.

Version:
$Id$
Author:
Bryan Thompson

Constructor Summary
LexiconConfiguration(boolean inlineXSDDatatypeLiterals, boolean inlineTextLiterals, int maxInlineTextLength, boolean inlineBNodes, boolean inlineDateTimes, boolean rejectInvalidXSDValues, IExtensionFactory xFactory, Vocabulary vocab, BigdataValueFactory valueFactory)
           
 
Method Summary
 V asValue(LiteralExtensionIV<?> iv)
          Create an RDF value from an AbstractInlineExtensionIV.
 V asValueFromVocab(IV<?,?> iv)
          Return the Value for that IV iff the IV is declared in the Vocabulary.
 IV createInlineIV(Value value)
          Create an inline IV for the supplied RDF value if inlining is supported for the supplied RDF value.
 int getMaxInlineStringLength()
          Return the maximum length of a Unicode string which may be inlined into the statement indices.
 BigdataValueFactory getValueFactory()
          Return the value factory for the lexicon.
 void initExtensions(LexiconRelation lex)
          Initialize the extensions, which need to resolve their datatype URIs into term ids.
 boolean isInlineTextLiterals()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LexiconConfiguration

public LexiconConfiguration(boolean inlineXSDDatatypeLiterals,
                            boolean inlineTextLiterals,
                            int maxInlineTextLength,
                            boolean inlineBNodes,
                            boolean inlineDateTimes,
                            boolean rejectInvalidXSDValues,
                            IExtensionFactory xFactory,
                            Vocabulary vocab,
                            BigdataValueFactory valueFactory)
Method Detail

getValueFactory

public final BigdataValueFactory getValueFactory()
Description copied from interface: ILexiconConfiguration
Return the value factory for the lexicon.

Specified by:
getValueFactory in interface ILexiconConfiguration<V extends BigdataValue>

getMaxInlineStringLength

public int getMaxInlineStringLength()
Return the maximum length of a Unicode string which may be inlined into the statement indices. This applies to blank node IDs, literal labels (including the XSDStringExtension), local names of URIs, etc.

See Also:
AbstractTripleStore.Options#MAX_INLINE_TEXT_LENGTH

isInlineTextLiterals

public boolean isInlineTextLiterals()
See Also:
AbstractTripleStore.Options#INLINE_TEXT_LITERALS

toString

public String toString()
Overrides:
toString in class Object

initExtensions

public void initExtensions(LexiconRelation lex)
Description copied from interface: ILexiconConfiguration
Initialize the extensions, which need to resolve their datatype URIs into term ids.

Specified by:
initExtensions in interface ILexiconConfiguration<V extends BigdataValue>

asValue

public V asValue(LiteralExtensionIV<?> iv)
Description copied from interface: ILexiconConfiguration
Create an RDF value from an AbstractInlineExtensionIV. The "extension" IV MUST be registered with the Vocabulary.

For LiteralExtensionIV, this through an internal catalog of IExtensions to find one that knows how to handle the extension datatype from the supplied LiteralExtensionIV. This is the historical use case.

Specified by:
asValue in interface ILexiconConfiguration<V extends BigdataValue>
Parameters:
iv - the extension IV
Returns:
The RDF Value

asValueFromVocab

public V asValueFromVocab(IV<?,?> iv)
Description copied from interface: ILexiconConfiguration
Return the Value for that IV iff the IV is declared in the Vocabulary.

Specified by:
asValueFromVocab in interface ILexiconConfiguration<V extends BigdataValue>
Parameters:
iv - The IV.
Returns:
The Value -or- null if the IV was not declared in the Vocabulary.

createInlineIV

public IV createInlineIV(Value value)
Description copied from interface: ILexiconConfiguration
Create an inline IV for the supplied RDF value if inlining is supported for the supplied RDF value.

Note: If the supplied RDF value is a BigdataValue then the IV will be set as a side-effect and will be available from BigdataValue.getIV().

Specified by:
createInlineIV in interface ILexiconConfiguration<V extends BigdataValue>
Parameters:
value - The RDF value
Returns:
The inline IV -or- null if the Value can not be represented by an IV.


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