Class NativeLiteral
java.lang.Object
org.eclipse.rdf4j.model.base.AbstractLiteral
org.eclipse.rdf4j.model.impl.SimpleLiteral
org.eclipse.rdf4j.sail.nativerdf.model.NativeLiteral
- All Implemented Interfaces:
Serializable, Literal, Value, NativeValue
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface Value
Value.Type -
Field Summary
Fields inherited from interface NativeValue
UNKNOWN_ID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNativeLiteral(ValueStoreRevision revision, int internalID) NativeLiteral(ValueStoreRevision revision, String label) NativeLiteral(ValueStoreRevision revision, String label, int internalID) NativeLiteral(ValueStoreRevision revision, String label, String lang) NativeLiteral(ValueStoreRevision revision, String label, String lang, int internalID) NativeLiteral(ValueStoreRevision revision, String label, CoreDatatype datatype) NativeLiteral(ValueStoreRevision revision, String label, CoreDatatype datatype, int internalID) NativeLiteral(ValueStoreRevision revision, String label, IRI datatype) NativeLiteral(ValueStoreRevision revision, String label, IRI datatype, int internalID) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this literal to another object.intGets the ID that is used in the native store for this Value.Gets the revision of the value store that created this value.voidsetInternalID(int internalID, ValueStoreRevision revision) Sets the ID that is used for this value in a specific revision of the value store.Methods inherited from class SimpleLiteral
booleanValue, byteValue, calendarValue, decimalValue, doubleValue, floatValue, getCoreDatatype, getDatatype, getLabel, getLanguage, hashCode, integerValue, intValue, longValue, setDatatype, setDatatype, setDatatype, setLabel, setLanguage, shortValue, stringValue, toStringModifier and TypeMethodDescriptionbooleanReturns the boolean value of this literal.byteReturns the byte value of this literal.Returns theXMLGregorianCalendarvalue of this literal.Returns the decimal value of this literal.doubleReturns the double value of this literal.floatReturns the float value of this literal.CoreDatatype is an interface for natively supported datatypes in RDF4J.Gets the datatype for this literal.getLabel()Gets the label (the lexical value) of this literal.Gets the language tag for this literal, normalized to lower case.inthashCode()Computes the hash code of this literal.Returns the integer value of this literal.intintValue()Returns the int value of this literal.longReturns the long value of this literal.protected voidsetDatatype(CoreDatatype datatype) protected voidsetDatatype(IRI datatype) protected voidsetDatatype(IRI datatype, CoreDatatype coreDatatype) protected voidprotected voidsetLanguage(String language) shortReturns the short value of this literal.Returns the String-value of a Value object.toString()Returns the label of the literal with its language or datatype.Methods inherited from class AbstractLiteral
temporalAccessorValue, temporalAmountValueModifier and TypeMethodDescriptionRetrieves thetemporal accessorvalue of this literal.Retrieves thetemporal amountvalue of this literal.Methods inherited from interface Literal
getType, isLiteralModifier and TypeMethodDescriptiondefault Value.TypegetType()default booleanCheck if the object is an instance of the given type.Methods inherited from interface Value
isBNode, isIRI, isResource, isTripleModifier and TypeMethodDescriptiondefault booleanisBNode()Check if the object is an instance of the given type.default booleanisIRI()Check if the object is an instance of the given type.default booleanCheck if the object is an instance of the given type.default booleanisTriple()Check if the object is an instance of the given type.
-
Constructor Details
-
NativeLiteral
-
NativeLiteral
-
NativeLiteral
-
NativeLiteral
-
NativeLiteral
-
NativeLiteral
-
NativeLiteral
-
NativeLiteral
-
NativeLiteral
public NativeLiteral(ValueStoreRevision revision, String label, CoreDatatype datatype, int internalID)
-
-
Method Details
-
setInternalID
Description copied from interface:NativeValueSets the ID that is used for this value in a specific revision of the value store.- Specified by:
setInternalIDin interfaceNativeValue
-
getValueStoreRevision
Description copied from interface:NativeValueGets 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 interfaceNativeValue- Returns:
- The revision of the value store that created this value at the time it last set the value's internal ID.
-
getInternalID
public int getInternalID()Description copied from interface:NativeValueGets the ID that is used in the native store for this Value.- Specified by:
getInternalIDin interfaceNativeValue- Returns:
- The value's ID, or
NativeValue.UNKNOWN_IDif not yet set.
-
equals
Description copied from interface:LiteralCompares this literal to another object.- Specified by:
equalsin interfaceLiteral- Overrides:
equalsin classSimpleLiteral- 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
-