@Deprecated public class JenaTdbStoreImpl extends Object implements Store
Store implementation based on a Jena triplestore that can be either backed by
in-memory or on-disk dataset.| Constructor and Description |
|---|
JenaTdbStoreImpl()
Deprecated.
Initialise Store backed by an in-memory dataset.
|
JenaTdbStoreImpl(org.apache.jena.query.Dataset dataset)
Deprecated.
Initialise Store backed by a provided dataset.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends org.eclipse.lyo.oslc4j.core.model.IResource> |
appendResources(URI namedGraph,
Collection<T> resources)
Deprecated.
Adds OSLC
IResource instances in addition to other instances already
present on this named graph into the triplestore. |
void |
clear(URI namedGraph)
Deprecated.
Deletes the resources and statements stored under the given named graph from the triplestore.
|
void |
deleteResources(URI namedGraphUri,
org.eclipse.lyo.oslc4j.core.model.IResource... resources)
Deprecated.
Delete all statements whose subject is one of the resources's URis.
|
void |
deleteResources(URI namedGraphUri,
URI... nodeUris)
Deprecated.
Delete all statements whose subject is one of nodeUris
|
org.apache.jena.rdf.model.Model |
getJenaModelForSubject(URI namedGraphUri,
URI subject)
Deprecated.
Retrieve a Jena model for triples under the given subject from the corresponding named graph.
|
<T extends org.eclipse.lyo.oslc4j.core.model.IResource> |
getResource(URI namedGraph,
URI uri,
Class<T> clazz)
Deprecated.
Retrieve a single
IResource instance specified by the concrete
type, unmarshaled from the RDF graph persisted in the triplestore under the given
named graph. |
<T extends org.eclipse.lyo.oslc4j.core.model.IResource> |
getResources(URI namedGraph,
Class<T> clazz)
Deprecated.
Retrieve the collection of
IResource instances specified by the concrete
type, unmarshaled from the RDF graph persisted in the triplestore under the given
named graph. |
<T extends org.eclipse.lyo.oslc4j.core.model.IResource> |
getResources(URI namedGraph,
Class<T> clazz,
int limit,
int offset)
Deprecated.
Alternative to
Store.getResources(URI, Class) with paging on the OSLC resource level. |
<T extends org.eclipse.lyo.oslc4j.core.model.IResource> |
getResources(URI namedGraphUri,
Class<T> clazz,
String prefixes,
String where,
String searchTerms,
int limit,
int offset)
Deprecated.
Alternative to
Store.getResources(URI, Class) with paging on the OSLC resource level. |
org.apache.jena.rdf.model.Model |
getResources(URI namedGraph,
String prefixes,
String where,
int limit,
int offset)
Deprecated.
Retrieve a Jena model that satisfies the given where parameter as defined in the OSLC Query language (https://tools.oasis-open.org/version-control/svn/oslc-core/trunk/specs/oslc-query.html)
If the namedGraph is null, the query is applied on all namedGraph in the triplestore.
|
org.apache.jena.rdf.model.Model |
getResources(URI namedGraph,
String prefixes,
String where,
String searchTerms,
int limit,
int offset)
Deprecated.
Retrieve a Jena model that satisfies the given where parameter as defined in the OSLC Query language (https://tools.oasis-open.org/version-control/svn/oslc-core/trunk/specs/oslc-query.html)
If the namedGraph is null, the query is applied on all namedGraph in the triplestore.
|
void |
insertJenaModel(URI name,
org.apache.jena.rdf.model.Model model)
Deprecated.
Insert a jena model into the named graph with corresponding URI.
|
boolean |
insertResources(URI namedGraph,
Object... resources)
Deprecated.
Insert Jena models representations of OSLC
IResource instances into the
named graph. |
Set<String> |
keySet()
Deprecated.
Enumerates all named graph URIs within the dataset.
|
boolean |
namedGraphExists(URI namedGraph)
Deprecated.
Checks if the triplestore has the named graph under the corresponding URI.
|
void |
putJenaModel(URI name,
org.apache.jena.rdf.model.Model model)
Deprecated.
|
boolean |
putResource(URI namedGraphUri,
org.eclipse.lyo.oslc4j.core.model.IResource resource)
Deprecated.
|
<T extends org.eclipse.lyo.oslc4j.core.model.IResource> |
putResources(URI namedGraph,
Collection<T> resources)
Deprecated.
Inserts OSLC
IResource instances into the triplestore in the designed
namedGraph. |
void |
removeAll()
Deprecated.
Remove EVERYTHING from the triplestore.
|
boolean |
resourceExists(URI namedGraphUri,
URI resourceUri)
Deprecated.
Checks if a resource with resourceUri exists under the corresponding named graph.
|
<T extends org.eclipse.lyo.oslc4j.core.model.IResource> |
updateResources(URI namedGraphUri,
T... resources)
Deprecated.
Insert Jena models representations of OSLC
IResource instances into the
named graph. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendResourcepublic JenaTdbStoreImpl()
public JenaTdbStoreImpl(org.apache.jena.query.Dataset dataset)
dataset - an instance of the Dataset for the storepublic boolean namedGraphExists(URI namedGraph)
StorenamedGraphExists in interface StorenamedGraph - URI of a named graph that shall be a valid URI and was used before with
the put* methods.public <T extends org.eclipse.lyo.oslc4j.core.model.IResource> List<T> getResources(URI namedGraph, Class<T> clazz) throws StoreAccessException, ModelUnmarshallingException
StoreIResource instances specified by the concrete
type, unmarshaled from the RDF graph persisted in the triplestore under the given
named graph. The
named graph must represent a URI that was previously given to another method call or a
Resource
about URI if the resource was saved alone.getResources in interface Storeclazz - Concrete type of the stored resources. Must be correct (correspond to the
marshaled type and be a subclass of IResource), otherwise the
instantiation from model will not succeed.IResource instances, unmarshaled from the RDF graph persisted
in the triplestore.StoreAccessException - if there was a problem with the triplestore (or the
dataset, more broadly).ModelUnmarshallingException - if the classes cannot be instantiated or another error
occurred when working with Jena model.public final <T extends org.eclipse.lyo.oslc4j.core.model.IResource> boolean putResources(URI namedGraph, Collection<T> resources) throws StoreAccessException
StoreIResource instances into the triplestore in the designed
namedGraph.
Any previously stored resource(s) and/or statements will be overwritten.
putResources in interface StorenamedGraph - A unique URI that is used as a named graph to which resources are
appendedresources - A collection of IResource instancesStoreAccessException - if the operation can't be performedpublic final <T extends org.eclipse.lyo.oslc4j.core.model.IResource> boolean appendResources(URI namedGraph, Collection<T> resources) throws StoreAccessException
StoreIResource instances in addition to other instances already
present on this named graph into the triplestore. Jena models representing existing and added
resource arrays will be combined.appendResources in interface StorenamedGraph - A unique URI that is used as a named graph to which resources are
appendedresources - A collection of IResource instancesStoreAccessException - if the operation can't be performedpublic void clear(URI namedGraph)
Store
May delete the containing named graph, many triplestores will delete the named graph automatically as well as soon as it doesn't contain any triples.
public <T extends org.eclipse.lyo.oslc4j.core.model.IResource> List<T> getResources(URI namedGraph, Class<T> clazz, int limit, int offset) throws StoreAccessException, ModelUnmarshallingException
StoreStore.getResources(URI, Class) with paging on the OSLC resource level.getResources in interface StorenamedGraph - URI of a named graph under which resources were storedclazz - class of the resources being retrievedlimit - paging limitoffset - paging offsetStoreAccessException - if there was a problem with the triplestore (or the
dataset, more broadly).ModelUnmarshallingException - if the classes cannot be instantiated or another error
occurred when working with Jena model.public <T extends org.eclipse.lyo.oslc4j.core.model.IResource> List<T> getResources(URI namedGraphUri, Class<T> clazz, String prefixes, String where, String searchTerms, int limit, int offset) throws StoreAccessException, ModelUnmarshallingException
StoreStore.getResources(URI, Class) with paging on the OSLC resource level.getResources in interface StorenamedGraphUri - URI of a named graph under which resources were storedclazz - class of the resources being retrievedprefixes - defines the prefixes for prefixed names that appear in the oslc.where query parameter.where - filters the member list, keeping only those member resources that satisfy the boolean test on the member resource properties. (See oslc.where at https://tools.oasis-open.org/version-control/browse/wsvn/oslc-core/trunk/specs/oslc-query.html)searchTerms - score each member resource using a full text search on it text-valued properties. (See oslc.searchTerms at https://tools.oasis-open.org/version-control/browse/wsvn/oslc-core/trunk/specs/oslc-query.html)limit - paging limitoffset - paging offsetStoreAccessException - if there was a problem with the triplestore (or the
dataset, more broadly).ModelUnmarshallingException - if the classes cannot be instantiated or another error
occurred when working with Jena model.public org.apache.jena.rdf.model.Model getResources(URI namedGraph, String prefixes, String where, int limit, int offset)
StoregetResources in interface StorenamedGraph - namedGraphUri URI of a named graph under which resources were storedprefixes - defines the prefixes for prefixed names that appear in the oslc.where query parameter.where - filters the member list, keeping only those member resources that satisfy the boolean test on the member resource properties. (See oslc.where at https://tools.oasis-open.org/version-control/browse/wsvn/oslc-core/trunk/specs/oslc-query.html)limit - paging limitoffset - paging offsetpublic org.apache.jena.rdf.model.Model getResources(URI namedGraph, String prefixes, String where, String searchTerms, int limit, int offset)
StoregetResources in interface StorenamedGraph - namedGraphUri URI of a named graph under which resources were storedprefixes - defines the prefixes for prefixed names that appear in the oslc.where query parameter.where - filters the member list, keeping only those member resources that satisfy the boolean test on the member resource properties. (See oslc.where at https://tools.oasis-open.org/version-control/browse/wsvn/oslc-core/trunk/specs/oslc-query.html)searchTerms - score each member resource using a full text search on it text-valued properties. (See oslc.searchTerms at https://tools.oasis-open.org/version-control/browse/wsvn/oslc-core/trunk/specs/oslc-query.html)limit - paging limitoffset - paging offsetpublic Set<String> keySet()
Store
If the dataset was not manipulated by other means than via this interface, it can be assumed that all URIs in the set are valid keys.
public void removeAll()
Storepublic <T extends org.eclipse.lyo.oslc4j.core.model.IResource> T getResource(URI namedGraph, URI uri, Class<T> clazz) throws NoSuchElementException, StoreAccessException, ModelUnmarshallingException
StoreIResource instance specified by the concrete
type, unmarshaled from the RDF graph persisted in the triplestore under the given
named graph.
namedGraph must represent a URI that was previously given to another call.getResource in interface StorenamedGraph - URI of a named graph under which resources were storedclazz - Java class of the stored resources.IResource instance, unmarshaled from the RDF graph persisted in the
triplestore.NoSuchElementException - if the resource is not present under a given named graph
URI or if the named graph itself contains no resources
(effectively missing).StoreAccessException - if there was a problem with the triplestore (or the
dataset, more broadly).ModelUnmarshallingException - if the classes cannot be instantiated or another error
occurred when working with Jena model.public void insertJenaModel(URI name, org.apache.jena.rdf.model.Model model)
StoreinsertJenaModel in interface Storepublic void putJenaModel(URI name, org.apache.jena.rdf.model.Model model)
public boolean resourceExists(URI namedGraphUri, URI resourceUri)
StoreresourceExists in interface Storepublic boolean insertResources(URI namedGraph, Object... resources) throws StoreAccessException
StoreIResource instances into the
named graph.
existing statements already present in the named graph are not overridden, nor removed.insertResources in interface StoreStoreAccessExceptionpublic void deleteResources(URI namedGraphUri, URI... nodeUris)
StoredeleteResources in interface Storepublic void deleteResources(URI namedGraphUri, org.eclipse.lyo.oslc4j.core.model.IResource... resources)
StoredeleteResources in interface Storepublic <T extends org.eclipse.lyo.oslc4j.core.model.IResource> boolean updateResources(URI namedGraphUri, T... resources) throws StoreAccessException
StoreIResource instances into the
named graph.
Any existing model representations of these instances are overridden.
other existing statements in the named graph are not overridden, nor removed.updateResources in interface StoreStoreAccessExceptionpublic org.apache.jena.rdf.model.Model getJenaModelForSubject(URI namedGraphUri, URI subject) throws NoSuchElementException
StoregetJenaModelForSubject in interface StoreNoSuchElementExceptionpublic boolean putResource(URI namedGraphUri, org.eclipse.lyo.oslc4j.core.model.IResource resource) throws StoreAccessException, NoSuchElementException
Copyright © 2020. All rights reserved.