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
ConstructorsConstructorDescriptionLmdbLiteral(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 TypeMethodDescriptionbooleanCompares this literal to another object.CoreDatatype is an interface for natively supported datatypes in RDF4J.Gets the datatype for this literal.longGets 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.inthashCode()Computes the hash code of this literal.protected voidinit()voidsetDatatype(CoreDatatype coreDatatype) voidsetDatatype(IRI datatype) voidsetInternalID(long internalID, ValueStoreRevision revision) Sets the ID that is used for this value in a specific revision of the value store.voidvoidsetLanguage(String language) toString()protected ObjectMethods inherited from class org.eclipse.rdf4j.model.base.AbstractLiteral
booleanValue, byteValue, calendarValue, decimalValue, doubleValue, floatValue, integerValue, intValue, longValue, shortValue, stringValue, temporalAccessorValue, temporalAmountValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:LmdbValueSets the ID that is used for this value in a specific revision of the value store.- Specified by:
setInternalIDin interfaceLmdbValue
-
getValueStoreRevision
Description copied from interface:LmdbValueGets 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:
getValueStoreRevisionin 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:LmdbValueGets the ID that is used in the lmdb store for this Value.- Specified by:
getInternalIDin interfaceLmdbValue- Returns:
- The value's ID, or
LmdbValue.UNKNOWN_IDif not yet set.
-
getDatatype
Description copied from interface:LiteralGets 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:
getDatatypein interfaceLiteral- Returns:
- The datatype for this literal.
-
getCoreDatatype
Description copied from interface:LiteralCoreDatatype 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:
getCoreDatatypein 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:LiteralGets the label (the lexical value) of this literal. -
setLabel
-
getLanguage
Description copied from interface:LiteralGets the language tag for this literal, normalized to lower case.- Specified by:
getLanguagein 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:LiteralCompares this literal to another object.- Specified by:
equalsin interfaceLiteral- Overrides:
equalsin classAbstractLiteral- Parameters:
o- the object to compare this literal to- Returns:
true, if the other object is an instance ofLiteraland if their labels, language tags and datatypes are equal
-
hashCode
public int hashCode()Description copied from interface:LiteralComputes the hash code of this literal.- Specified by:
hashCodein interfaceLiteral- Overrides:
hashCodein classAbstractLiteral- Returns:
- a hash code for this literal computed as
Literal.getLabel().hashCode()
-
toString
- Overrides:
toStringin classAbstractLiteral
-
writeReplace
- Throws:
ObjectStreamException
-