Element filterElement=DOMUtils.getChildByTagName(e,"Filter");
if(filterElement==null)
{
throw new ParserException("FilteredQuery missing \"Filter\" child element");
}
filterElement=DOMUtils.getFirstChildElement(filterElement);
Filter f=null;
if(filterElement!=null)
{
f=filterFactory.getFilter(filterElement);
}
else
{
throw new ParserException("FilteredQuery \"Filter\" element missing child query element ");
}
Element queryElement=DOMUtils.getChildByTagName(e,"Query");
if(queryElement==null)
{
throw new ParserException("FilteredQuery missing \"Query\" child element");
}
queryElement=DOMUtils.getFirstChildElement(queryElement);
Query q=null;
if(queryElement!=null)
{
q=queryFactory.getQuery(queryElement);
}
else
{
throw new ParserException("FilteredQuery \"Query\" element missing child query element ");
}
FilteredQuery fq = new FilteredQuery(q,f);
fq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
return fq;