Xindice API
version 1.2m1

org.apache.xindice.core
Class MetaSystemCollection

java.lang.Object
  extended byorg.apache.xindice.core.CollectionManager
      extended byorg.apache.xindice.core.Collection
          extended byorg.apache.xindice.core.MetaSystemCollection
All Implemented Interfaces:
Configurable, DBObject, Named

public final class MetaSystemCollection
extends Collection

MetaSystemCollection represents the Meta System Collection. Beyond standard Collection operations, this class will provide facilities for Meta data management.

Version:
$Revision: 541508 $, $Date: 2007-05-24 21:54:12 -0400 (Thu, 24 May 2007) $

Field Summary
static String COLLECTION_META_DATA
           
static String METACOL
           
static String METAS
           
 
Constructor Summary
MetaSystemCollection(Database db)
           
 
Method Summary
 void dropCollectionMeta(Collection collection)
          dropCollectionMeta removes the MetaData for the specified Collection.
 void dropDocumentMeta(Collection collection, String id)
          dropDocumentMeta removes the meta data for the specified document.
 MetaData getCollectionMeta(Collection collection)
          getCollectionMeta retrieves the MetaData for the specified Collection.
 MetaData getDocumentMeta(Collection collection, String id)
          getDocumentMeta retrieves the meta data for the specified document.
 Collection getMetaCollection(Collection collection, boolean create)
          Returns the corresponding Meta Collection for the given collection, optionally creating the hierarchy
 void init()
           
 void setCollectionMeta(Collection collection, MetaData meta)
          setCollectionMeta save the Meta for the specified Collection.
 void setDocumentMeta(Collection collection, String id, MetaData meta)
          setDocumentMeta sets the meta data for the specified document.
 
Methods inherited from class org.apache.xindice.core.Collection
close, create, createCollection, createIndexer, createNewKey, createNewOID, drop, dropCollection, dropIndexer, exists, getBinary, getCanonicalDocumentName, getCanonicalDocumentName, getCanonicalName, getCollectionMeta, getCollectionRoot, getContainer, getDatabase, getDocument, getDocumentCount, getDocumentMeta, getDocumentSet, getEntry, getEntryMeta, getFiler, getIndexer, getIndexManager, getName, getObject, getParentCollection, getQueryEngine, getSymbols, getSystemCollection, insertBinary, insertBinary, insertDocument, insertDocument, insertObject, insertObject, isMetaEnabled, isOpened, listDocuments, listIndexers, open, queryCollection, queryDocument, remove, setBinary, setCanonicalName, setCollectionMeta, setCollectionRoot, setConfig, setDocument, setDocumentMeta, setName, setObject, updateCollectionMeta, updateDocumentMeta
 
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
 

Field Detail

METACOL

public static final String METACOL
See Also:
Constant Field Values

METAS

public static final String METAS
See Also:
Constant Field Values

COLLECTION_META_DATA

public static final String COLLECTION_META_DATA
See Also:
Constant Field Values
Constructor Detail

MetaSystemCollection

public MetaSystemCollection(Database db)
Method Detail

init

public void init()
          throws DBException
Throws:
DBException

getMetaCollection

public Collection getMetaCollection(Collection collection,
                                    boolean create)
                             throws DBException
Returns the corresponding Meta Collection for the given collection, optionally creating the hierarchy

Parameters:
collection - the collection whose meta you want
create - whether or not to create the meta if its missing
Returns:
collection the meta collection for the requested collection
Throws:
DBException - if unable to get meta collection

dropCollectionMeta

public void dropCollectionMeta(Collection collection)
                        throws DBException
dropCollectionMeta removes the MetaData for the specified Collection.

Parameters:
collection - The Collection whose meta is required
Throws:
DBException - if unable to delete collection meta data

getCollectionMeta

public MetaData getCollectionMeta(Collection collection)
                           throws DBException
getCollectionMeta retrieves the MetaData for the specified Collection. Assumption is that the corresponding collection must already exist.

Parameters:
collection - The Collection whose meta is required
Returns:
The requested MetaData
Throws:
DBException - if unable to retrieve collection meta data

setCollectionMeta

public void setCollectionMeta(Collection collection,
                              MetaData meta)
                       throws DBException
setCollectionMeta save the Meta for the specified Collection.

Parameters:
collection - The Collection that owns the MetaData
meta - The MetaData
Throws:
DBException - if unable to update collection meta data

dropDocumentMeta

public void dropDocumentMeta(Collection collection,
                             String id)
                      throws DBException
dropDocumentMeta removes the meta data for the specified document.

Parameters:
collection - Document collection
id - Document key
Throws:
DBException - if unable to delete document meta data

getDocumentMeta

public MetaData getDocumentMeta(Collection collection,
                                String id)
                         throws DBException
getDocumentMeta retrieves the meta data for the specified document.

Parameters:
collection - Document collection
id - Document key
Returns:
The requested MetaData
Throws:
DBException - if unable to retrieve document meta data

setDocumentMeta

public void setDocumentMeta(Collection collection,
                            String id,
                            MetaData meta)
                     throws DBException
setDocumentMeta sets the meta data for the specified document.

Parameters:
collection - Document collection
id - Document key
meta - New document meta data
Throws:
DBException - if unable to update document meta data

Xindice API
version 1.2m1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.