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

SpanNotBuilder

public class SpanNotBuilder extends SpanBuilderBase

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

param
factory

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

  	    Element includeElem=DOMUtils.getChildByTagOrFail(e,"Include");
        includeElem=DOMUtils.getFirstChildOrFail(includeElem);

  	    Element excludeElem=DOMUtils.getChildByTagOrFail(e,"Exclude");
        excludeElem=DOMUtils.getFirstChildOrFail(excludeElem);

  	    SpanQuery include=factory.getSpanQuery(includeElem);
  	    SpanQuery exclude=factory.getSpanQuery(excludeElem);
	    
		SpanNotQuery snq = new SpanNotQuery(include,exclude);
		
		snq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
		return snq;