public class EmbeddedRepository extends AbstractRepository implements Repository, SupportsSearchExcluding
Constructor and Description |
---|
EmbeddedRepository(android.content.Context context,
java.lang.String authority)
Creates an EmbeddedRepository pointing to a specific content provider specified by its authority.
|
Modifier and Type | Method and Description |
---|---|
android.os.Bundle |
call(java.lang.String method,
java.lang.String arg,
android.os.Bundle extras) |
void |
close()
Close the repository and release all resources.
|
DigitalObject |
createDigitalObject(java.lang.String handle)
Creates a new digital object with the given identifier in this repository.
|
void |
deleteDigitalObject(java.lang.String handle)
Deletes a digital object from the repository.
|
DigitalObject |
getDigitalObject(java.lang.String handle)
Returns the digital object with the given identifier from this repository.
|
static Repository |
getEmbeddedRepository(android.content.Context context)
Creates a repository used to access the embedded repository on the Android device.
|
CloseableIterator<java.lang.String> |
listHandles()
Provides a CloseableIterator view of the identifiers for digital objects accessible through this repository.
|
CloseableIterator<DigitalObject> |
listObjects()
Provides a CloseableIterator view of the digital objects accessible through this repository.
|
CloseableIterator<DigitalObject> |
search(Query query)
Provides a CloseableIterator view of the digital objects accessible through this repository under search bounds defined in the Query object with default parameters.
|
CloseableIterator<DigitalObject> |
searchExcluding(Query query,
java.util.Collection<java.lang.String> handles) |
CloseableIterator<java.lang.String> |
searchHandles(Query query)
Provides a CloseableIterator view of the digital objects handles accessible through this repository under search bounds defined in the Query object with default parameters.
|
CloseableIterator<java.lang.String> |
searchHandlesExcluding(Query query,
java.util.Collection<java.lang.String> handles) |
void |
setContext(android.content.Context context) |
boolean |
verifyDigitalObject(java.lang.String handle)
Verifies whether a digital object with the given identifier can be accessed via this repository.
|
getHandle, getOrCreateDigitalObject, search, search, searchHandles, searchHandles, searchMapping
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHandle, getOrCreateDigitalObject, search, search, searchHandles, searchHandles, searchMapping
public EmbeddedRepository(android.content.Context context, java.lang.String authority) throws RepositoryException
getEmbeddedRepository(Context)
to use the default provider.authority
- RepositoryException
public static Repository getEmbeddedRepository(android.content.Context context) throws RepositoryException
context
- the context of the Android application environment in which the repository will be accessedRepositoryException
public void setContext(android.content.Context context) throws RepositoryException
RepositoryException
public boolean verifyDigitalObject(java.lang.String handle) throws RepositoryException
Repository
verifyDigitalObject
in interface Repository
verifyDigitalObject
in class AbstractRepository
handle
- an identifier for a digital objectRepositoryException
public DigitalObject createDigitalObject(java.lang.String handle) throws CreationException, RepositoryException
Repository
null
requests that the repository assign a new unique identifier;
this method will throw UnsupportedOperationException
if the given repository does not support that functionality.createDigitalObject
in interface Repository
handle
- the identifier for the new digital object, or null
to request that the repository assign a new unique identifier.CreationException
- if an object with the given identifier already exists within the repositoryRepositoryException
public DigitalObject getDigitalObject(java.lang.String handle) throws RepositoryException
Repository
getDigitalObject
in interface Repository
handle
- the identifier for the digital objectRepositoryException
public void deleteDigitalObject(java.lang.String handle) throws RepositoryException
Repository
deleteDigitalObject
in interface Repository
deleteDigitalObject
in class AbstractRepository
handle
- the identifier for the digital objectRepositoryException
public CloseableIterator<java.lang.String> listHandles() throws RepositoryException
Repository
listHandles
in interface Repository
listHandles
in class AbstractRepository
RepositoryException
public CloseableIterator<DigitalObject> listObjects() throws RepositoryException
Repository
listObjects
in interface Repository
listObjects
in class AbstractRepository
RepositoryException
public CloseableIterator<DigitalObject> searchExcluding(Query query, java.util.Collection<java.lang.String> handles) throws RepositoryException
searchExcluding
in interface SupportsSearchExcluding
RepositoryException
public CloseableIterator<DigitalObject> search(Query query) throws RepositoryException
Repository
search
in interface Repository
search
in class AbstractRepository
query
- the query to performQueryResults
.RepositoryException
public CloseableIterator<java.lang.String> searchHandles(Query query) throws RepositoryException
Repository
searchHandles
in interface Repository
searchHandles
in class AbstractRepository
query
- the query to performQueryResults
.RepositoryException
public CloseableIterator<java.lang.String> searchHandlesExcluding(Query query, java.util.Collection<java.lang.String> handles) throws RepositoryException
searchHandlesExcluding
in interface SupportsSearchExcluding
RepositoryException
public void close()
Repository
close
in interface Repository
public android.os.Bundle call(java.lang.String method, java.lang.String arg, android.os.Bundle extras) throws RepositoryException
RepositoryException