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 XMLStreamReaderparser
-
Constructor Summary
Constructors Constructor Description XmlParser(InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeReader.Tokencurrent()intgetAttributeCount()StringgetAttributeLocalName(int index)StringgetAttributePrefix(int index)StringgetAttributeValue(int index)StringgetFieldName()StringgetFieldValue()StringgetPrefix()SerializablegetValue()booleanhasNext()protected TreeReader.TokenmapToToken(int token)TreeReader.Tokennext()
-
-
-
Field Detail
-
parser
protected final XMLStreamReader parser
-
-
Constructor Detail
-
XmlParser
public XmlParser(InputStream inputStream) throws XMLStreamException, IOException
- Throws:
XMLStreamExceptionIOException
-
-
Method Detail
-
next
public TreeReader.Token next() throws TreeReaderException
- Specified by:
nextin interfaceTreeReader- Throws:
TreeReaderException
-
mapToToken
protected TreeReader.Token mapToToken(int token)
-
current
public TreeReader.Token current() throws TreeReaderException
- Specified by:
currentin interfaceTreeReader- Throws:
TreeReaderException
-
hasNext
public boolean hasNext() throws TreeReaderException- Specified by:
hasNextin interfaceTreeReader- Throws:
TreeReaderException
-
getFieldName
public String getFieldName() throws TreeReaderException
- Specified by:
getFieldNamein interfaceTreeReader- Throws:
TreeReaderException
-
getPrefix
public String getPrefix()
- Specified by:
getPrefixin interfaceTreeReader
-
getFieldValue
public String getFieldValue()
- Specified by:
getFieldValuein interfaceTreeReader
-
getValue
public Serializable getValue()
- Specified by:
getValuein interfaceTreeReader
-
getAttributeCount
public int getAttributeCount()
- Specified by:
getAttributeCountin interfaceTreeReader
-
getAttributeValue
public String getAttributeValue(int index)
- Specified by:
getAttributeValuein interfaceTreeReader
-
getAttributePrefix
public String getAttributePrefix(int index)
- Specified by:
getAttributePrefixin interfaceTreeReader
-
getAttributeLocalName
public String getAttributeLocalName(int index)
- Specified by:
getAttributeLocalNamein interfaceTreeReader
-
-