Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## fr.gouv.culture.sdx.search.lucene.filter
Class Criteria

    java.lang.Object
      org.apache.lucene.search.Filter
          fr.gouv.culture.sdx.search.lucene.filter.AbstractFilter
              fr.gouv.culture.sdx.search.lucene.filter.Criteria

All Implemented Interfaces:
  FilterCriteria, org.apache.avalon.framework.logger.LogEnabled, java.io.Serializable, org.apache.excalibur.xml.sax.XMLizable

public class Criteria
extends AbstractFilter

The Criteria for a Filter.

See Also:
  Serialized Form

Field Summary
`org.apache.lucene.search.Filter` | `luceneFilter` The Lucene filter, if necessary

Fields inherited from class fr.gouv.culture.sdx.search.lucene.filter.AbstractFilter
`logger`

Constructor Summary
`Criteria()`

Method Summary
`java.util.BitSet` | `bits(org.apache.lucene.index.IndexReader r)` Applies the criteria and turns over the documents which satisfy it
`void` | `setUp(Field field, java.lang.String pattern)` Contructs a Criteria on the value of a field.
`void` | `setUp(org.apache.lucene.search.Filter luceneFilter)` Constructs an SDX filter (also a Lucene filter).
`void` | `toSAX(org.xml.sax.ContentHandler hdl)` Returns a SAX representation of this criteria.

Methods inherited from class fr.gouv.culture.sdx.search.lucene.filter.AbstractFilter
`enableLogging`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### luceneFilter

    public org.apache.lucene.search.Filter luceneFilter

  The Lucene filter, if necessary

Constructor Detail

### Criteria

    public Criteria()

Method Detail

### setUp

    public void setUp(Field field,
                      java.lang.String pattern)
               throws SDXException

  Contructs a Criteria on the value of a field. This value can be a regular expression with the possibilities le ? and le *

  Parameters:
    `field` - The field.
    `pattern` - The search pattern.
  Throws:
    `SDXException`

### setUp

    public void setUp(org.apache.lucene.search.Filter luceneFilter)
               throws SDXException

  Constructs an SDX filter (also a Lucene filter).

  Parameters:
    `luceneFilter` - The SDX/Lucene filter.
  Throws:
    `SDXException`

### bits

    public java.util.BitSet bits(org.apache.lucene.index.IndexReader r)

  Applies the criteria and turns over the documents which satisfy it

  Specified by:
    `bits` in interface `FilterCriteria`
  Specified by:
    `bits` in class `AbstractFilter`
  Parameters:
    `r` - The reader of the index.

### toSAX

    public void toSAX(org.xml.sax.ContentHandler hdl)
               throws org.xml.sax.SAXException

  Returns a SAX representation of this criteria.

  Parameters:
    `hdl` - The ContentHandler to feed with events.
  Throws:
    `org.xml.sax.SAXException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2007 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.