FileDocCategorySizeDatePackage
QueryBuilderFactory.javaAPI DocApache Lucene 2.1.01638Wed Feb 14 10:46:20 GMT 2007org.apache.lucene.xmlparser

QueryBuilderFactory

public class QueryBuilderFactory extends Object implements QueryBuilder
author
maharwood

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

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

	
	      
		QueryBuilder builder=(QueryBuilder) builders.get(n.getNodeName());
		if(builder==null)
		{
			throw new ParserException("No QueryObjectBuilder defined for node "+n.getNodeName()); 
		}
		return builder.getQuery(n); 
	
public QueryBuildergetQueryBuilder(java.lang.String nodeName)

		return (QueryBuilder) builders.get(nodeName);