public abstract class InlineLocalNameIntegerURIHandler extends InlineSignedIntegerURIHandler
http://rdf.ncbi.nlm.nih.gov/pubchem/descriptor/
descriptor:CID5606223_Compound_Identifier ,
descriptor:CID5606223_Covalent_Unit_Count ,
descriptor:CID5606223_Defined_Atom_Stereo_Count ,
Each of these can be supported as a different InlinePrefixedSuffixedIntegerURIHandler
at the
namespace http://rdf.ncbi.nlm.nih.gov/pubchem/descriptor/.
It current supports up to 32 different inline values for a single namespace URI. It is used
in conjunction with the InlineIntegerURIHandlerMap
.
For an example, see com.blazegraph.vocab.pubchem.PubchemInlineURIFactory
.
The max inline integer value that can supported in this scheme is 2^57 - 1, which is 2^5 less
than the Java Long.MAX_VALUE
.Modifier and Type | Field and Description |
---|---|
protected int |
packedId
The ID to pack.
|
namespaceIV
Constructor and Description |
---|
InlineLocalNameIntegerURIHandler(String namespace) |
InlineLocalNameIntegerURIHandler(String namespace,
int packedId) |
Modifier and Type | Method and Description |
---|---|
String |
getPackedValueString(String intVal)
Convenience method to take an Integer string value, pack it, and convert back to a string.
|
long |
getUnpackedValueFromString(String s)
Convenience method to unpack a long value from a string.
|
String |
getUnpackedValueString(String s)
Convenience method for unpacking a value from a string.
|
long |
packValue(long value)
Pack the value with the leading 5 bits used to encode the
id used for decoding the inline URI handler.
|
int |
unpackId(long packedVal)
Take a packed long and extract the ID.
|
int |
unpackId(String s)
Convenience method to get the packed ID value from an
input
String . |
long |
unpackValue(long packedVal)
Take a packed long and extract the value.
|
createInlineIV, createInlineIV, createInlineIV
createInlineIV, getLocalNameFromDelegate, getNamespace, init
public InlineLocalNameIntegerURIHandler(String namespace)
public InlineLocalNameIntegerURIHandler(String namespace, int packedId)
public long packValue(long value)
value
- public String getPackedValueString(String intVal)
intVal
- public String getUnpackedValueString(String s)
s
- public long getUnpackedValueFromString(String s)
s
- public long unpackValue(long packedVal)
packedVal
- public int unpackId(String s)
String
.s
- public int unpackId(long packedVal)
packedVal
- Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.