|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.services.impl.WSBaseService
org.openanzo.services.impl.WSModelService
public class WSModelService
Implementation of IModelService that uses WebService/Soap to talk to a remote Anzo Server.
| Constructor Summary | |
|---|---|
WSModelService(java.util.Properties properties)
Create new WSModelService with configuration properties provided in Properties object |
|
WSModelService(java.lang.String serviceHostName,
int servicePort,
java.lang.String serviceUser,
java.lang.String servicePassword,
int serviceTimeout)
Create new WSModelService with given configuration properties |
|
| 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> defaultGraphUris,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query,
java.lang.String queryLanguage)
Deprecated. |
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> defaultGraphUris,
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> defaultGraphUris,
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 subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
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 subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context,
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 |
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 |
long |
getSize(org.openrdf.model.URI namedGraphUri)
|
java.util.Set<org.openrdf.model.URI> |
getStoredNamedGraphs()
|
void |
reset(java.util.Collection<org.openrdf.model.Statement> metaData)
Reset is a utility method that resets all data on the Anzo Server and sets system graph to some data. |
IModelUpdate |
updateServer(ITransaction[] transactions,
boolean returnResults,
boolean isIndexSynchronous)
UpdateServer sends a set of transactions to the server to be processed. |
| Methods inherited from class org.openanzo.services.impl.WSBaseService |
|---|
getServiceHostName, getServicePassword, getServicePort, getServiceUser, setServiceHostName, setServicePassword, setServicePort, setServiceUser |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openanzo.services.IService |
|---|
getServicePassword, getServiceUser, setServicePassword, setServiceUser |
| Constructor Detail |
|---|
public WSModelService(java.lang.String serviceHostName,
int servicePort,
java.lang.String serviceUser,
java.lang.String servicePassword,
int serviceTimeout)
serviceHostName - Hostname for Anzo serverservicePort - Port for Anzo serverserviceUser - Username for Anzo serverservicePassword - Password for Anzo serverserviceTimeout - Number of milliseconds to wait before timeing out call to serverpublic WSModelService(java.util.Properties properties)
properties - Configuration properties| Method Detail |
|---|
public IModelUpdate updateServer(ITransaction[] transactions,
boolean returnResults,
boolean isIndexSynchronous)
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 objectisIndexSynchronous - 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> metaData)
throws AnzoException
IModelService
reset in interface IModelServicemetaData - 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.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 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 subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context)
throws AnzoException
IModelService
findStatements in interface IModelServicesubj - Subject resource to match, or wildcard if nullprop - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullcontext - 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.Resource subj,
org.openrdf.model.URI prop,
org.openrdf.model.Value obj,
org.openrdf.model.Resource context,
boolean includeInferedTriples)
throws AnzoException
IModelService
findStatements in interface IModelServicesubj - Subject resource to match, or wildcard if nullprop - Predicate uri to match, or wildcard if nullobj - Object value to match, or wildcard if nullcontext - 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 QueryResult execQuery(java.util.Set<org.openrdf.model.URI> defaultGraphUris,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query,
java.lang.String queryLanguage)
throws AnzoException
IModelService
execQuery in interface IModelServicedefaultGraphUris - 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> defaultGraphUris,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query)
throws AnzoException
IModelService
executeQuery in interface IModelServicedefaultGraphUris - 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> defaultGraphUris,
java.util.Set<org.openrdf.model.URI> graphs,
java.lang.String query,
org.openrdf.model.URI base)
throws AnzoException
IModelService
executeQuery in interface IModelServicedefaultGraphUris - 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 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 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 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 serverpublic void close()
IModelService
close in interface IModelService
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 server
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 | |||||||||