FileDocCategorySizeDatePackage
BooleanFilterBuilder.javaAPI DocApache Lucene 2.0.01219Fri May 26 09:53:50 BST 2006org.apache.lucene.xmlparser.builders

BooleanFilterBuilder

public class BooleanFilterBuilder extends Object implements org.apache.lucene.xmlparser.FilterBuilder
author
maharwood

Fields Summary
private org.apache.lucene.xmlparser.FilterBuilder
factory
Constructors Summary
public BooleanFilterBuilder(org.apache.lucene.xmlparser.FilterBuilder factory)

		this.factory=factory;
	
Methods Summary
public org.apache.lucene.search.FiltergetFilter(org.w3c.dom.Element e)

		BooleanFilter bf=new BooleanFilter();
		NodeList nl = e.getElementsByTagName("Clause");
		for(int i=0;i<nl.getLength();i++)
		{
			Element clauseElem=(Element) nl.item(i);
			BooleanClause.Occur occurs=BooleanQueryBuilder.getOccursValue(clauseElem);
			
 			Element clauseFilter=DOMUtils.getFirstChildOrFail(clauseElem);
 			Filter f=factory.getFilter(clauseFilter);
 			bf.add(new FilterClause(f,occurs));			
		}
		
		return bf;