|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.DefaultTupleSerializer
com.bigdata.rdf.lexicon.Term2IdTupleSerializer
public class Term2IdTupleSerializer
Handles the term:id index (forward mapping for the lexicon). The keys are
unsigned byte[]s representing a total order for the RDF Value space.
The index assigns term identifiers, and those term identifiers are stored in
the values of the index.
| Constructor Summary | |
|---|---|
Term2IdTupleSerializer()
De-serialization ctor. |
|
Term2IdTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
Uses the caller's IKeyBuilderFactory. |
|
Term2IdTupleSerializer(Properties properties)
Configures the IKeyBuilderFactory from the caller's properties. |
|
| Method Summary | |
|---|---|
IV |
deserialize(ITuple tuple)
De-serializes the ITuple as a IV whose value is the
term identifier associated with the key. |
Object |
deserializeKey(ITuple tuple)
You can not decode the term:id keys since they include Unicode sort keys and that is a lossy transform. |
LexiconKeyBuilder |
getLexiconKeyBuilder()
Thread-local object for constructing keys for the lexicon. |
void |
readExternal(ObjectInput in)
|
byte[] |
serializeKey(Object obj)
Return the unsigned byte[] key for an RDF Value. |
byte[] |
serializeVal(Object obj)
Return the byte[] value, which is a term identifier written as a packed long integer. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class com.bigdata.btree.DefaultTupleSerializer |
|---|
getDefaultKeyBuilderFactory, getDefaultLeafKeysCoder, getDefaultValuesCoder, getKeyBuilder, getLeafKeysCoder, getLeafValuesCoder, newInstance, setLeafKeysCoder, setLeafValuesCoder, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Term2IdTupleSerializer()
public Term2IdTupleSerializer(Properties properties)
IKeyBuilderFactory from the caller's properties.
properties - public Term2IdTupleSerializer(IKeyBuilderFactory keyBuilderFactory)
IKeyBuilderFactory.
keyBuilderFactory - | Method Detail |
|---|
public LexiconKeyBuilder getLexiconKeyBuilder()
public Object deserializeKey(ITuple tuple)
deserializeKey in interface ITupleSerializerdeserializeKey in class DefaultTupleSerializerUnsupportedOperationException - alwayspublic byte[] serializeKey(Object obj)
Value.
serializeKey in interface ITupleSerializerserializeKey in class DefaultTupleSerializerobj - The RDF Value.
null (
null keys are not allowed into an index).public byte[] serializeVal(Object obj)
serializeVal in interface ITupleSerializerserializeVal in class DefaultTupleSerializerobj - A term identifier expressed as a TermId.
null if the reference is null.public IV deserialize(ITuple tuple)
ITuple as a IV whose value is the
term identifier associated with the key. The key itself is not decodable.
deserialize in interface ITupleSerializerdeserialize in class DefaultTupleSerializertuple - The tuple.
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class DefaultTupleSerializerIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class DefaultTupleSerializerIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||