FileDocCategorySizeDatePackage
SpanOrBuilder.javaAPI DocApache Lucene 1.91144Mon Feb 27 11:12:20 GMT 2006org.apache.lucene.xmlparser.builders

SpanOrBuilder

public class SpanOrBuilder extends SpanBuilderBase

Fields Summary
SpanQueryBuilder
factory
Constructors Summary
public SpanOrBuilder(SpanQueryBuilder factory)

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

	    ArrayList clausesList=new ArrayList();
		for (Node kid = e.getFirstChild(); kid != null; kid = kid.getNextSibling())
		{
			if (kid.getNodeType() == Node.ELEMENT_NODE) 
			{
				SpanQuery clause=factory.getSpanQuery((Element) kid);
				clausesList.add(clause);				
			}
		}	    
		SpanQuery[] clauses=(SpanQuery[]) clausesList.toArray(new SpanQuery[clausesList.size()]);
		SpanOrQuery soq = new SpanOrQuery(clauses);		
		soq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
		return soq;