@Override public Query getQuery(Element e) throws ParserException { return queryFactory.getQuery(e); } }
public QueryTemplateManager(InputStream xslIs) throws TransformerConfigurationException, ParserConfigurationException, SAXException, IOException { addDefaultQueryTemplate(xslIs); }
public void addDefaultQueryTemplate(InputStream xslIs) throws TransformerConfigurationException, ParserConfigurationException, SAXException, IOException { defaultCompiledTemplates = getTemplates(xslIs); }
@Override public Query getQuery(Element e) throws ParserException { Element filterElement = DOMUtils.getChildByTagOrFail(e, "Filter"); filterElement = DOMUtils.getFirstChildOrFail(filterElement); Filter f = filterFactory.getFilter(filterElement); Element queryElement = DOMUtils.getChildByTagOrFail(e, "Query"); queryElement = DOMUtils.getFirstChildOrFail(queryElement); Query q = queryFactory.getQuery(queryElement); FilteredQuery fq = new FilteredQuery(q, f); fq.setBoost(DOMUtils.getAttribute(e, "boost", 1.0f)); return fq; }
public static String getAttributeWithInheritanceOrFail(Element e, String name) throws ParserException { String v = getAttributeWithInheritance(e, name); if (null == v) { throw new ParserException(e.getTagName() + " missing \"" + name + "\" attribute"); } return v; }
public static Element getChildByTagOrFail(Element e, String name) throws ParserException { Element kid = getChildByTagName(e, name); if (null == kid) { throw new ParserException(e.getTagName() + " missing \"" + name + "\" child element"); } return kid; }
public static Element getFirstChildOrFail(Element e) throws ParserException { Element kid = getFirstChildElement(e); if (null == kid) { throw new ParserException(e.getTagName() + " does not contain a child element"); } return kid; }
public static String getChildTextByTagName(Element e, String tagName) { Element child = getChildByTagName(e, tagName); return child != null ? getText(child) : null; }
public Document getQueryAsDOM(Properties formProperties) throws SAXException, IOException, ParserConfigurationException, TransformerException { return getQueryAsDOM(formProperties, defaultCompiledTemplates); }
public void addFilterBuilder(String nodeName, FilterBuilder builder) { filterFactory.addBuilder(nodeName, builder); }
public String getQueryAsXmlString(Properties formProperties) throws SAXException, IOException, ParserConfigurationException, TransformerException { return getQueryAsXmlString(formProperties, defaultCompiledTemplates); }
@Override public Query getQuery(Element e) throws ParserException { Element filterElement = DOMUtils.getChildByTagOrFail(e, "Filter"); filterElement = DOMUtils.getFirstChildOrFail(filterElement); Filter f = filterFactory.getFilter(filterElement); Element queryElement = DOMUtils.getChildByTagOrFail(e, "Query"); queryElement = DOMUtils.getFirstChildOrFail(queryElement); Query q = queryFactory.getQuery(queryElement); FilteredQuery fq = new FilteredQuery(q, f); fq.setBoost(DOMUtils.getAttribute(e, "boost", 1.0f)); return fq; }
public static String getAttributeWithInheritanceOrFail(Element e, String name) throws ParserException { String v = getAttributeWithInheritance(e, name); if (null == v) { throw new ParserException(e.getTagName() + " missing \"" + name + "\" attribute"); } return v; }
public static Element getChildByTagOrFail(Element e, String name) throws ParserException { Element kid = getChildByTagName(e, name); if (null == kid) { throw new ParserException(e.getTagName() + " missing \"" + name + "\" child element"); } return kid; }
public static Element getFirstChildOrFail(Element e) throws ParserException { Element kid = getFirstChildElement(e); if (null == kid) { throw new ParserException(e.getTagName() + " does not contain a child element"); } return kid; }
@Override public Query getQuery(Element e) throws ParserException { return queryFactory.getQuery(e); }
public QueryTemplateManager(InputStream xslIs) throws TransformerConfigurationException, ParserConfigurationException, SAXException, IOException { addDefaultQueryTemplate(xslIs); }
public void addDefaultQueryTemplate(InputStream xslIs) throws TransformerConfigurationException, ParserConfigurationException, SAXException, IOException { defaultCompiledTemplates = getTemplates(xslIs); }
public Document getQueryAsDOM(Properties formProperties) throws SAXException, IOException, ParserConfigurationException, TransformerException { return getQueryAsDOM(formProperties, defaultCompiledTemplates); }
public void addFilterBuilder(String nodeName, FilterBuilder builder) { filterFactory.addBuilder(nodeName, builder); }