|
Xindice API version 1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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 parentCollection)
|
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. |
void |
flushSymbolTable()
|
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 for this Object. |
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. |
Object |
getEntry(Object docKey)
Retrieve a database entry by key. |
Filer |
getFiler()
getFiler returns the low-level Filer instances 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 document 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 key)
remove removes an object from the Collection based on its Key, regardless of it's type. |
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. |
void |
setDocument(Object docKey,
org.w3c.dom.Document document)
setDocument overwrites/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 string)
|
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(String id)
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 parentCollection)
parentCollection
- Method Detail |
public boolean close() throws DBException
DBObject
close
in interface DBObject
close
in class CollectionManager
DBObject.close()
public boolean create() throws DBException
DBObject
create
in interface DBObject
DBObject.create()
public final Collection createCollection(String path, Configuration config) throws DBException
CollectionManager
createCollection
in class CollectionManager
CollectionManager.createCollection(java.lang.String, org.apache.xindice.util.Configuration)
public final Indexer createIndexer(Configuration config) throws DBException
config
- The Indexer's configurationprotected 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 nullpublic final Key createNewOID()
public boolean drop() throws DBException
DBObject
drop
in interface DBObject
DBObject.drop()
public final boolean dropCollection(Collection collection) throws DBException
CollectionManager
dropCollection
in class CollectionManager
CollectionManager.dropCollection(org.apache.xindice.core.Collection)
public final boolean dropIndexer(Indexer index) throws DBException
index
- The Indexer to droppublic boolean exists() throws DBException
DBObject
exists
in interface DBObject
DBObject.exists()
public final void flushSymbolTable() throws DBException
DBException
- public final byte[] getBinary(Object key) throws DBException
key
- identifying the desired database entryDBException
- 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 corruptionpublic final String getCanonicalDocumentName(Key key)
key
- The Keypublic final String getCanonicalDocumentName(String key)
key
- document keypublic final String getCanonicalName()
public MetaData getCollectionMeta() throws DBException
public final File getCollectionRoot()
public final Container getContainer(Object docKey) throws DBException
docKey
- The Document Keypublic Database getDatabase()
public final org.w3c.dom.Document getDocument(Object key) throws DBException
key
- The Document Keypublic final long getDocumentCount() throws DBException
public MetaData getDocumentMeta(String id) throws DBException
id
- the document whose metadata you wantpublic final DocumentSet getDocumentSet() throws DBException
public final Object getEntry(Object docKey) throws DBException
docKey
- identifying the desired database entryDBException
- in case of backing store error,
and in case of header corruptionpublic final Filer getFiler()
public final Indexer getIndexer(String name) throws DBException
name
- The Indexer namepublic final IndexManager getIndexManager() throws DBException
public final String getName()
Named
getName
in interface Named
org.apache.xindice.util.Named
public final XMLSerializable getObject(Object key) throws DBException
key
- The Document Keypublic final Collection getParentCollection() throws DBException
public QueryEngine getQueryEngine() throws DBException
public final SymbolTable getSymbols() throws DBException
public SystemCollection getSystemCollection() throws DBException
public Key insertBinary(byte[] bytes) throws DBException
bytes
- The bytes making up the binary object to insertDBException
- 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 insertDBException
- if inline-metadata is not enabled, the key is
already in the database, or an error occurs while saving.public final Key insertDocument(org.w3c.dom.Document document) throws DBException
document
- The Documentpublic final Key insertDocument(Object docKey, org.w3c.dom.Document document) throws DBException
docKey
- The document Keydocument
- The document to insertpublic final Key insertObject(XMLSerializable obj) throws DBException
obj
- The Object to insertpublic final Key insertObject(String objKey, XMLSerializable obj) throws DBException
objKey
- The Key to useobj
- The Object to insertpublic boolean isMetaEnabled()
public boolean isOpened() throws DBException
DBObject
isOpened
in interface DBObject
org.apache.xindice.core.DBObject
public final String[] listDocuments() throws DBException
public final String[] listIndexers() throws DBException
public final boolean open() throws DBException
DBObject
open
in interface DBObject
org.apache.xindice.core.DBObject
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)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 querypublic final void remove(Object key) throws DBException
key
- The Object's Keyprotected final void setCanonicalName(String canonicalName)
public void setCollectionMeta(MetaData meta) throws DBException
meta
- the Metadata to useprotected final void setCollectionRoot(File collectionRoot)
public void setConfig(Configuration config) throws XindiceException
Configurable
setConfig
in interface Configurable
setConfig
in class CollectionManager
org.apache.xindice.util.Configurable
config
- The configuration Nodepublic final void setDocument(Object docKey, org.w3c.dom.Document document) throws DBException
docKey
- The Document Keydocument
- The Documentpublic void setDocumentMeta(String id, MetaData meta) throws DBException
id
- the document namemeta
- the metadata object to be used.protected void setName(String string)
string
- public final void setObject(Object key, XMLSerializable obj) throws DBException
key
- The Key to useobj
- The Object to setprotected void updateCollectionMeta()
protected void updateDocumentMeta(String id) throws DBException
|
Xindice API version 1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |