1 28 package net.sf.jasperreports.engine.query; 29 30 import java.util.Map ; 31 32 import net.sf.jasperreports.engine.JRDataset; 33 import net.sf.jasperreports.engine.JRException; 34 35 44 public class JRXPathQueryExecuterFactory implements JRQueryExecuterFactory 45 { 46 49 public final static String PARAMETER_XML_DATA_DOCUMENT = "XML_DATA_DOCUMENT"; 50 51 54 public final static String XML_DATE_PATTERN = "XML_DATE_PATTERN"; 55 56 59 public final static String XML_NUMBER_PATTERN = "XML_NUMBER_PATTERN"; 60 61 63 123 126 public final static String XML_LOCALE = "XML_LOCALE"; 127 128 131 public final static String XML_TIME_ZONE = "XML_TIME_ZONE"; 132 133 private final static Object [] XPATH_BUILTIN_PARAMETERS = { 134 PARAMETER_XML_DATA_DOCUMENT, org.w3c.dom.Document .class, 135 XML_DATE_PATTERN, java.lang.String .class, 136 XML_NUMBER_PATTERN, java.lang.String .class, 137 138 153 XML_LOCALE, java.util.Locale .class, 154 XML_TIME_ZONE, java.util.TimeZone .class, 155 }; 156 157 public Object [] getBuiltinParameters() 158 { 159 return XPATH_BUILTIN_PARAMETERS; 160 } 161 162 public JRQueryExecuter createQueryExecuter(JRDataset dataset, Map parameters) 163 throws JRException 164 { 165 return new JRXPathQueryExecuter(dataset, parameters); 166 } 167 168 public boolean supportsQueryParameterType(String className) 169 { 170 return true; 171 } 172 } 173 | Popular Tags |