public interface Literal extends RDFTerm
PlainLiteral
and TypedLiteral
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Returns true if
obj is an instance of
literal that is term-equal with this, false otherwise |
IRI |
getDataType()
The IRI identifying the datatype that determines how the lexical form
maps to a literal value.
|
Language |
getLanguage()
If and only if the datatype IRI is http://www.w3.org/1999/02/22-rdf-syntax-ns#langString, the language
tag for this Literal is a language tag as defined by BCP47.
If the datatype IRI is not http://www.w3.org/1999/02/22-rdf-syntax-ns#langString, this method must null. |
String |
getLexicalForm()
The lexical form of this literal, represented by a Unicode string.
|
int |
hashCode()
Returns the hash code of the lexical form plus the hash code of the
datatype plus if the literal has a language the hash code of the
language.
|
String getLexicalForm()
IRI getDataType()
Language getLanguage()
boolean equals(Object obj)
obj
is an instance of
literal
that is term-equal with this, false otherwise
Two literals are term-equal (the same RDF literal) if and only if the two lexical forms, the two datatype IRIs, and the two language tags (if any) compare equal, character by character.
Copyright © 2015–2022 The Apache Software Foundation. All rights reserved.