|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.xml.XMLProperties
org.knime.base.node.io.filereader.XMLPropsReader
public class XMLPropsReader
Adds support for the old XML property files. It will read the specified XML file and provides the values at its API.
Constructor Summary | |
---|---|
XMLPropsReader(URL xmlURL)
Initializes a new specification object for a FileTable using the
XML URL which contains a link to the source file as well as other
properties how to parse the input data file. |
Method Summary | |
---|---|
String |
getBlockCommentLeft()
Returns the string for the left block comment. |
String |
getBlockCommentRight()
Returns the string for the right block comment. |
String |
getColumnDelimiter()
Returns column delimiter string. |
String |
getColumnMissing(int index)
Get the missing value designator for the specified column. |
String |
getColumnName(int index)
Returns column name at index. |
DataType |
getColumnType(int index)
Returns column type as DataType at index. |
URL |
getDataFileURL()
Returns an URL of the input data file initialized with file name, protocol, host, and port as specified in the xml file. |
String |
getDataFileURLspec()
Returns the locator of the input data file as specified in the XML file. |
String |
getId()
Returns the file tables' id. |
String |
getLineComment()
Returns line comment string. |
int |
getNumColumns()
Returns number of columns as read from the xml file. |
String |
getQuoteEscape()
Returns escape quote string. |
String |
getQuoteLeft()
Returns the string for the left quote. |
String |
getQuoteRight()
Returns the string for the right quote. |
String |
getRowDelimiter()
Returns row delimiter string. |
String |
getRowPrefix()
Returns the prefix for row keys. |
URL |
getXMLFileURL()
Get the URL of the XML file this spec was build from. |
boolean |
isColumnHeaderSpecified()
Returns true if column header is specified in the data
file and must be read from data input file, otherwise false . |
boolean |
isRowHeaderSpecified()
Returns true if row header is specified in the data file
and must be read from data input file, otherwise false . |
Methods inherited from class org.knime.core.xml.XMLProperties |
---|
error, fatalError, getAttributeValue, getAttributeValue, getNodeElement, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLPropsReader(URL xmlURL) throws IOException, SAXException, ParserConfigurationException
FileTable
using the
XML URL
which contains a link to the source file as well as other
properties how to parse the input data file.
xmlURL
- specifies the URL where to find the XML file
IllegalArgumentException
- if xmlURL
is
null
.
IOException
- if xmlURL
is not valid
SAXException
- parser exception
ParserConfigurationException
- a parser configuration exceptionMethod Detail |
---|
public String getId()
public String getColumnMissing(int index)
index
- the index of the column to get the missing value
representation for
public int getNumColumns()
NumberFormatException
- if value is not parsable as integer numberpublic boolean isColumnHeaderSpecified()
true
if column header is specified in the data
file and must be read from data input file, otherwise false
.
true
if column header must be read from input
file, otherwise false
IllegalCharsetNameException
- if attribute is not either of value
true
or false
public String getColumnName(int index)
index
- in column header.
IndexOutOfBoundsException
- if index out of range or number of
columns not specified in xml filepublic DataType getColumnType(int index)
DataType
at index.
index
- in column header
IndexOutOfBoundsException
- if index out of range
IllegalCharsetNameException
- if attribute value matches not one of
the type: String
, Integer
, or
Double
.public URL getXMLFileURL()
public String getDataFileURLspec()
null
string containing the data file URL
specifier from the XML filepublic URL getDataFileURL() throws MalformedURLException
null
if not available
MalformedURLException
- if the URL cannot be initializedpublic String getColumnDelimiter()
null
if not availablepublic boolean isRowHeaderSpecified()
true
if row header is specified in the data file
and must be read from data input file, otherwise false
.
true
if row header must be read from input file,
otherwise false
IllegalCharsetNameException
- if attribute is not either of value
true
or false
public String getRowPrefix()
null
if not availablepublic String getRowDelimiter()
null
if not availablepublic String getLineComment()
null
if not availablepublic String getBlockCommentLeft()
public String getBlockCommentRight()
public String getQuoteLeft()
public String getQuoteRight()
public String getQuoteEscape()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |