public class XmlDataAccessor extends RecordAccessor
Data accessor for reading semi-structured XML files. This accessor creates
DataRecords based upon the record identifier for each data template. The
child elements within that record are stored as fields within the data
record. For instance, if the record identifier were car
, the
following XML would create a data record with source fields for Make, Model,
and Year:
<car> <Make>Honda</Make> <Model>Odyssey</Model> <Year>2013</Year> </car>
Constructor and Description |
---|
XmlDataAccessor() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Set<DataRecord> |
retrieveRecords(DataTemplate template)
Retrieve a set of data records for a particular DataTemplate.
|
void |
setInitParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Set any initialization parameters required by this data accessor
|
void |
setQuery(java.lang.String queryString)
Set the query string used to retrieve records.
|
addFieldHandler, addToGraph, addToTree, createReferenceNode, extendGraph, extendTree, getDataset, getFieldHandler, getGraph, getGrid, getMaxRecords, getReasoner, getStructureReasoners, getTree, setMaxRecords, setReasoner, setReasoner
addStructure, addTemplate, getDatasetNames, getGraphNames, getGridNames, getSpec, getStructureType, getTemplate, getTemplateNames, getTreeNames, setConfig, setConfigFile, setConfigFile
protected java.util.Set<DataRecord> retrieveRecords(DataTemplate template)
retrieveRecords
in class RecordAccessor
template
- The data template specifying field mappings and
descriptionspublic void setInitParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
parameters
- a map of initialization parameterspublic void setQuery(java.lang.String queryString)
setQuery
in class AbstractDataAccessor<DataRecord,DataRecord>
queryString
- the query string