org.exist.storage
Class IndexPaths

java.lang.Object
  extended byorg.exist.storage.IndexPaths

public class IndexPaths
extends java.lang.Object

IndexPaths contains information about which parts of a document should be fulltext-indexed for a specified doctype. It basically keeps a list of paths to include and paths to exclude from indexing. Paths are specified using simple XPath syntax, e.g. //SPEECH will select any SPEECH elements, //title/@id will select all id attributes being children of title elements.

Author:
Wolfgang Meier

Field Summary
protected  int depth
           
protected  java.util.ArrayList excludePath
           
protected  boolean includeAlphaNum
           
protected  boolean includeAttributes
           
protected  boolean includeByDefault
           
protected  java.util.ArrayList includePath
           
protected  MutableStringTokenizer tokenizer
           
 
Constructor Summary
IndexPaths(boolean def)
          Constructor for the IndexPaths object
 
Method Summary
 void addExclude(java.lang.String path)
          Add a path to the list of excludes
 void addInclude(java.lang.String path)
          Add a path to the list of includes
 boolean getIncludeAlphaNum()
          Include alpha-numeric data?
 boolean getIncludeAttributes()
          Include attribute values?
 int getIndexDepth()
           
 boolean isSelective()
          Returns false if all elements are indexed, true if indexation is selective.
 boolean match(java.lang.CharSequence path)
          Check if a given path should be indexed.
 void setIncludeAlphaNum(boolean index)
          Include alpha-numeric data, i.e.
 void setIncludeAttributes(boolean index)
          Include attribute values?
 void setIndexDepth(int depth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

includePath

protected java.util.ArrayList includePath

excludePath

protected java.util.ArrayList excludePath

includeByDefault

protected boolean includeByDefault

includeAttributes

protected boolean includeAttributes

includeAlphaNum

protected boolean includeAlphaNum

depth

protected int depth

tokenizer

protected MutableStringTokenizer tokenizer
Constructor Detail

IndexPaths

public IndexPaths(boolean def)
Constructor for the IndexPaths object

Parameters:
def - if set to true, include everything by default. In this case use exclude elements to specify the excluded parts.
Method Detail

addInclude

public void addInclude(java.lang.String path)
Add a path to the list of includes

Parameters:
path - The feature to be added to the Include attribute

addExclude

public void addExclude(java.lang.String path)
Add a path to the list of excludes

Parameters:
path - DOCUMENT ME!

isSelective

public boolean isSelective()
Returns false if all elements are indexed, true if indexation is selective.

Returns:

setIncludeAttributes

public void setIncludeAttributes(boolean index)
Include attribute values?

Parameters:
index - The new includeAttributes value

getIncludeAttributes

public boolean getIncludeAttributes()
Include attribute values?

Returns:
The includeAttributes value

setIncludeAlphaNum

public void setIncludeAlphaNum(boolean index)
Include alpha-numeric data, i.e. numbers, serials, URLs and so on?

Parameters:
index - include alpha-numeric data

getIncludeAlphaNum

public boolean getIncludeAlphaNum()
Include alpha-numeric data?

Returns:

getIndexDepth

public int getIndexDepth()

setIndexDepth

public void setIndexDepth(int depth)

match

public boolean match(java.lang.CharSequence path)
Check if a given path should be indexed.

Parameters:
path - path to the node
Returns:
Description of the Return Value


Copyright (C) Wolfgang Meier. All rights reserved.