Package net.sf.jasperreports.engine.data

Examples of net.sf.jasperreports.engine.data.JaxenXmlDataSource


    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;
  }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.data.JaxenXmlDataSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.