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, sparqlEncodeclone, finalize, getClass, notify, notifyAll, wait, wait, waitasBlankNode, asLiteral, asResource, asURIpublic DatatypeLiteralImpl(String value, URI datatype)
value - The datatype valuedatatype - The xsd URIpublic DatatypeLiteralImpl(String turtleEncoded)
turtleEncoded - Syntax <literalValue> '^^' <datatypeUri>public URI getDatatype()
DatatypeLiteralgetDatatype in interface DatatypeLiteralpublic String getValue()
LiteralgetValue in interface LiteralgetValue in class LiteralImplpublic int asInt()
throws ClassCastException,
NumberFormatException
public boolean asBoolean()
throws ClassCastException
ClassCastExceptionpublic DatatypeLiteral asDatatypeLiteral() throws ClassCastException
NodeasDatatypeLiteral in interface NodeClassCastException - if the node is not a DatatypeLiteralpublic LanguageTagLiteral asLanguageTagLiteral() throws ClassCastException
NodeasLanguageTagLiteral in interface NodeClassCastException - 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.