public class LDCacheBackend extends Object implements RDFBackend<org.openrdf.model.Value>
Constructor and Description |
---|
LDCacheBackend() |
LDCacheBackend(LDCache ldcache) |
Modifier and Type | Method and Description |
---|---|
Boolean |
booleanValue(org.openrdf.model.Value node)
Return the boolean value of a literal node.
|
org.openrdf.model.Literal |
createLiteral(String content)
Create a literal node with the content passed as argument
|
org.openrdf.model.Literal |
createLiteral(String content,
Locale language,
URI type)
Create a literal node with the content passed as argument
|
org.openrdf.model.URI |
createURI(String uri)
Create a URI mode with the URI passed as argument
|
Date |
dateTimeValue(org.openrdf.model.Value node)
TODO
|
Date |
dateValue(org.openrdf.model.Value node)
TODO
|
protected String |
debugType(org.openrdf.model.Value value)
Prints the type (URI,bNode,literal) by inspecting the parsed
Value
to improve error messages and other loggings. |
BigDecimal |
decimalValue(org.openrdf.model.Value node)
Return the decimal number of a literal node.
|
Double |
doubleValue(org.openrdf.model.Value node)
Return the double value of a literal node.
|
Float |
floatValue(org.openrdf.model.Value node)
Return the float value of a literal node.
|
Locale |
getLiteralLanguage(org.openrdf.model.Value n)
Return the language of the literal node passed as argument.
|
URI |
getLiteralType(org.openrdf.model.Value n)
Return the URI of the type of the literal node passed as argument.
|
ThreadPoolExecutor |
getThreadPool()
Deprecated.
subject to be removed in the next release
|
BigInteger |
integerValue(org.openrdf.model.Value node)
Return the arbitrary length integer value of a literal node.
|
Integer |
intValue(org.openrdf.model.Value node)
Return the 32bit integer value of a literal node.
|
boolean |
isBlank(org.openrdf.model.Value n)
Test whether the node passed as argument is a blank node
|
boolean |
isLiteral(org.openrdf.model.Value n)
Test whether the node passed as argument is a literal
|
boolean |
isURI(org.openrdf.model.Value n)
Test whether the node passed as argument is a URI
|
Collection<org.openrdf.model.Value> |
listObjects(org.openrdf.model.Value subject,
org.openrdf.model.Value property)
List the objects of triples in the triple store underlying this backend that have the subject and
property given as argument.
|
Collection<org.openrdf.model.Value> |
listSubjects(org.openrdf.model.Value property,
org.openrdf.model.Value object)
List the subjects of triples in the triple store underlying this backend that have the object and
property given as argument.
|
Long |
longValue(org.openrdf.model.Value node)
Return the long value of a literal node.
|
String |
stringValue(org.openrdf.model.Value value)
Return the string value of a node.
|
boolean |
supportsThreading()
Deprecated.
subject to be removed in the next release
|
Date |
timeValue(org.openrdf.model.Value node)
TODO
|
public LDCacheBackend()
public LDCacheBackend(LDCache ldcache)
public boolean isLiteral(org.openrdf.model.Value n)
isLiteral
in interface NodeBackend<org.openrdf.model.Value>
n
- the node to checkpublic boolean isURI(org.openrdf.model.Value n)
isURI
in interface NodeBackend<org.openrdf.model.Value>
n
- the node to checkpublic boolean isBlank(org.openrdf.model.Value n)
isBlank
in interface NodeBackend<org.openrdf.model.Value>
n
- the node to checkpublic Locale getLiteralLanguage(org.openrdf.model.Value n)
getLiteralLanguage
in interface NodeBackend<org.openrdf.model.Value>
n
- the literal node for which to return the languageIllegalArgumentException
- in case the node is no literalpublic URI getLiteralType(org.openrdf.model.Value n)
getLiteralType
in interface NodeBackend<org.openrdf.model.Value>
n
- the literal node for which to return the typerIllegalArgumentException
- in case the node is no literalpublic String stringValue(org.openrdf.model.Value value)
stringValue
in interface NodeBackend<org.openrdf.model.Value>
value
- public BigDecimal decimalValue(org.openrdf.model.Value node)
NodeBackend
decimalValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the xsd:decimal valuepublic BigInteger integerValue(org.openrdf.model.Value node)
NodeBackend
integerValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the xsd:integer
valuepublic Boolean booleanValue(org.openrdf.model.Value node)
NodeBackend
Boolean.parseBoolean(String)
booleanValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the boolean valuepublic Date dateTimeValue(org.openrdf.model.Value node)
NodeBackend
dateTimeValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the dateTime valuepublic Date dateValue(org.openrdf.model.Value node)
NodeBackend
dateValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the date valuepublic Date timeValue(org.openrdf.model.Value node)
NodeBackend
timeValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the time valuepublic Long longValue(org.openrdf.model.Value node)
NodeBackend
longValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the long valuepublic Double doubleValue(org.openrdf.model.Value node)
NodeBackend
doubleValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the double valuepublic Float floatValue(org.openrdf.model.Value node)
NodeBackend
floatValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the float valuepublic Integer intValue(org.openrdf.model.Value node)
NodeBackend
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
.
intValue
in interface NodeBackend<org.openrdf.model.Value>
node
- the literal node for which to return the Integer (xsd:int) valueprotected String debugType(org.openrdf.model.Value value)
Value
to improve error messages and other loggings. In case of literals
also the literal type
is printedvalue
- the value or null
public org.openrdf.model.Literal createLiteral(String content)
NodeBackend
createLiteral
in interface NodeBackend<org.openrdf.model.Value>
content
- string content to represent inside the literalpublic org.openrdf.model.Literal createLiteral(String content, Locale language, URI type)
NodeBackend
createLiteral
in interface NodeBackend<org.openrdf.model.Value>
content
- string content to represent inside the literalpublic org.openrdf.model.URI createURI(String uri)
NodeBackend
createURI
in interface NodeBackend<org.openrdf.model.Value>
uri
- URI of the resource to createpublic boolean supportsThreading()
supportsThreading
in interface RDFBackend<org.openrdf.model.Value>
public ThreadPoolExecutor getThreadPool()
getThreadPool
in interface RDFBackend<org.openrdf.model.Value>
public Collection<org.openrdf.model.Value> listObjects(org.openrdf.model.Value subject, org.openrdf.model.Value property)
listObjects
in interface RDFBackend<org.openrdf.model.Value>
subject
- the subject of the triples to look forproperty
- the property of the triples to look for, null
is interpreted as wildcardpublic Collection<org.openrdf.model.Value> listSubjects(org.openrdf.model.Value property, org.openrdf.model.Value object)
listSubjects
in interface RDFBackend<org.openrdf.model.Value>
property
- the property of the triples to look for, null
is interpreted as wildcardobject
- the object of the triples to look forUnsupportedOperationException
- in case reverse selection is not supported (e.g. when querying Linked Data)Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.