Class LmdbLiteral
java.lang.Object
org.eclipse.rdf4j.model.base.AbstractLiteral
org.eclipse.rdf4j.sail.lmdb.model.LmdbLiteral
- All Implemented Interfaces:
Serializable
,Literal
,Value
,LmdbValue
- See Also:
-
Field Summary
Fields inherited from interface org.eclipse.rdf4j.sail.lmdb.model.LmdbValue
UNKNOWN_ID
-
Constructor Summary
ConstructorDescriptionLmdbLiteral
(ValueStoreRevision revision, long internalID) LmdbLiteral
(ValueStoreRevision revision, String label, long internalID) LmdbLiteral
(ValueStoreRevision revision, String label, String lang) LmdbLiteral
(ValueStoreRevision revision, String label, String lang, long internalID) LmdbLiteral
(ValueStoreRevision revision, String label, CoreDatatype datatype) LmdbLiteral
(ValueStoreRevision revision, String label, CoreDatatype coreDatatype, long internalID) LmdbLiteral
(ValueStoreRevision revision, String label, IRI datatype) LmdbLiteral
(ValueStoreRevision revision, String label, IRI datatype, long internalID) LmdbLiteral
(ValueStoreRevision revision, String label, IRI datatype, CoreDatatype coreDatatype) LmdbLiteral
(ValueStoreRevision revision, String label, IRI datatype, CoreDatatype coreDatatype, long internalID) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this literal to another object.CoreDatatype is an interface for natively supported datatypes in RDF4J.Gets the datatype for this literal.long
Gets the ID that is used in the lmdb store for this Value.getLabel()
Gets the label (the lexical value) of this literal.Gets the language tag for this literal, normalized to lower case.Gets the revision of the value store that created this value.int
hashCode()
Computes the hash code of this literal.protected void
init()
void
setDatatype
(CoreDatatype coreDatatype) void
setDatatype
(IRI datatype) void
setInternalID
(long internalID, ValueStoreRevision revision) Sets the ID that is used for this value in a specific revision of the value store.void
void
setLanguage
(String language) toString()
protected Object
Methods inherited from class org.eclipse.rdf4j.model.base.AbstractLiteral
booleanValue, byteValue, calendarValue, decimalValue, doubleValue, floatValue, integerValue, intValue, longValue, shortValue, stringValue, temporalAccessorValue, temporalAmountValue
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.model.Value
isBNode, isIRI, isResource, isTriple, stringValue
-
Constructor Details
-
LmdbLiteral
-
LmdbLiteral
-
LmdbLiteral
-
LmdbLiteral
-
LmdbLiteral
-
LmdbLiteral
public LmdbLiteral(ValueStoreRevision revision, String label, IRI datatype, CoreDatatype coreDatatype) -
LmdbLiteral
-
LmdbLiteral
-
LmdbLiteral
public LmdbLiteral(ValueStoreRevision revision, String label, IRI datatype, CoreDatatype coreDatatype, long internalID) -
LmdbLiteral
public LmdbLiteral(ValueStoreRevision revision, String label, CoreDatatype coreDatatype, long internalID)
-
-
Method Details
-
setInternalID
Description copied from interface:LmdbValue
Sets the ID that is used for this value in a specific revision of the value store.- Specified by:
setInternalID
in interfaceLmdbValue
-
getValueStoreRevision
Description copied from interface:LmdbValue
Gets the revision of the value store that created this value. The value's internal ID is only valid when it's value store revision is equal to the value store's current revision.- Specified by:
getValueStoreRevision
in interfaceLmdbValue
- Returns:
- The revision of the value store that created this value at the time it last set the value's internal ID.
-
getInternalID
public long getInternalID()Description copied from interface:LmdbValue
Gets the ID that is used in the lmdb store for this Value.- Specified by:
getInternalID
in interfaceLmdbValue
- Returns:
- The value's ID, or
LmdbValue.UNKNOWN_ID
if not yet set.
-
getDatatype
Description copied from interface:Literal
Gets the datatype for this literal.If
Literal.getLanguage()
returns a non-empty value than this must returnrdf:langString
. If no datatype was assigned to this literal by the creator, then this method must returnxsd:string
.- Specified by:
getDatatype
in interfaceLiteral
- Returns:
- The datatype for this literal.
-
getCoreDatatype
Description copied from interface:Literal
CoreDatatype is an interface for natively supported datatypes in RDF4J. This includes, among others, the XML Schema datatypes and rdf:langString. CoreDatatypes are implemented as enums and more performant and convenient to work with than IRI-based datatypes. The constant {@link CoreDatatype#NONE)} is used to represent a datatype that is not one of the supported core datatypes.- Specified by:
getCoreDatatype
in interfaceLiteral
- Returns:
- The CoreDatatype or {@link CoreDatatype#NONE)} if the datatype matches none of the core datatypes. This method will not return null.
-
setDatatype
-
setDatatype
-
getLabel
Description copied from interface:Literal
Gets the label (the lexical value) of this literal. -
setLabel
-
getLanguage
Description copied from interface:Literal
Gets the language tag for this literal, normalized to lower case.- Specified by:
getLanguage
in interfaceLiteral
- Returns:
- The language tag for this literal, or
Optional.empty()
if it doesn't have one.
-
setLanguage
-
init
protected void init() -
equals
Description copied from interface:Literal
Compares this literal to another object.- Specified by:
equals
in interfaceLiteral
- Overrides:
equals
in classAbstractLiteral
- Parameters:
o
- the object to compare this literal to- Returns:
true
, if the other object is an instance ofLiteral
and if their labels, language tags and datatypes are equal
-
hashCode
public int hashCode()Description copied from interface:Literal
Computes the hash code of this literal.- Specified by:
hashCode
in interfaceLiteral
- Overrides:
hashCode
in classAbstractLiteral
- Returns:
- a hash code for this literal computed as
Literal.getLabel()
.hashCode()
-
toString
- Overrides:
toString
in classAbstractLiteral
-
writeReplace
- Throws:
ObjectStreamException
-