public class GenericJenaBackend extends Object implements RDFBackend<com.hp.hpl.jena.rdf.model.RDFNode>
| Constructor and Description |
|---|
GenericJenaBackend(com.hp.hpl.jena.rdf.model.Model model) |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
booleanValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Return the boolean value of a literal node.
|
com.hp.hpl.jena.rdf.model.RDFNode |
createLiteral(String content)
Create a literal node with the content passed as argument
|
com.hp.hpl.jena.rdf.model.RDFNode |
createLiteral(String content,
Locale language,
URI type)
Create a literal node with the content passed as argument
|
com.hp.hpl.jena.rdf.model.RDFNode |
createURI(String uri)
Create a URI mode with the URI passed as argument
|
Date |
dateTimeValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
TODO
|
Date |
dateValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
TODO
|
BigDecimal |
decimalValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Return the decimal number of a literal node.
|
Double |
doubleValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Return the double value of a literal node.
|
Float |
floatValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Return the float value of a literal node.
|
Locale |
getLiteralLanguage(com.hp.hpl.jena.rdf.model.RDFNode n)
Return the language of the literal node passed as argument.
|
URI |
getLiteralType(com.hp.hpl.jena.rdf.model.RDFNode n)
Return the URI of the type of the literal node passed as argument.
|
ThreadPoolExecutor |
getThreadPool()
In case the backend supports threading, this method should return the ExecutorService representing the
thread pool.
|
BigInteger |
integerValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Return the arbitrary length integer value of a literal node.
|
Integer |
intValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Return the 32bit integer value of a literal node.
|
boolean |
isBlank(com.hp.hpl.jena.rdf.model.RDFNode n)
Test whether the node passed as argument is a blank node
|
boolean |
isLiteral(com.hp.hpl.jena.rdf.model.RDFNode n)
Test whether the node passed as argument is a literal
|
boolean |
isURI(com.hp.hpl.jena.rdf.model.RDFNode n)
Test whether the node passed as argument is a URI
|
Collection<com.hp.hpl.jena.rdf.model.RDFNode> |
listObjects(com.hp.hpl.jena.rdf.model.RDFNode subject,
com.hp.hpl.jena.rdf.model.RDFNode property)
List the objects of triples in the triple store underlying this backend that have the subject and
property given as argument.
|
Collection<com.hp.hpl.jena.rdf.model.RDFNode> |
listSubjects(com.hp.hpl.jena.rdf.model.RDFNode property,
com.hp.hpl.jena.rdf.model.RDFNode object)
List the subjects of triples in the triple store underlying this backend that have the object and
property given as argument.
|
Long |
longValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Return the long value of a literal node.
|
String |
stringValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Return the lexial representation of a node.
|
boolean |
supportsThreading()
Return true if the underlying backend supports the parallel execution of queries.
|
Date |
timeValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
TODO
|
public GenericJenaBackend(com.hp.hpl.jena.rdf.model.Model model)
public boolean supportsThreading()
supportsThreading in interface RDFBackend<com.hp.hpl.jena.rdf.model.RDFNode>public ThreadPoolExecutor getThreadPool()
getThreadPool in interface RDFBackend<com.hp.hpl.jena.rdf.model.RDFNode>public boolean isLiteral(com.hp.hpl.jena.rdf.model.RDFNode n)
isLiteral in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>n - the node to checkpublic boolean isURI(com.hp.hpl.jena.rdf.model.RDFNode n)
isURI in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>n - the node to checkpublic boolean isBlank(com.hp.hpl.jena.rdf.model.RDFNode n)
isBlank in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>n - the node to checkpublic Locale getLiteralLanguage(com.hp.hpl.jena.rdf.model.RDFNode n)
getLiteralLanguage in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>n - the literal node for which to return the languageIllegalArgumentException - in case the node is no literalpublic URI getLiteralType(com.hp.hpl.jena.rdf.model.RDFNode n)
getLiteralType in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>n - the literal node for which to return the typerIllegalArgumentException - in case the node is no literalpublic com.hp.hpl.jena.rdf.model.RDFNode createLiteral(String content)
createLiteral in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>content - string content to represent inside the literalpublic com.hp.hpl.jena.rdf.model.RDFNode createLiteral(String content, Locale language, URI type)
createLiteral in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>content - string content to represent inside the literalpublic com.hp.hpl.jena.rdf.model.RDFNode createURI(String uri)
createURI in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>uri - URI of the resource to createpublic String stringValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
stringValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - public Double doubleValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
doubleValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - 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 literalpublic Long longValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
longValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - 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 literalpublic Boolean booleanValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Boolean.parseBoolean(String)
booleanValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - the literal node for which to return the boolean valueIllegalArgumentException - in case the node passed as argument is not a literalpublic Date dateTimeValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
dateTimeValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - the literal node for which to return the dateTime valueIllegalArgumentException - in case the node passed as argument is not a literalpublic Date dateValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
dateValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - the literal node for which to return the date valueIllegalArgumentException - in case the node passed as argument is not a literalpublic Date timeValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
timeValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - the literal node for which to return the time valueIllegalArgumentException - in case the node passed as argument is not a literalpublic Float floatValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
floatValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - 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 literalpublic Integer intValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
Integer. For bigger nuber one might want to use
xsd:integer represented by BigInteger.intValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - 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 literalpublic BigInteger integerValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
integerValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - 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 literalpublic BigDecimal decimalValue(com.hp.hpl.jena.rdf.model.RDFNode rdfNode)
decimalValue in interface NodeBackend<com.hp.hpl.jena.rdf.model.RDFNode>rdfNode - 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 literalpublic Collection<com.hp.hpl.jena.rdf.model.RDFNode> listObjects(com.hp.hpl.jena.rdf.model.RDFNode subject, com.hp.hpl.jena.rdf.model.RDFNode property)
listObjects in interface RDFBackend<com.hp.hpl.jena.rdf.model.RDFNode>subject - the subject of the triples to look forproperty - the property of the triples to look for, null is interpreted as wildcardpublic Collection<com.hp.hpl.jena.rdf.model.RDFNode> listSubjects(com.hp.hpl.jena.rdf.model.RDFNode property, com.hp.hpl.jena.rdf.model.RDFNode object)
listSubjects in interface RDFBackend<com.hp.hpl.jena.rdf.model.RDFNode>object - the object of the triples to look forproperty - the property of the triples to look for, null is interpreted as wildcardUnsupportedOperationException - in case reverse selection is not supported (e.g. when querying Linked Data)Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.