Package no.hasmac.rdf.impl
Class RdfLiteralImpl
java.lang.Object
no.hasmac.rdf.impl.RdfLiteralImpl
- All Implemented Interfaces:
RdfLiteral
,RdfValue
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
RdfLiteralImpl
(String value) protected
RdfLiteralImpl
(String value, String langTag, String datatype) -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface no.hasmac.rdf.RdfLiteral
asLiteral, isBlankNode, isIRI
-
Field Details
-
value
-
langTag
-
dataType
-
-
Constructor Details
-
RdfLiteralImpl
-
RdfLiteralImpl
-
-
Method Details
-
getValue
Description copied from interface:RdfLiteral
Get the lexical value of the literal.- Specified by:
getValue
in interfaceRdfLiteral
- Specified by:
getValue
in interfaceRdfValue
- Returns:
- lexical value, never
null
-
getDatatype
Description copied from interface:RdfLiteral
An absolute IRI denoting the datatype IRI of the literal. If the value is rdf:langString,RdfLiteral.getLanguage()
value is present.- Specified by:
getDatatype
in interfaceRdfLiteral
- Returns:
- an absolute IRI, never
null
-
isLiteral
public boolean isLiteral()Description copied from interface:RdfValue
Indicates if the value type is RDF literal.- Specified by:
isLiteral
in interfaceRdfLiteral
- Specified by:
isLiteral
in interfaceRdfValue
- Returns:
true
if the value type is literal,false
otherwise.
-
getLanguage
Description copied from interface:RdfLiteral
An optional language tag. If this value is specified,RdfLiteral.getDatatype()
returns rdf:langString.- Specified by:
getLanguage
in interfaceRdfLiteral
- Returns:
- language tag or
Optional.empty()
if not set
-
hashCode
public int hashCode() -
equals
-
toString
-
datatype
-