public class DatatypeLiteralImpl extends LiteralImpl implements DatatypeLiteral
Constructor and Description |
---|
DatatypeLiteralImpl(String turtleEncoded) |
DatatypeLiteralImpl(String value,
URI datatype)
constructs a Datatype Literal
|
Modifier and Type | Method and Description |
---|---|
boolean |
asBoolean() |
DatatypeLiteral |
asDatatypeLiteral()
A convenience method for a cast to
org.ontoware.rdf2go.model.node.DatatypeLiteral
|
int |
asInt() |
LanguageTagLiteral |
asLanguageTagLiteral()
A convenience method for a cast to
org.ontoware.rdf2go.model.node.LanguageTagLiteral
|
int |
compareTo(Node other) |
boolean |
equals(Object o) |
URI |
getDatatype()
the URI normally is an URI for a xml schema datatype (xsd)
|
String |
getValue()
gets the value of the literal
|
int |
hashCode() |
String |
toSPARQL()
A convenience function to create SPARQL queries from nodes
|
String |
toString() |
asBlankNode, asLiteral, asResource, asURI, sparqlEncode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asBlankNode, asLiteral, asResource, asURI
public DatatypeLiteralImpl(String value, URI datatype)
value
- The datatype valuedatatype
- The xsd URIpublic DatatypeLiteralImpl(String turtleEncoded)
turtleEncoded
- Syntax <literalValue> '^^' <datatypeUri>public URI getDatatype()
DatatypeLiteral
getDatatype
in interface DatatypeLiteral
public String getValue()
Literal
getValue
in interface Literal
getValue
in class LiteralImpl
public int asInt() throws ClassCastException, NumberFormatException
public boolean asBoolean() throws ClassCastException
ClassCastException
public DatatypeLiteral asDatatypeLiteral() throws ClassCastException
Node
asDatatypeLiteral
in interface Node
ClassCastException
- if the node is not a DatatypeLiteralpublic LanguageTagLiteral asLanguageTagLiteral() throws ClassCastException
Node
asLanguageTagLiteral
in interface Node
ClassCastException
- if the node is not a LanguageTagLiteralpublic int compareTo(Node other)
compareTo
in interface Comparable<Node>
Copyright © 2005–2016 IT-Consulting Dr. Max V?lkel | Project started at FZI Forschungszentrum Informatik, www.fzi.de. All rights reserved.