ElegantJCharts Java API Specification v2.0

com.elegantj.data.dataprovider.xml
Class XMLDataProvider

java.lang.Object
  |
  +--com.elegantj.data.dataprovider.AbstractDataProvider
        |
        +--com.elegantj.data.dataprovider.text.TextDataProvider
              |
              +--com.elegantj.data.dataprovider.xml.XMLDataProvider
All Implemented Interfaces:
DataProvider, java.io.Externalizable, java.io.Serializable

public class XMLDataProvider
extends TextDataProvider

This class encapsulates functionality of an XML data provider.
This class assumes that the XML data is in the following defined format,

	<?xml version='1.0'?>
	<Root>
		<Row>
			<Column>ColumnName1</Column>
			<Column>ColumnName2</Column>
		</Column>
		<Row>
			<Column>c11</Column>
			<Column>c12</Column>
		</Row>
		<Row>
			<Column>c21</Column>
			<Column>c22</Column>
		</Row>
		<Row>
			<Column>c31</Column>
			<Column>c32</Column>
		</Row>
	</Root>
	
This bean provides powerful designing aspects by providing following user friendly property.
DataProvider the data provider
File the path of the source file
URL the URL of the source file
URLConnectionEnabled indicates whether the connection can be established through the URL or not
FirstRowAsColumnNames indicates whether the first row of the retrieved data is column names or not
SkippedColumns the comma separated indexes of the columns to be skipped
SortCriteria the criteria for sorting the data
FilterCriteria the criteria for filtering the data
FilterState indicates whether the filter criteria is applied or not
SaveOnlyFilteredData indicates to save only filtered rows or all rows
SkippedRows the total number of rows to be skipped
RootTag the string to represent the root tag
RowTag the string to represent the row tag
ColumnTag the string to represent the column tag

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.elegantj.data.dataprovider.text.TextDataProvider
DEFAULT_COLUMN_SEPARATOR, DEFAULT_ROW_SEPARATOR, DEFAULT_TEXT_QUALIFIER, forInput, in, out
 
Fields inherited from class com.elegantj.data.dataprovider.AbstractDataProvider
c11, changes, clientTable, columnNames, currentIndex, dataTable
 
Constructor Summary
XMLDataProvider()
           
 
Method Summary
 boolean retrieveData(java.io.InputStream is)
          Retrieves the data from given input stream.
 boolean saveData(java.io.OutputStream os)
          Saves the data to given output stream.
 void setFetchSize(int size)
          Not applicable
 
Methods inherited from class com.elegantj.data.dataprovider.text.TextDataProvider
close, getFile, getSkippedColumns, getURL, isFetchNext, isURLConnectionEnabled, nextData, open, readExternal, retrieve, save, setFile, setSkippedColumns, setURL, setURLConnectionEnabled, writeExternal
 
Methods inherited from class com.elegantj.data.dataprovider.AbstractDataProvider
addDataListener, addPropertyChangeListener, addRow, appendData, dataChanged, dataChanged, deleteRow, equals, exportToSQL, exportToSQL, exportToSQL, exportToSQL, exportToText, exportToText, exportToText, exportToText, exportToXML, exportToXML, filterData, find, find, findNext, fireDataChanged, firePropertyChange, firstRecord, getColumnCount, getColumnIndex, getColumnNames, getColumnsArray, getColumnSeparator, getColumnsWidth, getColumnTag, getColumnType, getComputable, getCurrentIndex, getCurrentRecord, getData, getDataAt, getDataAt, getDataCount, getDataProvider, getDeletedCount, getFetchSize, getFilterCriteria, getFilteredCount, getLicenseKey, getModifiedCount, getRootTag, getRowSeparator, getRowTag, getSkippedRows, getSortColumns, getSortCriteria, getTextQualifier, insertDataAt, isAppendDataOnFetchNext, isColumnsDelimited, isFilterState, isFirstRowAsColumnNames, isSaveOnlyFilteredData, lastRecord, modifyDataAt, nextRecord, parseInt, previousRecord, rankData, refreshData, removeAll, removeAt, removeDataListener, removePropertyChangeListener, removeRange, rollbackModifications, saveModifications, scrollToRow, setAppendDataOnFetchNext, setColumnsDelimited, setColumnSeparator, setColumnsWidth, setColumnTag, setData, setDataArray, setDataProvider, setFilterCriteria, setFilterState, setFirstRowAsColumnNames, setLicenseKey, setRootTag, setRowSeparator, setRowTag, setSaveOnlyFilteredData, setSkippedRows, setSortCriteria, setTextQualifier, sortData, sortData, sortData, sortData, sortData, sortData, sortData, sortData, sortData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLDataProvider

public XMLDataProvider()
Method Detail

setFetchSize

public void setFetchSize(int size)
Not applicable

Specified by:
setFetchSize in interface DataProvider
Overrides:
setFetchSize in class AbstractDataProvider
Parameters:
size - the total number of records that can be fetched by invoking getData()

retrieveData

public boolean retrieveData(java.io.InputStream is)
Description copied from class: TextDataProvider
Retrieves the data from given input stream.

Overrides:
retrieveData in class TextDataProvider
Parameters:
is - the input stream from which to retrieve the data.

saveData

public boolean saveData(java.io.OutputStream os)
Description copied from class: TextDataProvider
Saves the data to given output stream.

Overrides:
saveData in class TextDataProvider
Parameters:
os - the output stream to save the data to.

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.