|
Xindice API version 1.2m1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.xindice.core.CollectionManager
org.apache.xindice.core.Collection
Collection represents a collection of Documents maintains links to the Filer storage implementation, and the Indexes associated with the Collection.
| Constructor Summary | |
protected |
Collection()
|
|
Collection(Collection parent)
|
| Method Summary | |
boolean |
close()
close closes the DBObject |
boolean |
create()
create creates a new DBObject and any associated resources for the new DBObject, such as disk files, etc. |
Collection |
createCollection(String path,
Configuration config)
createCollection creates a new Collection object and any associated system resources that the Collection will need. |
Indexer |
createIndexer(Configuration config)
createIndexer creates a new Indexer object and any associated system resources that the Indexer will need. |
protected Key |
createNewKey(Object key)
createNewKey allocates a new key to be used as a key in the collection. |
Key |
createNewOID()
createNewOID allocates a new Object ID to be used as a Key in the Collection. |
boolean |
drop()
drop instructs the DBObjectimplementation to remove itself from existence. |
boolean |
dropCollection(Collection collection)
dropCollection physically removes the specified Collection and any associated system resources that the Collection uses. |
boolean |
dropIndexer(Indexer index)
dropIndexer physically removes the specified Indexer and any associated system resources that the Indexer uses. |
boolean |
exists()
exists returns whether or not a physical representation of this DBObject actually exists. |
byte[] |
getBinary(Object key)
Retrieve a binary database entry by key. |
String |
getCanonicalDocumentName(Key key)
getCanonicalDocumentName returns the canonical name for the specified Key in relation to this Collection. |
String |
getCanonicalDocumentName(String key)
From the document key and this collection canonical name, composes canonical document name. |
String |
getCanonicalName()
getCanonicalName returns the canonical name of this Collection. |
MetaData |
getCollectionMeta()
Return the MetaData for this collection. |
File |
getCollectionRoot()
|
Container |
getContainer(Object docKey)
getContainer retrieves a Container from the Collection. |
Database |
getDatabase()
getDatabase returns the Database owner for this Collection. |
org.w3c.dom.Document |
getDocument(Object key)
getDocument retrieves a Document by Key. |
long |
getDocumentCount()
getDocumentCount returns the count of Documents being maintained by this Collection. |
MetaData |
getDocumentMeta(String id)
Return the MetaData object for a document within this collection. |
DocumentSet |
getDocumentSet()
getDocumentSet returns the set of Documents being maintained by this Collection. |
Entry |
getEntry(Object id)
Retrieve a database entry by key. |
Entry |
getEntryMeta(Object id)
Retrieve a database entry metadata by key. |
Filer |
getFiler()
getFiler returns the low-level Filer instance underlying the Collection instance. |
Indexer |
getIndexer(String name)
getIndexer retrieves an Indexer by name. |
IndexManager |
getIndexManager()
return the IndexManager being used by this Collection. |
String |
getName()
getName retrieves the contextually important name of the object |
XMLSerializable |
getObject(Object key)
getObject instantiates and returns an XMLSerializable object based on the provided Key. |
Collection |
getParentCollection()
getParentCollection returns the parent Collection of this Collection. |
QueryEngine |
getQueryEngine()
getQueryEngine returns the Database's Query Engine |
SymbolTable |
getSymbols()
getSymbols returns the SymbolTable in use by this Collection. |
SystemCollection |
getSystemCollection()
getSystemCollection returns the System Collection. |
Key |
insertBinary(byte[] bytes)
Insert a binary object into a Xindice Collection. |
Key |
insertBinary(Object docKey,
byte[] bytes)
insertBinary inserts a new binary object into a Xindice Collection. |
Key |
insertDocument(org.w3c.dom.Document document)
insertDocument inserts a new Document into a Xindice Collection. |
Key |
insertDocument(Object docKey,
org.w3c.dom.Document document)
insertDocument inserts a new Document into a Xindice Collection. |
Key |
insertObject(String objKey,
XMLSerializable obj)
insertObject inserts an XMLSerializable object into the Collection based on the specified Key. |
Key |
insertObject(XMLSerializable obj)
insertObject inserts an XMLSerializable object into the Collection and returns a newly generated Key. |
boolean |
isMetaEnabled()
Returns whether or not meta data is enabled. |
boolean |
isOpened()
isOpened returns whether or not the DBObject is opened for business. |
String[] |
listDocuments()
listDocuments returns a list of all entry keys stored by this collection. |
String[] |
listIndexers()
listIndexers returns a list of the currently registered Indexers as an array of String. |
boolean |
open()
open opens the DBObject |
NodeSet |
queryCollection(String style,
String query,
NamespaceMap nsMap)
queryCollection performs a query against the current collection using the specified style and query String. |
NodeSet |
queryDocument(String style,
String query,
NamespaceMap nsMap,
Object key)
queryDocument performs a query against a single Document using the specified style, query string, and Document ID. |
void |
remove(Object id)
remove removes an object from the Collection based on its Key, regardless of it's type. |
boolean |
setBinary(Object docKey,
byte[] bytes)
setBinary inserts or updates binary object into a Xindice Collection. |
protected void |
setCanonicalName(String canonicalName)
|
void |
setCollectionMeta(MetaData meta)
Reset the metadata object for this collection. |
protected void |
setCollectionRoot(File collectionRoot)
|
void |
setConfig(Configuration config)
setConfig sets the configuration information for the Configurable object instance. |
boolean |
setDocument(Object docKey,
org.w3c.dom.Document document)
setDocument inserts or updates an existing Document in a Xindice Collection. |
void |
setDocumentMeta(String id,
MetaData meta)
Set the metadata associated with a document within this collection. |
protected void |
setName(String name)
|
void |
setObject(Object key,
XMLSerializable obj)
setObject sets an XMLSerializable object in the Collection based on the provided Key. |
protected void |
updateCollectionMeta()
update the modified time of this collection when appropriate |
protected void |
updateDocumentMeta(Record record)
update the modified time of this document when appropriate |
| Methods inherited from class org.apache.xindice.core.CollectionManager |
addCollection, countCollections, getCollection, getCollections, getConfig, listCollections |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.xindice.util.Configurable |
getConfig |
| Constructor Detail |
protected Collection()
public Collection(Collection parent)
parent - parent collection| Method Detail |
protected void setName(String name)
name - collection nameprotected final void setCanonicalName(String canonicalName)
protected final void setCollectionRoot(File collectionRoot)
protected final Key createNewKey(Object key)
key parameter string value
used for the key. If passed key parameter is null, new OID is generated.
key - The Key hint, can be null
public boolean isOpened()
DBObject
isOpened in interface DBObject
public boolean exists()
throws DBException
DBObject
exists in interface DBObjectDBException - if operation failedDBObject.exists()
public boolean create()
throws DBException
DBObject
create in interface DBObjectDBException - if operation failedDBObject.create()
public final boolean open()
throws DBException
DBObject
open in interface DBObjectDBException - if operation failed
public boolean drop()
throws DBException
DBObject
drop in interface DBObjectDBException - if operation failedDBObject.drop()
public boolean close()
throws DBException
DBObject
close in interface DBObjectclose in class CollectionManagerDBExceptionDBObject.close()
public void setConfig(Configuration config)
throws XindiceException
Configurable
setConfig in interface ConfigurablesetConfig in class CollectionManagerXindiceExceptionConfigurable.setConfig(org.apache.xindice.util.Configuration)
public final Collection createCollection(String path,
Configuration config)
throws DBException
CollectionManager
createCollection in class CollectionManagerpath - The relative path of the Collectionconfig - The Collection's configuration
DBException - if operation failedCollectionManager.createCollection(String, Configuration)
public final boolean dropCollection(Collection collection)
throws DBException
CollectionManager
dropCollection in class CollectionManagercollection - The Collection to drop
DBException - if operation failedCollectionManager.dropCollection(Collection)public Database getDatabase()
public final Collection getParentCollection()
throws DBException
DBException - if operation failedpublic SystemCollection getSystemCollection()
public final String getName()
Named
getName in interface Namedpublic final String getCanonicalName()
public final String getCanonicalDocumentName(Key key)
key - The Key
public final String getCanonicalDocumentName(String key)
key - document key
public final File getCollectionRoot()
public final SymbolTable getSymbols()
public final Filer getFiler()
public QueryEngine getQueryEngine()
throws DBException
DBException - if operation failed
public final IndexManager getIndexManager()
throws DBException
DBException - if operation failed
public final Indexer getIndexer(String name)
throws DBException
name - The Indexer name
DBException - if operation failed
public final String[] listIndexers()
throws DBException
DBException - if operation failed
public final Indexer createIndexer(Configuration config)
throws DBException
config - The Indexer's configuration
DBException - if operation failed
public final boolean dropIndexer(Indexer index)
throws DBException
index - The Indexer to drop
DBException - if operation failedpublic final Key createNewOID()
public final Entry getEntry(Object id)
throws DBException
id - identifying the desired database entry
DBException - in case of backing store error,
and in case of header corruption
public final org.w3c.dom.Document getDocument(Object key)
throws DBException
key - The Document Key
DBException - if operation failed
public final XMLSerializable getObject(Object key)
throws DBException
key - The Document Key
DBException - if operation failed
public final byte[] getBinary(Object key)
throws DBException
key - identifying the desired database entry
DBException - if inline-metadata is not enabled
(binary resource cannot be stored in a collection
which does not have inline-metadata enabled),
in case of backing store error, and in case of
header corruption
public final Key insertDocument(org.w3c.dom.Document document)
throws DBException
document - The Document
DBException - if operation failed
public final Key insertDocument(Object docKey,
org.w3c.dom.Document document)
throws DBException
docKey - The document Keydocument - The document to insert
DBException - if operation failed
public final Key insertObject(XMLSerializable obj)
throws DBException
obj - The Object to insert
DBException - if operation failed
public final Key insertObject(String objKey,
XMLSerializable obj)
throws DBException
objKey - The Key to useobj - The Object to insert
DBException - if operation failed
public Key insertBinary(byte[] bytes)
throws DBException
bytes - The bytes making up the binary object to insert
DBException - if inline-metadata is not enabled, or an
error occurs while saving.
public Key insertBinary(Object docKey,
byte[] bytes)
throws DBException
docKey - The document Keybytes - The document to insert
DBException - if inline-metadata is not enabled, the key is
already in the database, or an error occurs while saving.
public final boolean setDocument(Object docKey,
org.w3c.dom.Document document)
throws DBException
docKey - The Document Keydocument - The Document
DBException - if operation failed
public final void setObject(Object key,
XMLSerializable obj)
throws DBException
key - The Key to useobj - The Object to set
DBException - if operation failed
public boolean setBinary(Object docKey,
byte[] bytes)
throws DBException
docKey - The document Keybytes - The document to insert
DBException - if inline-metadata is not enabled, the key is
already in the database, or an error occurs while saving.
public final void remove(Object id)
throws DBException
id - The Object's Key
DBException - if operation failedpublic boolean isMetaEnabled()
public MetaData getCollectionMeta()
throws DBException
DBException - if operation failed
public void setCollectionMeta(MetaData meta)
throws DBException
meta - the Metadata to use
DBException - if operation failed
public final Entry getEntryMeta(Object id)
throws DBException
id - identifying the desired database entry
DBException - in case of backing store error,
and in case of header corruption
public MetaData getDocumentMeta(String id)
throws DBException
id - the document whose metadata you want
DBException - if operation failed
public void setDocumentMeta(String id,
MetaData meta)
throws DBException
id - the document namemeta - the metadata object to be used.
DBException - if operation failedprotected void updateCollectionMeta()
protected void updateDocumentMeta(Record record)
throws DBException
record - database record for which metadata should be updated
DBException - if operation failed
public final Container getContainer(Object docKey)
throws DBException
docKey - The Document Key
DBException - if operation failed
public final long getDocumentCount()
throws DBException
DBException - if operation failed
public final DocumentSet getDocumentSet()
throws DBException
DBException - if operation failed
public final String[] listDocuments()
throws DBException
DBException - if operation failed
public final NodeSet queryCollection(String style,
String query,
NamespaceMap nsMap)
throws DBException
style - The query style to use (ex: XPath)query - The query to executensMap - The namespace Map (if any)
DBException - if operation failed
public final NodeSet queryDocument(String style,
String query,
NamespaceMap nsMap,
Object key)
throws DBException
style - The query style to use (ex: XPath)query - The query to executensMap - The namespace Map (if any)key - The Document to query
DBException - if operation failed
|
Xindice API version 1.2m1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||