public interface NodeBackend<Node>
Modifier and Type | Method and Description |
---|---|
Boolean |
booleanValue(Node node)
Return the boolean value of a literal node.
|
Node |
createLiteral(String content)
Create a literal node with the content passed as argument
|
Node |
createLiteral(String content,
Locale language,
URI type)
Create a literal node with the content passed as argument
|
Node |
createURI(String uri)
Create a URI mode with the URI passed as argument
|
Date |
dateTimeValue(Node node)
TODO
|
Date |
dateValue(Node node)
TODO
|
BigDecimal |
decimalValue(Node node)
Return the decimal number of a literal node.
|
Double |
doubleValue(Node node)
Return the double value of a literal node.
|
Float |
floatValue(Node node)
Return the float value of a literal node.
|
Locale |
getLiteralLanguage(Node n)
Return the language of the literal node passed as argument.
|
URI |
getLiteralType(Node n)
Return the URI of the type of the literal node passed as argument.
|
BigInteger |
integerValue(Node node)
Return the arbitrary length integer value of a literal node.
|
Integer |
intValue(Node node)
Return the 32bit integer value of a literal node.
|
boolean |
isBlank(Node n)
Test whether the node passed as argument is a blank node
|
boolean |
isLiteral(Node n)
Test whether the node passed as argument is a literal
|
boolean |
isURI(Node n)
Test whether the node passed as argument is a URI
|
Long |
longValue(Node node)
Return the long value of a literal node.
|
String |
stringValue(Node node)
Return the lexial representation of a node.
|
Date |
timeValue(Node node)
TODO
|
boolean isLiteral(Node n)
n
- the node to checkboolean isURI(Node n)
n
- the node to checkboolean isBlank(Node n)
n
- the node to checkLocale getLiteralLanguage(Node n)
n
- the literal node for which to return the languageIllegalArgumentException
- in case the node is no literalURI getLiteralType(Node n)
n
- the literal node for which to return the typerIllegalArgumentException
- in case the node is no literalNode createLiteral(String content)
content
- string content to represent inside the literalNode createLiteral(String content, Locale language, URI type)
content
- string content to represent inside the literalNode createURI(String uri)
uri
- URI of the resource to createString stringValue(Node node)
node
- Double doubleValue(Node node)
node
- the literal node for which to return the double valueNumberFormatException
- in case the literal cannot be represented as double valueArithmeticException
- in case the literal cannot be represented as double valueIllegalArgumentException
- in case the node passed as argument is not a literalLong longValue(Node node)
node
- the literal node for which to return the long valueNumberFormatException
- in case the literal cannot be represented as long valueArithmeticException
- in case the literal cannot be represented as long valueIllegalArgumentException
- in case the node passed as argument is not a literalBoolean booleanValue(Node node)
Boolean.parseBoolean(String)
node
- the literal node for which to return the boolean valueIllegalArgumentException
- in case the node passed as argument is not a literalDate dateTimeValue(Node node)
node
- the literal node for which to return the dateTime valueIllegalArgumentException
- in case the node passed as argument is not a literalDate dateValue(Node node)
node
- the literal node for which to return the date valueIllegalArgumentException
- in case the node passed as argument is not a literalDate timeValue(Node node)
node
- the literal node for which to return the time valueIllegalArgumentException
- in case the node passed as argument is not a literalFloat floatValue(Node node)
node
- the literal node for which to return the float valueNumberFormatException
- in case the literal cannot be represented as float valueArithmeticException
- in case the literal cannot be represented as float valueIllegalArgumentException
- in case the node passed as argument is not a literalInteger intValue(Node node)
Note that this is restricted to 32bit singed integer values as defined by
xsd:int and Integer
. For bigger nuber one might want to use
xsd:integer represented by BigInteger
.
node
- the literal node for which to return the Integer (xsd:int) valueNumberFormatException
- in case the literal cannot be represented as 32 bit integer valueArithmeticException
- in case the literal cannot be represented as 32 bit integer valueIllegalArgumentException
- in case the node passed as argument is not a literalBigInteger integerValue(Node node)
node
- the literal node for which to return the xsd:integer
valueNumberFormatException
- in case the literal cannot be represented as integer valueArithmeticException
- in case the literal cannot be represented as long valueIllegalArgumentException
- in case the node passed as argument is integer a literalBigDecimal decimalValue(Node node)
node
- the literal node for which to return the xsd:decimal valueNumberFormatException
- in case the literal cannot be represented as decimal valueArithmeticException
- in case the literal cannot be represented as decimal valueIllegalArgumentException
- in case the node passed as argument is not a literalCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.