|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ispheres.server.core.ISphere
public class ISphere
This object defines the external interface of an "iSphere" and is reponsible for maintaining collections of information. An iSphere is a piece of middleware which sits between a repository and an application. It provides a layer of communication which is common across many differing repositories. The iSphere also allows a user to "drill down" and retrieve objects and metadata in their original form.
| Field Summary | |
|---|---|
static java.lang.String |
DATETIME_FORMAT
The date and time format that is used by the iSphere application. |
| Fields inherited from interface org.ispheres.shared.core.ISpherePublicInterface |
|---|
LOCAL_SCHEMA, UNIVERSAL_SCHEMA |
| Constructor Summary | |
|---|---|
ISphere(java.lang.String configFile)
Constructs an Isphere from a specific configuration file. |
|
| Method Summary | |
|---|---|
ProcessPublicInterface |
add(int collectionId,
MetadataObject localMetadata,
DigitalObject digitalObject)
Add the metadata and digital object to the local repository. |
LogFile |
consistancyCheck()
Checks the consistancy of the ISphere. |
TransformInterface[] |
getCapabilities(int collectionId)
Returns the list of transforms that can be performed on the objects stored in the specified collection. |
protected Collection |
getCollection(int collectionId)
Returns the collection identified by the specified collection identifier. |
MetadataObject |
getCollectionMetadata(int collectionId)
Returns the metadata for the collection with the specified identifier. |
java.util.Vector |
getCollections()
Returns the list of collections that are registered with this iSphere as a list. |
ProcessHandle |
getHandle(int hi)
This returns a handle to a process running within iSpheres. |
MetadataObject |
getISphereMetadata()
Returns the metadata object describing the iSphere. |
protected ThreadPool |
getISpherePool()
|
static java.lang.String |
getISphereURL()
Returns the full URL where the iSphere is located. |
Schema |
getLocalSchema(int collectionId)
Returns the local schema used for a particular collection. |
ProcessPublicInterface |
getMetadata(int collectionId,
int sri,
boolean schema)
Retrieve the specified metadata record from the collection. |
int |
getNumCollections()
This function returns the number of collections held by this iSphere. |
ProcessPublicInterface |
getObject(int collectionId,
int sri)
Retrieve the specified ISphereObject from the collection. |
ProcessPublicInterface |
getTransformedObject(int collectionId,
int sri,
TransformInterface[] trans)
Retrieves a transformed object using the object in the specified collection at the specified record index as the source and using the supplied array of transforms as input for the transformation process. |
ProcessPublicInterface |
numSearchCollectionResults(int collectionId,
java.lang.String searchTerm)
Returns the total number of objects that match the specified search term. |
ProcessPublicInterface |
registerCollectionWithAuthorityServer(int collectionId)
Registers a collection within this iSphere with the central authority server. |
ProcessPublicInterface |
registerWithAuthorityServer()
Registers this iSphere with the central authority server. |
ProcessPublicInterface |
remove(int collectionId,
int sri)
Remove the specified record from the collection. |
ProcessPublicInterface |
searchCollection(int collectionId,
java.lang.String searchTerm,
int offSet,
int num,
boolean universal)
Searches the local collection for objects that match the specified search term and are within the specified bounds and optionally returns results in the universal schema rather than the local schema. |
SearchPublicInterface |
searchForCollections(java.lang.String searchTerm,
int num)
Search for a specific collection, this function will search the authority isphere for collections which match the specified search term. |
SearchPublicInterface |
searchForISpheres(java.lang.String searchTerm,
int num)
Searches for a specific iSphere, this function will search the authority server for iSpheres. |
SearchPublicInterface |
searchLocalCollection(int collectionId,
java.lang.String searchTerm,
int num)
Spawns a search process which will search a local collection for objects that match the specified search parameters. |
ProcessPublicInterface |
setMetadata(int collectionId,
int sri,
MetadataObject localMetadata)
Replace the current records metadata with the new metadata. |
void |
shutDownISphere()
This function shutsdown the HTTP server (and ISphere). |
void |
writeConfiguration()
Writes out the current in-memory configuration to the configuration file from where the ISphere was configured. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DATETIME_FORMAT
| Constructor Detail |
|---|
public ISphere(java.lang.String configFile)
throws java.lang.Exception
configFile - A File object representing the XML configuration file.
java.lang.Exception - Thrown when the iSphere cannot be initialised.| Method Detail |
|---|
public final ProcessPublicInterface add(int collectionId,
MetadataObject localMetadata,
DigitalObject digitalObject)
throws ISphereException
add in interface ISpherePublicInterfacecollectionId - the collection to add the new digital object too.localMetadata - The metadata of the digtial object being added to
the local repository.digitalObject - The ISphereObject that is being added to the local
repository.
ISphereException - When unable to create add process.Add
public final LogFile consistancyCheck()
throws ISphereException
consistancyCheck in interface ISphereAdminInterfaceISphereException - Thrown when unable to check consistancy of the
the iSphere.
public final TransformInterface[] getCapabilities(int collectionId)
throws ISphereException
getCapabilities in interface ISpherePublicInterfacecollectionId - The collection identifier of the collection
to get the capabilities for.
ISphereException - If the specified collection does not exist.protected final Collection getCollection(int collectionId)
collectionId - An int specifying the index of the collection in the
list of collections.
public final java.util.Vector getCollections()
public final MetadataObject getCollectionMetadata(int collectionId)
throws ISphereException
getCollectionMetadata in interface ISpherePublicInterfacecollectionId - The unique identifier of the collection to get
the metadata for.
ISphereException - If the specified collection does not exist.org.ispheres.server.core.process.GetCollectionMetadatapublic final MetadataObject getISphereMetadata()
getISphereMetadata in interface ISpherePublicInterfaceprotected final ThreadPool getISpherePool()
public static final java.lang.String getISphereURL()
public final Schema getLocalSchema(int collectionId)
throws ISphereException
getLocalSchema in interface ISpherePublicInterfacecollectionId - The id of the collection.
ISphereException - If the specified collection does not exist.
public final ProcessPublicInterface getMetadata(int collectionId,
int sri,
boolean schema)
throws ISphereException
getMetadata in interface ISpherePublicInterfacecollectionId - The collection containing the recordsri - The simple repository index of the record we want to retrieve.schema - Return the metadata object in the universal or local
schema. Use either UNIVERSAL_SCHEMA(true) or LOCAL_SCHEMA(false).
ISphereException - When unable to spawn the process which fetches
the metadata.GetMetadatapublic final int getNumCollections()
public final ProcessHandle getHandle(int hi)
throws ISphereException
hi - The index of the Process.
ISphereException - When unable to find the Process identified by
hi.
public final ProcessPublicInterface getObject(int collectionId,
int sri)
throws ISphereException
getObject in interface ISpherePublicInterfacecollectionId - The collection containing the digital object.sri - The simple repository index of the object we wish to fetch
from the local repository.
ISphereException - When unable to spawn the process which fetches
the digital object.GetObject
public final ProcessPublicInterface getTransformedObject(int collectionId,
int sri,
TransformInterface[] trans)
throws ISphereException
getTransformedObject in interface ISpherePublicInterfacecollectionId - The collection to retrieve a transformed object from.sri - The simple repository index of the original digital object.trans - An array of TransformInterfaces that holds the information
for each of the transformations to apply.
ISphereException - When unable to spawn the process which fetches
the transformed digital object.GetTransformedObject
public final ProcessPublicInterface registerCollectionWithAuthorityServer(int collectionId)
throws ISphereException
registerCollectionWithAuthorityServer in interface ISphereAdminInterfacecollectionId - The unique identifier of the collection to
register.
ISphereException - If the specified collection does not exist.AuthorityServerpublic final ProcessPublicInterface registerWithAuthorityServer()
registerWithAuthorityServer in interface ISphereAdminInterfaceRegisterISphere
public final ProcessPublicInterface remove(int collectionId,
int sri)
throws ISphereException
remove in interface ISpherePublicInterfacecollectionId - The collection to remove the digital object and
metadata from.sri - The simple repository index of the digital object you wish to
remove.
ISphereException - When unable to spawn the process that will
remove the entry.Remove
public final SearchPublicInterface searchForCollections(java.lang.String searchTerm,
int num)
throws ISphereException
searchForCollections in interface ISpherePublicInterfacesearchTerm - The term to use when searching for collections.num - The number of results to return when calling getResults on the
handle that is returned by this function.
ISphereException - thrown when unable to create the search process.org.ispheres.server.core.process.CollectionSearch
public final SearchPublicInterface searchForISpheres(java.lang.String searchTerm,
int num)
throws ISphereException
searchForISpheres in interface ISpherePublicInterfacesearchTerm - The term to use when searching for iSpheres.num - The number of results to return when calling getResults
on the handle that is returned by this function.
ISphereException - thrown when unable to create the search process.
public final ProcessPublicInterface searchCollection(int collectionId,
java.lang.String searchTerm,
int offSet,
int num,
boolean universal)
throws ISphereException
searchCollection in interface ISpherePublicInterfacecollectionId - The unique identifier of the collection to search for
objects.searchTerm - The term to use when searching for digital objects.offSet - The simple repository index to start searching from.num - The number of results to return when calling getResults
on the handle that is returned by this function.universal - Set to true when results should be returned in the
universal schema, rather than the local schema.
ISphereException - Thrown when unable to fetch the collection and
search it for metadata records.org.ispheres.server.core.process.LocalObjectSearch
public final ProcessPublicInterface numSearchCollectionResults(int collectionId,
java.lang.String searchTerm)
throws ISphereException
numSearchCollectionResults in interface ISpherePublicInterfacecollectionId - The unique identifier of the collection to search for
objects.searchTerm - The term to use when searching for digital objects.
ISphereException - Thrown when unable to fetch the collection and
count the number of metadatarecords that match the search term.NumSearchCollectionResults
public final SearchPublicInterface searchLocalCollection(int collectionId,
java.lang.String searchTerm,
int num)
throws ISphereException
searchLocalCollection in interface ISpherePublicInterfacecollectionId - The unique id of the local collection to search.searchTerm - The term to use when searching for digital objects.num - The number of results to return per page.
ISphereException - thrown when unable to create the searchProcess.
public final ProcessPublicInterface setMetadata(int collectionId,
int sri,
MetadataObject localMetadata)
throws ISphereException
setMetadata in interface ISpherePublicInterfacecollectionId - The collection containing the record, you wish to
update the metadata object of.sri - The simple repository index of the metadata record to update.localMetadata - The metadata to replace the old metadata with. (in
the local schema).
ISphereException - When unable to fetch to spawn SetMetadata
Process.SetMetadatapublic final void shutDownISphere()
shutDownISphere in interface ISphereAdminInterfacepublic final void writeConfiguration()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||