public class LexiconKeyBuilder extends Object implements ITermIndexCodes
Value
s and term identifiers. In general,
keys for RDF values are formed by a leading byte that indicates the type of
the value (URI, BNode, or some type of Literal), followed by the components
of that value type.Modifier and Type | Field and Description |
---|---|
IKeyBuilder |
keyBuilder |
TERM_CODE_BND, TERM_CODE_DTL, TERM_CODE_LCL, TERM_CODE_LIT, TERM_CODE_URI
Modifier | Constructor and Description |
---|---|
protected |
LexiconKeyBuilder(IKeyBuilder keyBuilder)
Normally invoked by
Term2IdTupleSerializer.getLexiconKeyBuilder() |
Modifier and Type | Method and Description |
---|---|
byte[] |
blankNode2Key(String id) |
byte[] |
datatypeLiteral2key(org.openrdf.model.URI datatype,
String value)
Formats a datatype literal sort key.
|
byte[] |
languageCodeLiteral2key(String languageCode,
String text)
Note: The language code is serialized as US-ASCII UPPER CASE for the
purposes of defining the total key ordering.
|
byte[] |
plainLiteral2key(String text) |
byte[] |
uri2key(String uri)
Returns the sort key for the URI.
|
byte[] |
value2Key(org.openrdf.model.Value value)
Return an unsigned byte[] that locates the value within a total ordering
over the RDF value space.
|
public final IKeyBuilder keyBuilder
protected LexiconKeyBuilder(IKeyBuilder keyBuilder)
Term2IdTupleSerializer.getLexiconKeyBuilder()
keyBuilder
- The IKeyBuilder
that will determine the distinctions
and sort order among the rdf Value
s. In general, this
should support Unicode and should use
StrengthEnum.Identical
so that all distinctions in the
Value
space are recognized by the lexicon.IKeyBuilder
,
IKeyBuilderFactory
public byte[] uri2key(String uri)
uri
- The URI.public byte[] plainLiteral2key(String text)
public byte[] languageCodeLiteral2key(String languageCode, String text)
Literal.getLanguage()
public byte[] datatypeLiteral2key(org.openrdf.model.URI datatype, String value)
datatype
- value
- public byte[] blankNode2Key(String id)
public byte[] value2Key(org.openrdf.model.Value value)
value
- An RDF value.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.