|
Franz Inc, AllegroGraph | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openrdf.repository.base.RepositoryConnectionBase
com.franz.agraph.repository.AGRepositoryConnection
public class AGRepositoryConnection
Implements the Sesame RepositoryConnection interface for AllegroGraph.
Constructor Summary | |
---|---|
AGRepositoryConnection(AGAbstractRepository repository,
com.franz.agraph.http.AGHttpRepoClient client)
|
Method Summary | ||
---|---|---|
void |
add(Iterable<? extends Statement> statements,
Resource... contexts)
|
|
|
add(info.aduna.iteration.Iteration<? extends Statement,E> statementIter,
Resource... contexts)
|
|
void |
addIndex(String type)
Adds the given index to the list of actively managed indices. |
|
void |
addRules(InputStream rulestream)
Adds Prolog rules to be used on this connection. |
|
void |
addRules(String rules)
Adds Prolog rules to be used on this connection. |
|
Object |
callStoredProc(String functionName,
String moduleName,
Object... args)
Deprecated. The stored proc feature and API are experimental, and subject to change in a future release. |
|
void |
clearMappings()
Deletes all predicate and datatype mappings for this connection. |
|
void |
clearNamespaces()
|
|
void |
close()
|
|
void |
commit()
|
|
void |
createFreetextIndex(String name,
AGFreetextIndexConfig config)
Creates a freetext index with the given name and configuration. |
|
void |
createFreetextIndex(String name,
URI[] predicates)
Deprecated. |
|
|
createRepositoryResult(Iterable<? extends E> elements)
Creates a RepositoryResult for the supplied element set. |
|
void |
deleteDatatypeMapping(URI datatype)
Deletes any datatype mapping associated with the given datatype. |
|
void |
deleteFreetextIndex(String name)
Deletes the freetext index of the specified name. |
|
void |
deletePredicateMapping(URI predicate)
Deletes any predicate mapping associated with the given predicate. |
|
void |
dropIndex(String type)
Drops the given index from the list of actively managed indices. |
|
String |
evalInServer(InputStream stream)
Evaluates a Lisp form on the server, and returns the result as a String. |
|
String |
evalInServer(String lispForm)
Evaluates a Lisp form on the server, and returns the result as a String. |
|
void |
exportStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
RDFHandler handler,
Resource... contexts)
|
|
RepositoryResult<Resource> |
getContextIDs()
|
|
String[] |
getDatatypeMappings()
Gets the datatype mappings defined for this connection. |
|
AGFreetextIndexConfig |
getFreetextIndexConfig(String index)
Gets the configuration of the specified free text index. |
|
String[] |
getFreetextIndices()
Deprecated. |
|
String[] |
getFreetextPredicates(String index)
Deprecated. |
|
RepositoryResult<Statement> |
getGeoHaversine(URI type,
URI predicate,
float lat,
float lon,
float radius,
String unit,
int limit,
boolean infer)
|
|
String[] |
getGeoTypes()
Gets the Geospatial types that have been registered. |
|
com.franz.agraph.http.AGHttpRepoClient |
getHttpRepoClient()
|
|
String |
getNamespace(String prefix)
|
|
RepositoryResult<Namespace> |
getNamespaces()
|
|
String[] |
getPredicateMappings()
Gets the predicate mappings defined for this connection. |
|
AGAbstractRepository |
getRepository()
|
|
RepositoryResult<Statement> |
getStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
Resource... contexts)
|
|
RepositoryResult<Statement> |
getStatementsInBox(URI type,
URI predicate,
float xmin,
float xmax,
float ymin,
float ymax,
int limit,
boolean infer)
|
|
RepositoryResult<Statement> |
getStatementsInCircle(URI type,
URI predicate,
float x,
float y,
float radius,
int limit,
boolean infer)
|
|
RepositoryResult<Statement> |
getStatementsInPolygon(URI type,
URI predicate,
URI polygon,
int limit,
boolean infer)
|
|
AGValueFactory |
getValueFactory()
|
|
boolean |
isAutoCommit()
|
|
List<AGFormattedNamespace> |
listEncodableNamespaces()
Returns a list of the registered encodable namespaces. |
|
List<String> |
listFreetextIndices()
Lists the freetext indices that have been defined for this repository. |
|
List<String> |
listIndices()
Returns a list of actively managed indices for this repository. |
|
List<String> |
listValidIndices()
Returns a list of all possible index types for this repository. |
|
void |
load(String absoluteServerPath,
String baseURI,
RDFFormat dataFormat,
Resource... contexts)
Instructs the server to load data from the specified server-side path. |
|
void |
load(URI source,
String baseURI,
RDFFormat dataFormat,
Resource... contexts)
Instructs the server to fetch and load data from the specified URI. |
|
void |
ping()
Instructs the server to extend the life of this connection's dedicated session, if it is using one. |
|
AGBooleanQuery |
prepareBooleanQuery(QueryLanguage ql,
String queryString)
|
|
AGBooleanQuery |
prepareBooleanQuery(QueryLanguage ql,
String queryString,
String baseURI)
|
|
AGGraphQuery |
prepareGraphQuery(QueryLanguage ql,
String queryString)
|
|
AGGraphQuery |
prepareGraphQuery(QueryLanguage ql,
String queryString,
String baseURI)
|
|
AGQuery |
prepareQuery(QueryLanguage ql,
String queryString,
String baseURI)
Unsupported method, throws an UnsupportedOperationException . |
|
AGTupleQuery |
prepareTupleQuery(QueryLanguage ql,
String queryString)
|
|
AGTupleQuery |
prepareTupleQuery(QueryLanguage ql,
String queryString,
String baseURI)
|
|
URI |
registerCartesianType(float stripWidth,
float xmin,
float xmax,
float ymin,
float ymax)
Registers a cartesian type. |
|
void |
registerDatatypeMapping(URI datatype,
URI primtype)
Registers a datatype mapping from the datatype to a primitive datatype. |
|
void |
registerEncodableNamespace(String namespace,
String format)
Registers an encodable namespace having the specified format. |
|
void |
registerEncodableNamespaces(Iterable<? extends AGFormattedNamespace> formattedNamespaces)
Registers multiple formatted namespaces in a single request. |
|
void |
registerPolygon(URI polygon,
List<Literal> points)
Registers a polygon. |
|
void |
registerPredicateMapping(URI predicate,
URI primtype)
Registers a predicate mapping from the predicate to a primitive datatype. |
|
void |
registerSNAGenerator(String generator,
List<URI> objectOfs,
List<URI> subjectOfs,
List<URI> undirecteds,
String query)
|
|
void |
registerSNANeighborMatrix(String matrix,
String generator,
List<URI> group,
int depth)
|
|
URI |
registerSphericalType(float stripWidth,
String unit)
|
|
URI |
registerSphericalType(float stripWidth,
String unit,
float latmin,
float lonmin,
float latmax,
float lonmax)
Registers a spherical type. |
|
void |
remove(Iterable<? extends Statement> statements,
Resource... contexts)
|
|
|
remove(info.aduna.iteration.Iteration<? extends Statement,E> statements,
Resource... contexts)
|
|
void |
removeNamespace(String prefix)
|
|
void |
rollback()
|
|
void |
sendRDFTransaction(InputStream rdftransaction)
Executes an application/x-rdftransaction. |
|
void |
setAutoCommit(boolean autoCommit)
|
|
void |
setNamespace(String prefix,
String name)
|
|
long |
size(Resource... contexts)
|
|
void |
unregisterEncodableNamespace(String namespace)
Unregisters the specified encodable namespace. |
Methods inherited from class org.openrdf.repository.base.RepositoryConnectionBase |
---|
add, add, add, add, add, add, clear, export, hasStatement, hasStatement, isEmpty, isOpen, prepareQuery, remove, remove |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.openrdf.repository.RepositoryConnection |
---|
add, add, add, add, add, add, clear, export, hasStatement, hasStatement, isEmpty, isOpen, prepareQuery, remove, remove |
Constructor Detail |
---|
public AGRepositoryConnection(AGAbstractRepository repository, com.franz.agraph.http.AGHttpRepoClient client)
Method Detail |
---|
public AGAbstractRepository getRepository()
getRepository
in interface RepositoryConnection
getRepository
in class RepositoryConnectionBase
public com.franz.agraph.http.AGHttpRepoClient getHttpRepoClient()
public AGValueFactory getValueFactory()
getValueFactory
in interface RepositoryConnection
getValueFactory
in class RepositoryConnectionBase
public void add(Iterable<? extends Statement> statements, Resource... contexts) throws RepositoryException
add
in interface RepositoryConnection
add
in class RepositoryConnectionBase
RepositoryException
public <E extends Exception> void add(info.aduna.iteration.Iteration<? extends Statement,E> statementIter, Resource... contexts) throws RepositoryException, E extends Exception
add
in interface RepositoryConnection
add
in class RepositoryConnectionBase
RepositoryException
E extends Exception
public void remove(Iterable<? extends Statement> statements, Resource... contexts) throws RepositoryException
remove
in interface RepositoryConnection
remove
in class RepositoryConnectionBase
RepositoryException
public <E extends Exception> void remove(info.aduna.iteration.Iteration<? extends Statement,E> statements, Resource... contexts) throws RepositoryException, E extends Exception
remove
in interface RepositoryConnection
remove
in class RepositoryConnectionBase
RepositoryException
E extends Exception
public void setAutoCommit(boolean autoCommit) throws RepositoryException
setAutoCommit
in interface RepositoryConnection
setAutoCommit
in class RepositoryConnectionBase
RepositoryException
public boolean isAutoCommit() throws RepositoryException
isAutoCommit
in interface RepositoryConnection
isAutoCommit
in class RepositoryConnectionBase
RepositoryException
public void commit() throws RepositoryException
commit
in interface RepositoryConnection
RepositoryException
public void rollback() throws RepositoryException
rollback
in interface RepositoryConnection
RepositoryException
public void clearNamespaces() throws RepositoryException
clearNamespaces
in interface RepositoryConnection
RepositoryException
public void close() throws RepositoryException
close
in interface Closeable
close
in interface RepositoryConnection
close
in class RepositoryConnectionBase
RepositoryException
public void exportStatements(Resource subj, URI pred, Value obj, boolean includeInferred, RDFHandler handler, Resource... contexts) throws RDFHandlerException, RepositoryException
exportStatements
in interface RepositoryConnection
RDFHandlerException
RepositoryException
public RepositoryResult<Resource> getContextIDs() throws RepositoryException
getContextIDs
in interface RepositoryConnection
RepositoryException
public <E> RepositoryResult<E> createRepositoryResult(Iterable<? extends E> elements)
public String getNamespace(String prefix) throws RepositoryException
getNamespace
in interface RepositoryConnection
RepositoryException
public RepositoryResult<Namespace> getNamespaces() throws RepositoryException
getNamespaces
in interface RepositoryConnection
RepositoryException
public RepositoryResult<Statement> getStatements(Resource subj, URI pred, Value obj, boolean includeInferred, Resource... contexts) throws RepositoryException
getStatements
in interface RepositoryConnection
RepositoryException
public AGQuery prepareQuery(QueryLanguage ql, String queryString, String baseURI)
UnsupportedOperationException
.
prepareQuery
in interface RepositoryConnection
public AGTupleQuery prepareTupleQuery(QueryLanguage ql, String queryString)
prepareTupleQuery
in interface RepositoryConnection
prepareTupleQuery
in class RepositoryConnectionBase
public AGTupleQuery prepareTupleQuery(QueryLanguage ql, String queryString, String baseURI)
prepareTupleQuery
in interface RepositoryConnection
public AGGraphQuery prepareGraphQuery(QueryLanguage ql, String queryString)
prepareGraphQuery
in interface RepositoryConnection
prepareGraphQuery
in class RepositoryConnectionBase
public AGGraphQuery prepareGraphQuery(QueryLanguage ql, String queryString, String baseURI)
prepareGraphQuery
in interface RepositoryConnection
public AGBooleanQuery prepareBooleanQuery(QueryLanguage ql, String queryString)
prepareBooleanQuery
in interface RepositoryConnection
prepareBooleanQuery
in class RepositoryConnectionBase
public AGBooleanQuery prepareBooleanQuery(QueryLanguage ql, String queryString, String baseURI)
prepareBooleanQuery
in interface RepositoryConnection
public void removeNamespace(String prefix) throws RepositoryException
removeNamespace
in interface RepositoryConnection
RepositoryException
public void setNamespace(String prefix, String name) throws RepositoryException
setNamespace
in interface RepositoryConnection
RepositoryException
public long size(Resource... contexts) throws RepositoryException
size
in interface RepositoryConnection
RepositoryException
public void createFreetextIndex(String name, AGFreetextIndexConfig config) throws RepositoryException
RepositoryException
public void deleteFreetextIndex(String name) throws RepositoryException
RepositoryException
public void createFreetextIndex(String name, URI[] predicates) throws RepositoryException
RepositoryException
createFreetextIndex(String, AGFreetextIndexConfig)
public String[] getFreetextPredicates(String index) throws RepositoryException
RepositoryException
getFreetextIndexConfig(String)
public AGFreetextIndexConfig getFreetextIndexConfig(String index) throws RepositoryException
RepositoryException
public String[] getFreetextIndices() throws RepositoryException
RepositoryException
listFreetextIndices()
public List<String> listFreetextIndices() throws RepositoryException
RepositoryException
public void registerPredicateMapping(URI predicate, URI primtype) throws RepositoryException
predicate
- the predicateprimtype
-
RepositoryException
public void deletePredicateMapping(URI predicate) throws RepositoryException
predicate
- the predicate
RepositoryException
public String[] getPredicateMappings() throws RepositoryException
RepositoryException
public void registerDatatypeMapping(URI datatype, URI primtype) throws RepositoryException
datatype
- the user datatypeprimtype
- the primitive type
RepositoryException
public void deleteDatatypeMapping(URI datatype) throws RepositoryException
datatype
- the user datatype
RepositoryException
public String[] getDatatypeMappings() throws RepositoryException
RepositoryException
public void clearMappings() throws RepositoryException
RepositoryException
public void addRules(String rules) throws RepositoryException
rules
- a string of rules.
RepositoryException
public void addRules(InputStream rulestream) throws RepositoryException
rulestream
- a stream of rules.
RepositoryException
public String evalInServer(String lispForm) throws RepositoryException
lispForm
- the Lisp form to evaluate, in a String.
RepositoryException
public String evalInServer(InputStream stream) throws RepositoryException
stream
- the Lisp form to evaluate, in a stream.
RepositoryException
public void load(URI source, String baseURI, RDFFormat dataFormat, Resource... contexts) throws RepositoryException
source
- the URI to fetch and load.baseURI
- the base URI for the source document.dataFormat
- the RDF data format for the source document.contexts
- zero or more contexts into which data will be loaded.
RepositoryException
public void load(String absoluteServerPath, String baseURI, RDFFormat dataFormat, Resource... contexts) throws RepositoryException
absoluteServerPath
- the path to the server-side source file.baseURI
- the base URI for the source document.dataFormat
- the RDF data format for the source document.contexts
- zero or more contexts into which data will be loaded.
RepositoryException
public void ping() throws RepositoryException
RepositoryException
public String[] getGeoTypes() throws RepositoryException
RepositoryException
public URI registerCartesianType(float stripWidth, float xmin, float xmax, float ymin, float ymax) throws RepositoryException
RepositoryException
public URI registerSphericalType(float stripWidth, String unit, float latmin, float lonmin, float latmax, float lonmax) throws RepositoryException
RepositoryException
public URI registerSphericalType(float stripWidth, String unit) throws RepositoryException
RepositoryException
public void registerPolygon(URI polygon, List<Literal> points) throws RepositoryException
RepositoryException
public RepositoryResult<Statement> getStatementsInBox(URI type, URI predicate, float xmin, float xmax, float ymin, float ymax, int limit, boolean infer) throws RepositoryException
RepositoryException
public RepositoryResult<Statement> getStatementsInCircle(URI type, URI predicate, float x, float y, float radius, int limit, boolean infer) throws RepositoryException
RepositoryException
public RepositoryResult<Statement> getGeoHaversine(URI type, URI predicate, float lat, float lon, float radius, String unit, int limit, boolean infer) throws RepositoryException
RepositoryException
public RepositoryResult<Statement> getStatementsInPolygon(URI type, URI predicate, URI polygon, int limit, boolean infer) throws RepositoryException
RepositoryException
public void registerSNAGenerator(String generator, List<URI> objectOfs, List<URI> subjectOfs, List<URI> undirecteds, String query) throws RepositoryException
RepositoryException
public void registerSNANeighborMatrix(String matrix, String generator, List<URI> group, int depth) throws RepositoryException
RepositoryException
public List<String> listIndices() throws OpenRDFException
OpenRDFException
public List<String> listValidIndices() throws OpenRDFException
OpenRDFException
public void addIndex(String type) throws RepositoryException
type
- a valid index type
RepositoryException
listValidIndices()
public void dropIndex(String type) throws RepositoryException
type
- an actively managed index type.
RepositoryException
listValidIndices()
public void sendRDFTransaction(InputStream rdftransaction) throws RepositoryException, RDFParseException, IOException
rdftransaction
- a stream in application/x-rdftransaction format
RepositoryException
RDFParseException
IOException
public void registerEncodableNamespace(String namespace, String format) throws RepositoryException
namespace
- a valid namespace, a URI refformat
- a valid format for an encodable namespace
RepositoryException
public void registerEncodableNamespaces(Iterable<? extends AGFormattedNamespace> formattedNamespaces) throws RepositoryException
formattedNamespaces
-
RepositoryException
public List<AGFormattedNamespace> listEncodableNamespaces() throws OpenRDFException
RepositoryException
OpenRDFException
public void unregisterEncodableNamespace(String namespace) throws RepositoryException
namespace
- the namespace to unregister.
RepositoryException
public Object callStoredProc(String functionName, String moduleName, Object... args) throws RepositoryException
The input arguments and the return value can be:
String
, Integer
, null, byte[],
or Object[] or List
of these (can be nested).
See also
getHttpRepoClient()
.callStoredProc
(functionName, moduleName, args)
functionName
- stored proc lisp function, for example "addTwo"moduleName
- lisp FASL file name, for example "example.fasl"args
- arguments to the stored proc
AGCustomStoredProcException
- for errors from stored proc
RepositoryException
|
Copyright © 2008-2010 Franz Inc. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |