FlatFileReader configured with the CSVRecordParserFactory.public class CSVReader extends Object implements SmooksXMLReader, VisitorAppender
<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
<csv:reader fields="" separator="" quote="" skipLines="" rootElementName="" recordElementName="">
<csv:singleBinding beanId="" class="" />
</csv:reader>
</smooks-resource-list>
To maintain a List of binding instances in memory:
<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
<csv:reader fields="" separator="" quote="" skipLines="" rootElementName="" recordElementName="">
<csv:listBinding beanId="" class="" />
</csv:reader>
</smooks-resource-list>
To maintain a Map of binding instances in memory:
<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
<csv:reader fields="" separator="" quote="" skipLines="" rootElementName="" recordElementName="">
<csv:mapBinding beanId="" class="" keyField="" />
</csv:reader>
</smooks-resource-list>
<csv:reader fields="name,address,$ignore$,item,quantity" />Within Smooks, the stream of SAX events generated by the "Acme-Order-List" message (and this parser) will generate an event stream equivalent to the following:
<csv-set>
<csv-record number="1">
<name>Tom Fennelly</name>
<address>Ireland</address>
<item>V1234</item>
<quantity>3</quantity>
<csv-record>
<csv-record number="2">
<name>Joe Bloggs</name>
<address>England</address>
<item>D9123</item>
<quantity>7</quantity>
<csv-record>
</csv-set>
Other profile based transformations can then be used to transform the CSV records in accordance with the requirements
of the consuming entities.| Constructor and Description |
|---|
CSVReader()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVisitors(VisitorConfigMap visitorMap)
Deprecated.
Add visitors to the supplied Cisitor map.
|
ContentHandler |
getContentHandler()
Deprecated.
|
DTDHandler |
getDTDHandler()
Deprecated.
|
EntityResolver |
getEntityResolver()
Deprecated.
|
ErrorHandler |
getErrorHandler()
Deprecated.
|
boolean |
getFeature(String name)
Deprecated.
|
Object |
getProperty(String name)
Deprecated.
|
void |
initialize()
Deprecated.
|
void |
parse(InputSource csvInputSource)
Deprecated.
|
void |
parse(String systemId)
Deprecated.
The following methods are currently unimplemnted...
|
void |
setContentHandler(ContentHandler contentHandler)
Deprecated.
|
void |
setDTDHandler(DTDHandler arg0)
Deprecated.
|
void |
setEntityResolver(EntityResolver arg0)
Deprecated.
|
void |
setErrorHandler(ErrorHandler arg0)
Deprecated.
|
void |
setExecutionContext(ExecutionContext request)
Deprecated.
Set the Smooks
ExecutionContext on the implementing class. |
void |
setFeature(String name,
boolean value)
Deprecated.
|
void |
setProperty(String name,
Object value)
Deprecated.
|
@Initialize public void initialize()
public void addVisitors(VisitorConfigMap visitorMap)
VisitorAppenderaddVisitors in interface VisitorAppendervisitorMap - The visitor map to be added to.public void setExecutionContext(ExecutionContext request)
SmooksXMLReaderExecutionContext on the implementing class.setExecutionContext in interface SmooksXMLReaderrequest - The Smooks ExecutionContext.public void parse(InputSource csvInputSource) throws IOException, SAXException
parse in interface XMLReaderIOExceptionSAXExceptionpublic void setContentHandler(ContentHandler contentHandler)
setContentHandler in interface XMLReaderpublic ContentHandler getContentHandler()
getContentHandler in interface XMLReaderpublic void parse(String systemId) throws IOException, SAXException
parse in interface XMLReaderIOExceptionSAXExceptionpublic boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException
getFeature in interface XMLReaderSAXNotRecognizedExceptionSAXNotSupportedExceptionpublic void setFeature(String name, boolean value) throws SAXNotRecognizedException, SAXNotSupportedException
setFeature in interface XMLReaderSAXNotRecognizedExceptionSAXNotSupportedExceptionpublic DTDHandler getDTDHandler()
getDTDHandler in interface XMLReaderpublic void setDTDHandler(DTDHandler arg0)
setDTDHandler in interface XMLReaderpublic EntityResolver getEntityResolver()
getEntityResolver in interface XMLReaderpublic void setEntityResolver(EntityResolver arg0)
setEntityResolver in interface XMLReaderpublic ErrorHandler getErrorHandler()
getErrorHandler in interface XMLReaderpublic void setErrorHandler(ErrorHandler arg0)
setErrorHandler in interface XMLReaderpublic Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException
getProperty in interface XMLReaderSAXNotRecognizedExceptionSAXNotSupportedExceptionpublic void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException
setProperty in interface XMLReaderSAXNotRecognizedExceptionSAXNotSupportedExceptionCopyright © 2020. All rights reserved.