Package com.apicatalog.rdf
Interface RdfLiteral
-
- All Superinterfaces:
RdfValue
public interface RdfLiteral extends RdfValue
TheRdfLiteralinterface describes an immutableRDF Literal.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default RdfLiteralasLiteral()Return the RdfValue as a RdfLiteralStringgetDatatype()An absolute IRI denoting the datatype IRI of the literal.Optional<String>getLanguage()An optional language tag.StringgetValue()Get the lexical value of the literal.default booleanisBlankNode()Indicates if the value type is blank node identifier.default booleanisIRI()Indicates if the value type is an absolute IRI.
-
-
-
Method Detail
-
getValue
String getValue()
Get the lexical value of the literal.
-
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
Optional<String> getLanguage()
An optional language tag. If this value is specified,getDatatype()returns rdf:langString.- Returns:
- language tag or
Optional.empty()if not set
-
isIRI
default boolean isIRI()
Description copied from interface:RdfValueIndicates if the value type is an absolute IRI.
-
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
default RdfLiteral asLiteral()
Description copied from interface:RdfValueReturn the RdfValue as a RdfLiteral
-
-