Class AbstractLiteral.TemporalAccessorLiteral
java.lang.Object
org.eclipse.rdf4j.model.base.AbstractLiteral
org.eclipse.rdf4j.model.base.AbstractLiteral.TemporalAccessorLiteral
- All Implemented Interfaces:
Serializable, Literal, Value
- Enclosing class:
AbstractLiteral
- Since:
- 3.5.0
-
Nested Class Summary
Nested classes/interfaces inherited from class 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 DateTimeFormatterprivate final CoreDatatype.XSDprivate static final Map<Integer, CoreDatatype.XSD> private static final DateTimeFormatterprivate static final ChronoField[]private static final Map<CoreDatatype.XSD, DateTimeFormatter> private final Stringprivate static final DateTimeFormatterprivate static final DateTimeFormatterprivate static final DateTimeFormatterprivate static final DateTimeFormatterprivate static final longprivate final TemporalAccessor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Map<Integer, CoreDatatype.XSD> private static DateTimeFormatterprivate 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 intkey(ChronoField... fields) private static intkey(TemporalAccessor value) private static intkey(Predicate<ChronoField> include, ChronoField... fields) (package private) static TemporalAccessorparseTemporalAccessor(String label) Retrieves thetemporal accessorvalue of this literal.Methods inherited from class AbstractLiteral
booleanValue, byteValue, calendarValue, decimalValue, doubleValue, equals, floatValue, hashCode, integerValue, intValue, longValue, reserved, reserved, shortValue, stringValue, temporalAmountValue, toStringMethods inherited from interface 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
-
getLanguage
Description copied from interface:LiteralGets 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: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.- Returns:
- The datatype for this literal.
-
temporalAccessorValue
Description copied from interface:LiteralRetrieves thetemporal accessorvalue 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.timevalues likeOffsetDateTimeusing target static factory methods, for instanceOffsetDateTime.from(literal.temporalAccessorValue()).Note however that
java.timedoesn'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:
temporalAccessorValuein interfaceLiteral- Overrides:
temporalAccessorValuein classAbstractLiteral- Returns:
- the temporal accessor value of this literal
- See Also:
-
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} is used to represent a datatype that is not one of the supported core datatypes.invalid @link
{@link CoreDatatype#NONE)- Returns:
- The CoreDatatype or
} if the datatype matches none of the core datatypes. This method will not return null.
invalid @link
{@link CoreDatatype#NONE)
-