|
dbXML API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Indexer is the abstract indexing interface for dbXML. An Indexer
object is implemented in order to retrieve and manage indexes.
Any number of Indexer instances may be associated with a single
Collection. The type of Indexer utilized by a query depends on
the 'Style' of Indexer and the type of QueryResolver that is being
used to performt he query. Currently, dbXML only internally
supports one kind of Indexer: 'XPath'.
Field Summary | |
static java.lang.String |
STYLE_FULLTEXT
|
static java.lang.String |
STYLE_NODENAME
|
static java.lang.String |
STYLE_NODEVALUE
|
Method Summary | |
void |
add(Transaction tx,
java.lang.String value,
Key key,
int pos,
int elemID,
int attrID)
add adds a Document to the Indexer. |
boolean |
close()
close closes the Indexer |
boolean |
create()
create creates a new Indexer and any associated resources for the new Indexer, such as disk files, etc. |
boolean |
drop()
drop instructs the Indexer implementation to remove itself from existence. |
boolean |
exists()
exists returns whether or not a physical representation of this Indexer actually exists. |
void |
flush(Transaction tx)
flush forcefully flushes any unwritten buffers to disk. |
java.lang.String |
getIndexStyle()
getIndexStyle returns the Index style. |
java.lang.String |
getName()
getName returns the name of this Indexer. |
java.lang.String |
getPattern()
getPattern returns the pattern recognized by this Indexer. |
TransactionLog |
getTransactionLog()
getTransactionLog returns the Transaction Log for this Indexer. |
boolean |
isOpened()
isOpened returns whether or not the Indexer is opened for business. |
boolean |
open()
open opens the Indexer |
IndexMatch[] |
queryMatches(Transaction tx,
IndexQuery query)
queryMatches retrieves a set of MatchEntry instances that match the supplied query. |
void |
remove(Transaction tx,
java.lang.String value,
Key key,
int pos,
int elemID,
int attrID)
remove removes all references to the specified Key from the Indexer. |
void |
setCollection(Collection collection)
setCollection tells the Indexer who its parent is. |
Methods inherited from interface com.dbxml.util.Configurable |
getConfig, setConfig |
Field Detail |
public static final java.lang.String STYLE_NODENAME
public static final java.lang.String STYLE_NODEVALUE
public static final java.lang.String STYLE_FULLTEXT
Method Detail |
public java.lang.String getName()
public boolean create() throws DBException
DBException
public boolean open() throws DBException
DBException
public boolean isOpened() throws DBException
DBException
public boolean exists() throws DBException
DBException
public boolean drop() throws DBException
DBException
public boolean close() throws DBException
DBException
public void setCollection(Collection collection)
collection
- The owner Collectionpublic java.lang.String getIndexStyle()
public java.lang.String getPattern()
contact@name Indexes all contacts by name attribute memo Indexes the text of all memo elements contact@* Indexes all contact attributes *@name Indexes the name attribute for all elements * Indexes the text of all elements *@* Indexes all attributes of all elementsThese patterns are used by the IndexManager when handling SAX events. All events that match the specified pattern will result in an add or remove call to the Indexer.
public void remove(Transaction tx, java.lang.String value, Key key, int pos, int elemID, int attrID) throws DBException
tx
- The controlling Transactionvalue
- The value to removekey
- The Object IDpos
- The offset into the stream the Element occurs atelemID
- The Element ID of the valueattrID
- The Attribute ID of the value (if any, else -1)
DBException
public void add(Transaction tx, java.lang.String value, Key key, int pos, int elemID, int attrID) throws DBException
tx
- The controlling Transactionvalue
- The value to removekey
- The Object IDpos
- The offset into the stream the Element occurs atelemID
- The Element ID of the valueattrID
- The Attribute ID of the value (if any, else -1)
DBException
public IndexMatch[] queryMatches(Transaction tx, IndexQuery query) throws DBException
tx
- The controlling Transactionquery
- The IndexQuery to use
DBException
public void flush(Transaction tx) throws DBException
tx
- The controlling Transaction
DBException
public TransactionLog getTransactionLog() throws DBException
DBException
|
dbXML API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |