FileDocCategorySizeDatePackage
SpanQueryBuilderFactory.javaAPI DocApache Lucene 2.1.01728Wed Feb 14 10:46:20 GMT 2007org.apache.lucene.xmlparser.builders

SpanQueryBuilderFactory

public class SpanQueryBuilderFactory extends Object implements SpanQueryBuilder
author
maharwood

Fields Summary
HashMap
builders
Constructors Summary
Methods Summary
public voidaddBuilder(java.lang.String nodeName, SpanQueryBuilder builder)

		builders.put(nodeName,builder);
	
public org.apache.lucene.search.QuerygetQuery(org.w3c.dom.Element e)

	
	      
		return getSpanQuery(e);
	
public org.apache.lucene.search.spans.SpanQuerygetSpanQuery(org.w3c.dom.Element e)

		SpanQueryBuilder builder=(SpanQueryBuilder) builders.get(e.getNodeName());
		if(builder==null)
		{
			throw new ParserException("No SpanQueryObjectBuilder defined for node "+e.getNodeName()); 
		}
		return builder.getSpanQuery(e);