Qizx fe-4.4p2 API

com.qizx.api
Class Indexing.Rule

java.lang.Object
  extended by com.qizx.api.Indexing.Rule
Enclosing class:
Indexing

public static class Indexing.Rule
extends Object

Indexing properties associated with an element or an attribute (for advanced indexing).

A Rule can have a context, which is a list of QNames of enclosing elements. If a context is defined the Rule is applicable only if the enclosing elements match the context. Default rules have a null context.


Constructor Summary
Indexing.Rule(QName name, QName[] context, int indexingType)
          Constructs a Rule for an element or for an attribute.
 
Method Summary
 QName[] getContext()
          Returns the element context constraint.
 int getContextDepth()
          Returns the element context depth.
 byte getFullText()
          Returns TRUE, FALSE, or INHERIT if full-text indexing is applied to the element matched by this rule.
 int getIndexingType()
          Gets the indexes targeted by this rule (STRING, NUMERIC, DATE or combination).
 QName getName()
          Returns the name of the element or attribute concerned by the rule.
 Indexing.NumberSieve getSieve()
          Returns the Numeric or Date Sieve associated with the rule.
 boolean precedes(Indexing.Rule rule)
          Returns true if this rule is more specific than the rule in argument
 void setContext(QName[] context)
          Defines an optional context of ancestors to be matched.
 void setDefaultSieve()
          Sets a default Sieve according to the indexing type.
 void setFullText(byte fulltext)
          Specifies whether full-text indexing is applied to the element matched by this rule and to its descendants.
 void setIndexingType(int indexingType)
          Sets the indexxes targeted by this rule.
 void setName(QName name)
          Defines the name of the element/attribute concerned by the rule.
 void setSieve(Indexing.NumberSieve sieve)
          Defines the Numeric or Date Sieve associated with the rule.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Indexing.Rule

public Indexing.Rule(QName name,
                     QName[] context,
                     int indexingType)
Constructs a Rule for an element or for an attribute.

Parameters:
name - name of the element or attribute
context - enclosing elements (optional)
indexingType - possible values are STRING, NUMERIC, DATE, NUMERIC_AND_STRING, DATE_AND_STRING
Method Detail

precedes

public boolean precedes(Indexing.Rule rule)
Returns true if this rule is more specific than the rule in argument


setDefaultSieve

public void setDefaultSieve()
Sets a default Sieve according to the indexing type.


getContext

public QName[] getContext()
Returns the element context constraint.

Returns:
a stack of element names from topmost to deepest; null if no context constraint is defined

getContextDepth

public int getContextDepth()
Returns the element context depth.


setContext

public void setContext(QName[] context)
Defines an optional context of ancestors to be matched.

Parameters:
context - an array of ancestor names, from outermost to innermost (parent).

getFullText

public final byte getFullText()
Returns TRUE, FALSE, or INHERIT if full-text indexing is applied to the element matched by this rule.

Returns:
a code defining how full-text indexing applies to an element

setFullText

public void setFullText(byte fulltext)
Specifies whether full-text indexing is applied to the element matched by this rule and to its descendants.

Parameters:
fulltext - possible values are ENABLE_FULL_TEXT, DISABLE_FULL_TEXT, and INHERIT.

getName

public QName getName()
Returns the name of the element or attribute concerned by the rule.

Returns:
the name of an element or attribute, or null for a default rule.

setName

public void setName(QName name)
Defines the name of the element/attribute concerned by the rule.

Parameters:
name - an element or attribute name

getSieve

public final Indexing.NumberSieve getSieve()
Returns the Numeric or Date Sieve associated with the rule.


setSieve

public void setSieve(Indexing.NumberSieve sieve)
Defines the Numeric or Date Sieve associated with the rule.


getIndexingType

public final int getIndexingType()
Gets the indexes targeted by this rule (STRING, NUMERIC, DATE or combination). Default is STRING.

Returns:
the indexing type

setIndexingType

public void setIndexingType(int indexingType)
Sets the indexxes targeted by this rule.

Parameters:
indexingType - STRING, NUMERIC, DATE or combination

© 2010 Axyana Software