Package net.sf.jasperreports.jaxen.data
Class JaxenXmlDataSource
java.lang.Object
net.sf.jasperreports.engine.data.JRAbstractTextDataSource
net.sf.jasperreports.engine.data.AbstractXmlDataSource<JaxenXmlDataSource>
net.sf.jasperreports.jaxen.data.JaxenXmlDataSource
- All Implemented Interfaces:
HierarchicalDataSource<JaxenXmlDataSource>,RandomAccessDataSource,JRDataSource,JRRewindableDataSource
- Author:
- Narcis Marcu (narcism@users.sourceforge.net)
-
Field Summary
Fields inherited from class net.sf.jasperreports.engine.data.AbstractXmlDataSource
PROPERTY_FIELD_EXPRESSIONFields inherited from class net.sf.jasperreports.engine.data.JRAbstractTextDataSource
EXCEPTION_MESSAGE_KEY_CANNOT_CONVERT_FIELD_TYPE, EXCEPTION_MESSAGE_KEY_CANNOT_MODIFY_PROPERTIES_AFTER_START, EXCEPTION_MESSAGE_KEY_NODE_NOT_AVAILABLE, EXCEPTION_MESSAGE_KEY_NULL_DOCUMENT, EXCEPTION_MESSAGE_KEY_NULL_SELECT_EXPRESSION, EXCEPTION_MESSAGE_KEY_UNKNOWN_COLUMN_NAME, EXCEPTION_MESSAGE_KEY_UNKNOWN_NUMBER_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionJaxenXmlDataSource(File file) Creates the data source by parsing the xml document from the given file.JaxenXmlDataSource(File file, String selectExpression) Creates the data source by parsing the xml document from the given file.Creates the data source by parsing the xml document from the given input stream.JaxenXmlDataSource(InputStream in, String selectExpression) Creates the data source by parsing the xml document from the given input stream.JaxenXmlDataSource(String uri) Creates the data source by parsing the xml document from the given system identifier (URI).JaxenXmlDataSource(String uri, String selectExpression) Creates the data source by parsing the xml document from the given system identifier (URI).JaxenXmlDataSource(Document document) Creates the data source by parsing the xml document from the given file.JaxenXmlDataSource(Document document, String selectExpression) Creates the data source by parsing the xml document from the given file. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidintdataSource(String selectExpr) getSelectObject(Node currentNode, String expression) voidvoidmoveToRecord(int index) booleannext()intvoidsetDetectXmlNamespaces(boolean detectXmlNamespaces) voidsetDocumentBuilderFactory(DocumentBuilderFactory documentBuilderFactory) voidsetXmlNamespaceMap(Map<String, String> xmlNamespaceMap) subDataSource(String selectExpr) Methods inherited from class net.sf.jasperreports.engine.data.AbstractXmlDataSource
dataSource, getFieldExpression, getFieldValue, getText, subDataSourceMethods inherited from class net.sf.jasperreports.engine.data.JRAbstractTextDataSource
convertNumber, convertStringValue, getConvertBean, getDatePattern, getLocale, getNumberPattern, getTextAttributes, getTimeZone, setDatePattern, setLocale, setLocale, setNumberPattern, setTextAttributes, setTextAttributes, setTimeZone, setTimeZone
-
Constructor Details
-
JaxenXmlDataSource
Creates the data source by parsing the xml document from the given file. The data source will contain exactly one record consisting of the document node itself.- Parameters:
document- the document- Throws:
JRException- if the data source cannot be created
-
JaxenXmlDataSource
Creates the data source by parsing the xml document from the given file. An additional XPath expression specifies the select criteria that produces the nodes (records) for the data source.- Parameters:
document- the documentselectExpression- the XPath select expression- Throws:
JRException- if the data source cannot be created
-
JaxenXmlDataSource
Creates the data source by parsing the xml document from the given input stream.- Parameters:
in- the input stream- Throws:
JRException- See Also:
-
JaxenXmlDataSource
Creates the data source by parsing the xml document from the given input stream.- Throws:
JRException- See Also:
-
JaxenXmlDataSource
Creates the data source by parsing the xml document from the given system identifier (URI).If the system identifier is a URL, it must be full resolved.
- Parameters:
uri- the system identifier- Throws:
JRException- See Also:
-
JaxenXmlDataSource
Creates the data source by parsing the xml document from the given system identifier (URI).- Throws:
JRException- See Also:
-
JaxenXmlDataSource
Creates the data source by parsing the xml document from the given file.- Parameters:
file- the file- Throws:
JRException- See Also:
-
JaxenXmlDataSource
Creates the data source by parsing the xml document from the given file.- Throws:
JRException- See Also:
-
-
Method Details
-
getDocument
- Overrides:
getDocumentin classAbstractXmlDataSource<JaxenXmlDataSource>
-
moveFirst
- Throws:
JRException
-
checkMoveFirst
- Throws:
JRException
-
next
- Throws:
JRException
-
recordCount
- Throws:
JRException
-
currentIndex
public int currentIndex() -
moveToRecord
- Throws:
NoRecordAtIndexException
-
subDocument
- Specified by:
subDocumentin classAbstractXmlDataSource<JaxenXmlDataSource>- Throws:
JRException
-
setXmlNamespaceMap
- Throws:
JRException
-
setDetectXmlNamespaces
public void setDetectXmlNamespaces(boolean detectXmlNamespaces) -
setDocumentBuilderFactory
-
getCurrentNode
- Specified by:
getCurrentNodein classAbstractXmlDataSource<JaxenXmlDataSource>
-
getSelectObject
- Specified by:
getSelectObjectin classAbstractXmlDataSource<JaxenXmlDataSource>- Throws:
JRException
-
subDataSource
- Specified by:
subDataSourcein interfaceHierarchicalDataSource<JaxenXmlDataSource>- Specified by:
subDataSourcein classAbstractXmlDataSource<JaxenXmlDataSource>- Throws:
JRException
-
dataSource
- Specified by:
dataSourcein classAbstractXmlDataSource<JaxenXmlDataSource>- Throws:
JRException
-