Class ValueIds
java.lang.Object
org.eclipse.rdf4j.sail.lmdb.ValueIds
Constants and functions for working with ids encoded into long values.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intReference to a blank nodestatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intAn inlined double value.static final intstatic final intstatic final intstatic final intReference to a literalstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intPointer to an arbitrary value in the value store.static final intstatic final intstatic final intReference to a triplestatic final intstatic final intstatic final intstatic final intstatic final intReference to a URI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longcreateId(int idType, long value) Combines an id type and a value into a single long id.static intgetIdType(long id) Returns the type section of the given id.static longgetValue(long id) Returns the value section of the given id.static booleanisDouble(long value) Tests if the given id is an inlined double value, which is identified by the least significant bit being set to 1.static booleanisInlined(long id) Tests if the given id is an inlined value or a reference.
-
Field Details
-
T_DOUBLE
public static final int T_DOUBLEAn inlined double value. The least significant bit of the value is set to 1 to distinguish it from other inlined values and references.- See Also:
-
T_PTR
public static final int T_PTRPointer to an arbitrary value in the value store. This is not used as RDF value.- See Also:
-
T_URI
public static final int T_URIReference to a URI- See Also:
-
T_LITERAL
public static final int T_LITERALReference to a literal- See Also:
-
T_BNODE
public static final int T_BNODEReference to a blank node- See Also:
-
T_TRIPLE
public static final int T_TRIPLEReference to a triple- See Also:
-
T_INTEGER
public static final int T_INTEGER- See Also:
-
T_DECIMAL
public static final int T_DECIMAL- See Also:
-
T_FLOAT
public static final int T_FLOAT- See Also:
-
T_DATETIME
public static final int T_DATETIME- See Also:
-
T_DATETIMESTAMP
public static final int T_DATETIMESTAMP- See Also:
-
T_DATE
public static final int T_DATE- See Also:
-
T_BOOLEAN
public static final int T_BOOLEAN- See Also:
-
T_SHORTSTRING
public static final int T_SHORTSTRING- See Also:
-
T_POSITIVE_INTEGER
public static final int T_POSITIVE_INTEGER- See Also:
-
T_NEGATIVE_INTEGER
public static final int T_NEGATIVE_INTEGER- See Also:
-
T_NON_NEGATIVE_INTEGER
public static final int T_NON_NEGATIVE_INTEGER- See Also:
-
T_NON_POSITIVE_INTEGER
public static final int T_NON_POSITIVE_INTEGER- See Also:
-
T_LONG
public static final int T_LONG- See Also:
-
T_INT
public static final int T_INT- See Also:
-
T_SHORT
public static final int T_SHORT- See Also:
-
T_BYTE
public static final int T_BYTE- See Also:
-
T_UNSIGNEDLONG
public static final int T_UNSIGNEDLONG- See Also:
-
T_UNSIGNEDINT
public static final int T_UNSIGNEDINT- See Also:
-
T_UNSIGNEDSHORT
public static final int T_UNSIGNEDSHORT- See Also:
-
T_UNSIGNEDBYTE
public static final int T_UNSIGNEDBYTE- See Also:
-
-
Constructor Details
-
ValueIds
public ValueIds()
-
-
Method Details
-
getIdType
public static int getIdType(long id) Returns the type section of the given id.- Parameters:
id- The id of which the type should be extracted.- Returns:
- The id's type.
-
getValue
public static long getValue(long id) Returns the value section of the given id.- Parameters:
id- The id of which the value should be extracted.- Returns:
- The id's value.
-
createId
public static long createId(int idType, long value) Combines an id type and a value into a single long id.- Parameters:
idType- The id's type.value- The id's value.- Returns:
- A composite id.
-
isInlined
public static boolean isInlined(long id) Tests if the given id is an inlined value or a reference.- Parameters:
id- The id to test- Returns:
trueif the value is inlined, elsefalse
-
isDouble
public static boolean isDouble(long value) Tests if the given id is an inlined double value, which is identified by the least significant bit being set to 1.- Parameters:
value- The id's value- Returns:
trueif the value is an inlined double, elsefalse
-