return String.valueOf(getParameterValue(parameterName));
}
public JRDataSource createDatasource() throws JRException
{
JaxenXmlDataSource datasource = null;
String xPath = getQueryString();
if (log.isDebugEnabled())
{
log.debug("XPath query: " + xPath);
}
if (document != null && xPath != null)
{
if (namespacesMap == null)
{
namespacesMap = extractXmlNamespacesFromProperties();
}
datasource = new JaxenXmlDataSource(document, xPath);
datasource.setXmlNamespaceMap(namespacesMap);
datasource.setDetectXmlNamespaces(getBooleanParameterOrProperty(JaxenXPathQueryExecuterFactory.XML_DETECT_NAMESPACES, false));
datasource.setDocumentBuilderFactory(documentBuilderFactory);
datasource.setLocale((Locale)getParameterValue(JaxenXPathQueryExecuterFactory.XML_LOCALE, true));
datasource.setDatePattern((String)getParameterValue(JaxenXPathQueryExecuterFactory.XML_DATE_PATTERN, true));
datasource.setNumberPattern((String)getParameterValue(JaxenXPathQueryExecuterFactory.XML_NUMBER_PATTERN, true));
datasource.setTimeZone((TimeZone)getParameterValue(JaxenXPathQueryExecuterFactory.XML_TIME_ZONE, true));
}
return datasource;
}