|
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.indexer.MemValueIndexer
Provides an in-memory implementation of Xindice Indexer based upon the Java TreeSet class. This implementation is not persistent. A MemValueIndexer is useful for indexing of temporary Collections (e.g. those based on MemFiler). It is also useful for temporary indexing of persistent Collections.
Fields inherited from interface org.apache.xindice.core.indexer.Indexer |
STYLE_FULLTEXT, STYLE_NODENAME, STYLE_NODEVALUE |
Constructor Summary | |
MemValueIndexer()
|
Method Summary | |
void |
add(String theValue,
Key theKey,
int thePosition,
int theLength,
short theElementID,
short theAttributeID)
Adds a value reference to the index. |
boolean |
close()
Closes this index. |
boolean |
create()
Creates a new MemValueIndexer. |
boolean |
drop()
Removes this index from existence. |
boolean |
exists()
Indicates whether or not this index exists. |
void |
flush()
flush forcefully flushes any unwritten buffers to disk. |
Configuration |
getConfig()
getConfig retrieves the configuration information for the Configurable object instance. |
String |
getIndexStyle()
Provides the index style. |
String |
getName()
Provides the name of this index. |
String |
getPattern()
Provides the pattern recognized by this Indexer. |
boolean |
isOpened()
Indicates whether or not this indexer is open. |
boolean |
open()
Opens the index so it can be used. |
IndexMatch[] |
queryMatches(IndexQuery theQuery)
Provides a set of MatchEntry instances that match the specified query. |
void |
remove(String theValue,
Key theKey,
int thePosition,
int theLength,
short theElementID,
short theAttributeID)
Removes the specified value reference from the index. |
void |
setCollection(Collection theCollection)
Sets the parent Collection of this indexer. |
void |
setConfig(Configuration theConfig)
setConfig sets the configuration information for the Configurable object instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MemValueIndexer()
Method Detail |
public void setCollection(Collection theCollection)
setCollection
in interface Indexer
theCollection
- The owner Collectionpublic String getIndexStyle()
getIndexStyle
in interface Indexer
public 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.
getPattern
in interface Indexer
public void remove(String theValue, Key theKey, int thePosition, int theLength, short theElementID, short theAttributeID) throws DBException
remove
in interface Indexer
theValue
- The value to removetheKey
- The Object IDthePosition
- The offset into the stream the Element occurs attheLength
- The length of the substream for the ElementtheElementID
- The Element ID of the valuetheAttributeID
- The Attribute ID of the value (if any, else -1)public void add(String theValue, Key theKey, int thePosition, int theLength, short theElementID, short theAttributeID) throws DBException
add
in interface Indexer
theValue
- The value to addtheKey
- The Object IDthePosition
- The offset into the stream the Element occurs attheLength
- The length of the substream for the ElementtheElementID
- The Element ID of the valuetheAttributeID
- The Attribute ID of the value (if any, else -1)public IndexMatch[] queryMatches(IndexQuery theQuery) throws DBException
queryMatches
in interface Indexer
theQuery
- The IndexQuery to usepublic void flush() throws DBException
flush
in interface Indexer
public void setConfig(Configuration theConfig)
setConfig
in interface Configurable
theConfig
- The configuration Nodepublic Configuration getConfig()
getConfig
in interface Configurable
public boolean create() throws DBException
create
in interface DBObject
public boolean open() throws DBException
open
in interface DBObject
public boolean isOpened() throws DBException
isOpened
in interface DBObject
public boolean exists() throws DBException
exists
in interface DBObject
public boolean drop() throws DBException
drop
in interface DBObject
public boolean close() throws DBException
close
in interface DBObject
public String getName()
getName
in interface Named
|
Xindice API version 1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |