Interface RdfLiteral
- All Superinterfaces:
RdfValue
- All Known Implementing Classes:
RdfLiteralImpl
The
RdfLiteral interface describes an immutable RDF Literal.-
Method Summary
Modifier and TypeMethodDescriptiondefault RdfLiteralReturn the RdfValue as a RdfLiteralAn absolute IRI denoting the datatype IRI of the literal.An optional language tag.getValue()Get the lexical value of the literal.default booleanIndicates if the value type is blank node identifier.default booleanisIRI()Indicates if the value type is an absolute IRI.default booleanIndicates if the value type is RDF literal.
-
Method Details
-
getValue
-
getDatatype
String getDatatype()An absolute IRI denoting the datatype IRI of the literal. If the value is rdf:langString,getLanguage()value is present.- Returns:
- an absolute IRI, never
null
-
getLanguage
An optional language tag. If this value is specified,getDatatype()returns rdf:langString.- Returns:
- language tag or
Optional.empty()if not set
-
isIRI
-
isBlankNode
default boolean isBlankNode()Description copied from interface:RdfValueIndicates if the value type is blank node identifier.- Specified by:
isBlankNodein interfaceRdfValue- Returns:
trueif the value type is blank node,falseotherwise.
-
asLiteral
Description copied from interface:RdfValueReturn the RdfValue as a RdfLiteral -
isLiteral
-