|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.repository.base.RepositoryConnectionBase
org.openrdf.repository.base.RepositoryConnectionWrapper
org.openrdf.repository.contextaware.ContextAwareConnection
org.openrdf.repository.object.ObjectConnection
public class ObjectConnection
Primary interface for object retrieval and persistence.
| Constructor Summary | |
|---|---|
ObjectConnection(ObjectRepository repository,
RepositoryConnection connection,
ObjectFactory factory,
TypeManager types)
|
|
| Method Summary | ||
|---|---|---|
void |
addCommitTask(Runnable task)
|
|
|
addDesignation(Object entity,
Class<T> concept)
Explicitly adds the concept to the entity. |
|
Object |
addDesignation(Object entity,
String uri)
Explicitly adds the type to the entity. |
|
Object |
addDesignation(Object entity,
URI type)
Explicitly adds the type to the entity. |
|
Object |
addDesignations(Object entity,
String... uris)
Explicitly adds the types to the entity. |
|
Object |
addDesignations(Object entity,
URI... types)
Explicitly adds the types to the entity. |
|
Value |
addObject(Object instance)
Imports the instance into the RDF store, returning its RDF handle. |
|
void |
addObject(Resource resource,
Object entity)
Imports the entity into the RDF store using the given handle. |
|
void |
addObject(String uri,
Object entity)
Imports the entity into the RDF store using the given URI. |
|
void |
addRollbackTask(Runnable task)
|
|
void |
close()
|
|
static void |
close(Iterator<?> iter)
Closes open iterators. |
|
void |
commit()
|
|
String |
getLanguage()
The assign language for this connection, if any. |
|
|
getObject(Class<T> concept,
Resource resource)
Loads a single Object that is assumed to be of the given concept. |
|
|
getObject(Class<T> concept,
String uri)
Loads a single Object that is assumed to be of the given concept. |
|
Object |
getObject(String uri)
Loads a single Object by URI in String form. |
|
Object |
getObject(Value value)
Loads a single Object or converts the literal into an Object. |
|
ObjectFactory |
getObjectFactory()
Access to the ObjectFactory used with this connection. |
|
|
getObjects(Class<T> concept)
Matches objects that have the given concept rdf:type. |
|
|
getObjects(Class<T> concept,
Resource... resources)
Loads the list of resources assumed to implement the given concept. |
|
|
getObjects(Class<T> concept,
String... uris)
|
|
ObjectRepository |
getRepository()
|
|
ObjectQuery |
prepareObjectQuery(QueryLanguage ql,
String query)
Creates a new query that returns object(s). |
|
ObjectQuery |
prepareObjectQuery(QueryLanguage ql,
String query,
String baseURI)
Creates a new query that returns object(s). |
|
ObjectQuery |
prepareObjectQuery(String query)
Creates a new query that returns object(s). |
|
void |
removeDesignation(Object entity,
Class<?> concept)
Explicitly removes the concept from the entity. |
|
void |
removeDesignation(Object entity,
String uri)
Explicitly removes the type from the entity. |
|
void |
removeDesignation(Object entity,
URI type)
Explicitly removes the type from the entity. |
|
void |
removeDesignations(Object entity,
String... uris)
Explicitly removes the types from the entity. |
|
void |
removeDesignations(Object entity,
URI... types)
Explicitly removes the types from the entity. |
|
void |
rollback()
|
|
void |
setAutoCommit(boolean auto)
|
|
void |
setLanguage(String lang)
Assigns a language to this connection. |
|
| Methods inherited from class org.openrdf.repository.contextaware.ContextAwareConnection |
|---|
add, add, add, add, add, add, add, add, clear, export, exportStatements, getAddContexts, getArchiveContexts, getMaxQueryTime, getQueryLanguage, getReadContexts, getRemoveContexts, getStatements, hasStatement, hasStatement, isDelegatingRemove, isIncludeInferred, prepareBooleanQuery, prepareBooleanQuery, prepareGraphQuery, prepareGraphQuery, prepareGraphQuery, prepareQuery, prepareQuery, prepareQuery, prepareTupleQuery, prepareTupleQuery, prepareTupleQuery, remove, remove, remove, remove, removeWithoutCommit, setAddContexts, setArchiveContexts, setIncludeInferred, setMaxQueryTime, setQueryLanguage, setReadContexts, setRemoveContexts, size |
| Methods inherited from class org.openrdf.repository.base.RepositoryConnectionWrapper |
|---|
addWithoutCommit, clearNamespaces, exportStatements, exportStatements, getContextIDs, getDelegate, getNamespace, getNamespaces, getStatements, hasStatement, hasStatement, isAutoCommit, isDelegatingAdd, isDelegatingRead, isEmpty, isOpen, removeNamespace, setDelegate, setNamespace |
| Methods inherited from class org.openrdf.repository.base.RepositoryConnectionBase |
|---|
addInputStreamOrReader, addWithoutCommit, autoCommit, getValueFactory, removeWithoutCommit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openrdf.repository.RepositoryConnection |
|---|
getValueFactory |
| Constructor Detail |
|---|
public ObjectConnection(ObjectRepository repository,
RepositoryConnection connection,
ObjectFactory factory,
TypeManager types)
throws RepositoryException
RepositoryException| Method Detail |
|---|
public static void close(Iterator<?> iter)
iter - public ObjectRepository getRepository()
getRepository in interface RepositoryConnectiongetRepository in class RepositoryConnectionBase
public void close()
throws RepositoryException
close in interface RepositoryConnectionclose in class RepositoryConnectionWrapperRepositoryException
public void rollback()
throws RepositoryException
rollback in interface RepositoryConnectionrollback in class RepositoryConnectionWrapperRepositoryException
public void commit()
throws RepositoryException
commit in interface RepositoryConnectioncommit in class RepositoryConnectionWrapperRepositoryException
public void setAutoCommit(boolean auto)
throws RepositoryException
setAutoCommit in interface RepositoryConnectionsetAutoCommit in class RepositoryConnectionWrapperRepositoryExceptionpublic void addCommitTask(Runnable task)
public void addRollbackTask(Runnable task)
public String getLanguage()
public void setLanguage(String lang)
lang - such as "en"localizedpublic ObjectFactory getObjectFactory()
public Value addObject(Object instance)
throws RepositoryException
RepositoryException
public void addObject(String uri,
Object entity)
throws RepositoryException
RepositoryException
public void addObject(Resource resource,
Object entity)
throws RepositoryException
RepositoryException
public <T> T addDesignation(Object entity,
Class<T> concept)
throws RepositoryException
RepositoryException
public Object addDesignation(Object entity,
String uri)
throws RepositoryException
RepositoryException
public Object addDesignation(Object entity,
URI type)
throws RepositoryException
RepositoryException
public Object addDesignations(Object entity,
String... uris)
throws RepositoryException
RepositoryException
public Object addDesignations(Object entity,
URI... types)
throws RepositoryException
RepositoryException
public void removeDesignation(Object entity,
Class<?> concept)
throws RepositoryException
RepositoryException
public void removeDesignation(Object entity,
String uri)
throws RepositoryException
RepositoryException
public void removeDesignation(Object entity,
URI type)
throws RepositoryException
RepositoryException
public void removeDesignations(Object entity,
String... uris)
throws RepositoryException
RepositoryException
public void removeDesignations(Object entity,
URI... types)
throws RepositoryException
RepositoryException
public Object getObject(String uri)
throws RepositoryException
RepositoryException
public Object getObject(Value value)
throws RepositoryException
RepositoryException
public <T> T getObject(Class<T> concept,
String uri)
throws RepositoryException,
QueryEvaluationException
RepositoryException
QueryEvaluationException
public <T> T getObject(Class<T> concept,
Resource resource)
throws RepositoryException,
QueryEvaluationException
RepositoryException
QueryEvaluationException
public <T> Result<T> getObjects(Class<T> concept)
throws RepositoryException,
QueryEvaluationException
Result.asSet() method to
ensure uniqueness.
RepositoryException
QueryEvaluationExceptionaddDesignation(Object, Class)
public <T> Result<T> getObjects(Class<T> concept,
String... uris)
throws RepositoryException,
QueryEvaluationException
RepositoryException
QueryEvaluationException
public <T> Result<T> getObjects(Class<T> concept,
Resource... resources)
throws RepositoryException,
QueryEvaluationException
RepositoryException
QueryEvaluationException
public ObjectQuery prepareObjectQuery(QueryLanguage ql,
String query,
String baseURI)
throws MalformedQueryException,
RepositoryException
MalformedQueryException
RepositoryException
public ObjectQuery prepareObjectQuery(QueryLanguage ql,
String query)
throws MalformedQueryException,
RepositoryException
MalformedQueryException
RepositoryException
public ObjectQuery prepareObjectQuery(String query)
throws MalformedQueryException,
RepositoryException
MalformedQueryException
RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||