|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.model.embedded.EmbeddedModelService
public class EmbeddedModelService
An Embedded version of the IModelService which has a direct connection to the Anzo server.
| Constructor Summary | |
|---|---|
EmbeddedModelService(EmbeddedServiceBase baseService)
Get an instance of the EmbeddedModelService |
|
| Method Summary | |
|---|---|
void |
addInferredObject(org.openrdf.model.URI prop,
org.openrdf.model.URI obj,
org.openrdf.model.URI inferredObj)
Add a mapping between a property/object pair, and the inferred property inferred object pair. |
void |
addInferredProperty(org.openrdf.model.URI prop,
org.openrdf.model.URI inferredProp)
Add a mapping between a property , and the inferred property. |
void |
close()
Close the ModelService |
QueryResult |
execQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphs,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query,
java.lang.String queryLanguage)
ExecQuery runs a query on the server and returns the results in a graph. |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
execQueryIndex(java.lang.String query,
int startIndex,
int numResults)
ExecQueryIndex runs a query against the index on the server and returns the results in a graph. |
QueryResult |
executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphs,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query)
ExecuteQuery runs a SPARQL query on the server and returns the results in a QueryResult object. |
QueryResult |
executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphs,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query,
org.openrdf.model.URI base)
ExecuteQuery runs a SPARQL query on the server and returns the results in a QueryResult object. |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
findStatements(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource g)
FindStatements returns an iterator of statements that match a Statement pattern and no inferred triples |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
findStatements(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource g,
boolean includeInferedTriples)
FindStatements returns an iterator of statements that match a Statement pattern |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
findStatements(org.openrdf.model.Statement statement)
FindStatements returns an iterator of statements that match a Statement pattern and no inferred triples |
info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> |
findStatements(org.openrdf.model.Statement statement,
boolean includeInferedTriples)
FindStatements returns an iterator of statements that match a Statement pattern |
INamedGraphWithMetaData |
getCurrentNamedGraphRevision(org.openrdf.model.URI namedGraphUri)
GetNamedGraphRevision returns a INamedGraphWithMetaData for a specific NamedGraph at the current revision |
static IModelService |
getInstance(java.lang.Object parent,
java.util.Properties props)
Get an instance of the EmbeddedModelService |
org.openrdf.model.URI |
getMetadataGraphUri(org.openrdf.model.URI namedGraphUri)
|
INamedGraphWithMetaData |
getNamedGraphRevision(org.openrdf.model.URI namedGraphUri,
long revision)
GetNamedGraphRevision returns a INamedGraphWithMetaData for a specific NamedGraph at a certain revision |
java.lang.String |
getServicePassword()
Get the Password for the current thread |
java.lang.String |
getServiceUser()
Get the UserId for the current thread |
long |
getSize(org.openrdf.model.URI namedGraphUri)
|
java.util.Set<org.openrdf.model.URI> |
getStoredNamedGraphs()
|
void |
reset(java.util.Collection<org.openrdf.model.Statement> statements)
Reset is a utility method that resets all data on the Anzo Server and sets system graph to some data. |
void |
setServicePassword(java.lang.String password)
Set the password for the current thread's operations |
void |
setServiceUser(java.lang.String userId)
Set the UserID for the current thread's operations |
IModelUpdate |
updateServer(ITransaction[] transactions,
boolean returnResults,
boolean isSynchronous)
UpdateServer sends a set of transactions to the server to be processed. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EmbeddedModelService(EmbeddedServiceBase baseService)
baseService - the base embedded service which this service is built upon| Method Detail |
|---|
public static IModelService getInstance(java.lang.Object parent,
java.util.Properties props)
parent - The object creating this serviceprops - The configuration properties for this service
public IModelUpdate updateServer(ITransaction[] transactions,
boolean returnResults,
boolean isSynchronous)
throws AnzoException
IModelService
updateServer in interface IModelServicetransactions - Set of transactions to commit on the server.returnResults - Should operation return the additions and deletions within the IModelUpdate objectisSynchronous - Should indexer run synchronously after committal of transactions.
AnzoException - if there was an error updating the server
public void reset(java.util.Collection<org.openrdf.model.Statement> statements)
throws AnzoException
IModelService
reset in interface IModelServicestatements - Set of statements that should be added to server as initial system data
AnzoException - if there was an error reseting the server
public long getSize(org.openrdf.model.URI namedGraphUri)
throws AnzoException
getSize in interface IModelServicenamedGraphUri - URI of NamedGraph
AnzoException - if there was an error getting size of NamedGraph from server
public org.openrdf.model.URI getMetadataGraphUri(org.openrdf.model.URI namedGraphUri)
throws AnzoException
getMetadataGraphUri in interface IModelServicenamedGraphUri - URI of NamedGraph
AnzoException - if there was an error getting NamedGraph's metadata URI from server
public info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> findStatements(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource g)
throws AnzoException
IModelService
findStatements in interface IModelServices - Subject resource to match, or wildcard if nullp - Predicate uri to match, or wildcard if nullo - Object value to match, or wildcard if nullg - Context values to match, or wildcard if null
AnzoException - if there was an error finding statements on the server
public info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> findStatements(org.openrdf.model.Statement statement)
throws AnzoException
IModelService
findStatements in interface IModelServicestatement - statement to match
AnzoException - if there was an error finding statements on the server
public info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> findStatements(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource g,
boolean includeInferedTriples)
throws AnzoException
IModelService
findStatements in interface IModelServices - Subject resource to match, or wildcard if nullp - Predicate uri to match, or wildcard if nullo - Object value to match, or wildcard if nullg - Context values to match, or wildcard if nullincludeInferedTriples - should inferred statements be included in find results
AnzoException - if there was an error finding statements on the server
public info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> findStatements(org.openrdf.model.Statement statement,
boolean includeInferedTriples)
throws AnzoException
IModelService
findStatements in interface IModelServicestatement - statement to matchincludeInferedTriples - should inferred statements be included in find results
AnzoException - if there was an error finding statements on the server
public QueryResult execQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphs,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query,
java.lang.String queryLanguage)
throws AnzoException
IModelService
execQuery in interface IModelServicedefaultNamedGraphs - URIS of NamedGraphs to union together as the defaultModel for the dataset the query is run againstgraphs - URIS of NamedGraphs for the dataset the query is run againstquery - Query stringqueryLanguage - Language of query
AnzoException - if there was an error querying the server
public QueryResult executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphs,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query)
throws AnzoException
IModelService
executeQuery in interface IModelServicedefaultNamedGraphs - URIS of NamedGraphs to union together as the defaultModel for the dataset the query is run againstgraphs - URIS of NamedGraphs for the dataset the query is run againstquery - Query string
AnzoException - if there was an error querying the server
public QueryResult executeQuery(java.util.Set<org.openrdf.model.URI> defaultNamedGraphs,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query,
org.openrdf.model.URI base)
throws AnzoException
IModelService
executeQuery in interface IModelServicedefaultNamedGraphs - URIS of NamedGraphs to union together as the defaultModel for the dataset the query is run againstgraphs - URIS of NamedGraphs for the dataset the query is run againstquery - Query stringbase - The base URI for resolving relative URIs in the SPARQL query.
AnzoException - if there was an error querying the server
public info.aduna.collections.iterators.CloseableIterator<org.openrdf.model.Statement> execQueryIndex(java.lang.String query,
int startIndex,
int numResults)
throws AnzoException
IModelService
execQueryIndex in interface IModelServicequery - Query stringstartIndex - offset into the number of results to returnnumResults - number of results to return
AnzoException - if there was an error querying the indexer on the server
public INamedGraphWithMetaData getNamedGraphRevision(org.openrdf.model.URI namedGraphUri,
long revision)
throws AnzoException
IModelService
getNamedGraphRevision in interface IModelServicenamedGraphUri - URI of NamedGraph to retrieverevision - Revision of NamedGraph to retrieve
AnzoException - if there was an error getting NamedGraph from server
public INamedGraphWithMetaData getCurrentNamedGraphRevision(org.openrdf.model.URI namedGraphUri)
throws AnzoException
IModelService
getCurrentNamedGraphRevision in interface IModelServicenamedGraphUri - URI of NamedGraph to retrieve
AnzoException - if there was an error getting NamedGraph from server
public java.util.Set<org.openrdf.model.URI> getStoredNamedGraphs()
throws AnzoException
getStoredNamedGraphs in interface IModelServiceAnzoException - if there was an error getting NamedGraph's authenticated client can read from serverpublic java.lang.String getServicePassword()
IService
getServicePassword in interface IServicepublic java.lang.String getServiceUser()
IService
getServiceUser in interface IServicepublic void setServicePassword(java.lang.String password)
IService
setServicePassword in interface IServicepassword - Password to use in current thread's operationspublic void setServiceUser(java.lang.String userId)
IService
setServiceUser in interface IServiceuserId - UserId to use in current thread's operationspublic void close()
IModelService
close in interface IModelService
public void addInferredObject(org.openrdf.model.URI prop,
org.openrdf.model.URI obj,
org.openrdf.model.URI inferredObj)
throws AnzoException
IModelService
addInferredObject in interface IModelServiceprop - property with inferred objectobj - objectinferredObj - inferred object
AnzoException - if there was an error adding inferred object to server
public void addInferredProperty(org.openrdf.model.URI prop,
org.openrdf.model.URI inferredProp)
throws AnzoException
IModelService
addInferredProperty in interface IModelServiceprop - property that has an inferred propertyinferredProp - inferred property
AnzoException - if there was an error adding inferred property to server
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||