Class AbstractLiteral.TemporalAccessorLiteral
- All Implemented Interfaces:
Serializable
,Literal
,Value
- Enclosing class:
AbstractLiteral
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.rdf4j.model.base.AbstractLiteral
AbstractLiteral.BooleanLiteral, AbstractLiteral.CalendarLiteral, AbstractLiteral.DecimalLiteral, AbstractLiteral.IntegerLiteral, AbstractLiteral.NumberLiteral, AbstractLiteral.TaggedLiteral, AbstractLiteral.TemporalAccessorLiteral, AbstractLiteral.TemporalAmountLiteral, AbstractLiteral.TypedLiteral
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final DateTimeFormatter
private final CoreDatatype.XSD
private static final Map
<Integer, CoreDatatype.XSD> private static final DateTimeFormatter
private static final ChronoField[]
private static final Map
<CoreDatatype.XSD, DateTimeFormatter> private final String
private static final DateTimeFormatter
private static final DateTimeFormatter
private static final DateTimeFormatter
private static final DateTimeFormatter
private static final long
private final TemporalAccessor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Map
<Integer, CoreDatatype.XSD> private static DateTimeFormatter
private static Map
<CoreDatatype.XSD, DateTimeFormatter> 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.private static int
key
(ChronoField... fields) private static int
key
(TemporalAccessor value) private static int
key
(Predicate<ChronoField> include, ChronoField... fields) (package private) static TemporalAccessor
parseTemporalAccessor
(String label) Retrieves thetemporal accessor
value of this literal.Methods inherited from class org.eclipse.rdf4j.model.base.AbstractLiteral
booleanValue, byteValue, calendarValue, decimalValue, doubleValue, equals, floatValue, hashCode, integerValue, intValue, longValue, reserved, reserved, shortValue, stringValue, temporalAmountValue, toString
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
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
FIELDS
-
LOCAL_TIME_FORMATTER
-
OFFSET_TIME_FORMATTER
-
LOCAL_DATE_FORMATTER
-
OFFSET_DATE_FORMATTER
-
DATETIME_FORMATTER
-
DASH_FORMATTER
-
DATATYPES
-
FORMATTERS
-
value
-
label
-
datatype
-
-
Constructor Details
-
TemporalAccessorLiteral
TemporalAccessorLiteral(TemporalAccessor value)
-
-
Method Details
-
parseTemporalAccessor
- Throws:
DateTimeException
-
datatypes
-
formatters
-
formatter
-
key
-
key
-
key
-
getLabel
Description copied from interface:Literal
Gets the label (the lexical value) of this literal.- Returns:
- The literal's label.
-
getLanguage
Description copied from interface:Literal
Gets the language tag for this literal, normalized to lower case.- Returns:
- The language tag for this literal, or
Optional.empty()
if it doesn't have one.
-
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
.- Returns:
- The datatype for this literal.
-
temporalAccessorValue
Description copied from interface:Literal
Retrieves thetemporal accessor
value of this literal.A temporal accessor representation can be given for literals whose label conforms to the syntax of the following XML Schema 1.1 date/time datatypes:
Temporal accessor representations may be converted to specific
java.time
values likeOffsetDateTime
using target static factory methods, for instanceOffsetDateTime.from(literal.temporalAccessorValue())
.Note however that
java.time
doesn't include dedicated classes for some legal XML Schema date/time values, like offset dates (for instance,2020-11-16+01:00
) andxsd:gDay
(for instance,---16
).- Specified by:
temporalAccessorValue
in interfaceLiteral
- Overrides:
temporalAccessorValue
in classAbstractLiteral
- Returns:
- the temporal accessor value of this literal
- See Also:
-
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 constantinvalid @link
{@link CoreDatatype#NONE)
- Returns:
- The CoreDatatype or
invalid @link
{@link CoreDatatype#NONE)
-