Package org.openrefine.importers
Class XmlImporter.XmlParser
- java.lang.Object
-
- org.openrefine.importers.XmlImporter.XmlParser
-
- All Implemented Interfaces:
TreeReader
- Enclosing class:
- XmlImporter
public static class XmlImporter.XmlParser extends Object implements TreeReader
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openrefine.importers.tree.TreeReader
TreeReader.Token
-
-
Field Summary
Fields Modifier and Type Field Description protected XMLStreamReader
parser
-
Constructor Summary
Constructors Constructor Description XmlParser(InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeReader.Token
current()
int
getAttributeCount()
String
getAttributeLocalName(int index)
String
getAttributePrefix(int index)
String
getAttributeValue(int index)
String
getFieldName()
String
getFieldValue()
String
getPrefix()
Serializable
getValue()
boolean
hasNext()
protected TreeReader.Token
mapToToken(int token)
TreeReader.Token
next()
-
-
-
Field Detail
-
parser
protected final XMLStreamReader parser
-
-
Constructor Detail
-
XmlParser
public XmlParser(InputStream inputStream) throws XMLStreamException, IOException
- Throws:
XMLStreamException
IOException
-
-
Method Detail
-
next
public TreeReader.Token next() throws TreeReaderException
- Specified by:
next
in interfaceTreeReader
- Throws:
TreeReaderException
-
mapToToken
protected TreeReader.Token mapToToken(int token)
-
current
public TreeReader.Token current() throws TreeReaderException
- Specified by:
current
in interfaceTreeReader
- Throws:
TreeReaderException
-
hasNext
public boolean hasNext() throws TreeReaderException
- Specified by:
hasNext
in interfaceTreeReader
- Throws:
TreeReaderException
-
getFieldName
public String getFieldName() throws TreeReaderException
- Specified by:
getFieldName
in interfaceTreeReader
- Throws:
TreeReaderException
-
getPrefix
public String getPrefix()
- Specified by:
getPrefix
in interfaceTreeReader
-
getFieldValue
public String getFieldValue()
- Specified by:
getFieldValue
in interfaceTreeReader
-
getValue
public Serializable getValue()
- Specified by:
getValue
in interfaceTreeReader
-
getAttributeCount
public int getAttributeCount()
- Specified by:
getAttributeCount
in interfaceTreeReader
-
getAttributeValue
public String getAttributeValue(int index)
- Specified by:
getAttributeValue
in interfaceTreeReader
-
getAttributePrefix
public String getAttributePrefix(int index)
- Specified by:
getAttributePrefix
in interfaceTreeReader
-
getAttributeLocalName
public String getAttributeLocalName(int index)
- Specified by:
getAttributeLocalName
in interfaceTreeReader
-
-