Class AbstractLiteral.CalendarLiteral
java.lang.Object
org.eclipse.rdf4j.model.base.AbstractLiteral
org.eclipse.rdf4j.model.base.AbstractLiteral.CalendarLiteral
- 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 final CoreDatatype.XSDprivate static final ThreadLocal<DatatypeFactory> private static final Map<QName, CoreDatatype.XSD> private final Stringprivate static final longprivate final XMLGregorianCalendar -
Constructor Summary
ConstructorsConstructorDescriptionCalendarLiteral(GregorianCalendar calendar) CalendarLiteral(XMLGregorianCalendar calendar) -
Method Summary
Modifier and TypeMethodDescriptionReturns theXMLGregorianCalendarvalue of this literal.private static Map<QName, CoreDatatype.XSD> 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 XMLGregorianCalendarparseCalendar(String label) Methods inherited from class AbstractLiteral
booleanValue, byteValue, decimalValue, doubleValue, equals, floatValue, hashCode, integerValue, intValue, longValue, reserved, reserved, shortValue, stringValue, temporalAccessorValue, temporalAmountValue, toStringMethods inherited from interface Value
isBNode, isIRI, isResource, isTriple
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
DATATYPE_FACTORY
-
DATATYPES
-
value
-
label
-
datatype
-
-
Constructor Details
-
CalendarLiteral
CalendarLiteral(GregorianCalendar calendar) -
CalendarLiteral
CalendarLiteral(XMLGregorianCalendar calendar)
-
-
Method Details
-
datatypes
-
parseCalendar
-
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.
-
calendarValue
Description copied from interface:LiteralReturns theXMLGregorianCalendarvalue of this literal. A calendar representation can be given for literals whose label conforms to the syntax of the following XML Schema datatypes: dateTime, time, date, gYearMonth, gMonthDay, gYear, gMonth or gDay.- Specified by:
calendarValuein interfaceLiteral- Overrides:
calendarValuein classAbstractLiteral- Returns:
- The calendar value of the 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} 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)
-