Package org.openrefine.importers
Class JsonImporter.JSONTreeReader
- java.lang.Object
-
- org.openrefine.importers.JsonImporter.JSONTreeReader
-
- All Implemented Interfaces:
TreeReader
- Enclosing class:
- JsonImporter
public static class JsonImporter.JSONTreeReader extends Object implements TreeReader
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openrefine.importers.tree.TreeReader
TreeReader.Token
-
-
Constructor Summary
Constructors Constructor Description JSONTreeReader(InputStream is)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreeReader.Token
current()
int
getAttributeCount()
Does nothing.String
getAttributeLocalName(int index)
Does nothing.String
getAttributePrefix(int index)
Does nothing.String
getAttributeValue(int index)
Does nothing.String
getFieldName()
String
getFieldValue()
String
getPrefix()
Does nothing.Serializable
getValue()
boolean
hasNext()
protected TreeReader.Token
mapToToken(com.fasterxml.jackson.core.JsonToken token)
TreeReader.Token
next()
-
-
-
Constructor Detail
-
JSONTreeReader
public JSONTreeReader(InputStream is)
-
-
Method Detail
-
getAttributeCount
public int getAttributeCount()
Does nothing. All Json is treated as elements- Specified by:
getAttributeCount
in interfaceTreeReader
-
getAttributeLocalName
public String getAttributeLocalName(int index)
Does nothing. All Json is treated as elements- Specified by:
getAttributeLocalName
in interfaceTreeReader
-
getAttributePrefix
public String getAttributePrefix(int index)
Does nothing. All Json is treated as elements- Specified by:
getAttributePrefix
in interfaceTreeReader
-
getAttributeValue
public String getAttributeValue(int index)
Does nothing. All Json is treated as elements- Specified by:
getAttributeValue
in interfaceTreeReader
-
current
public TreeReader.Token current()
- Specified by:
current
in interfaceTreeReader
-
getFieldName
public String getFieldName() throws TreeReaderException
- Specified by:
getFieldName
in interfaceTreeReader
- Throws:
TreeReaderException
-
getPrefix
public String getPrefix()
Does nothing. Json does not have prefixes- Specified by:
getPrefix
in interfaceTreeReader
-
getFieldValue
public String getFieldValue() throws TreeReaderException
- Specified by:
getFieldValue
in interfaceTreeReader
- Throws:
TreeReaderException
-
getValue
public Serializable getValue() throws TreeReaderException
- Specified by:
getValue
in interfaceTreeReader
- Throws:
TreeReaderException
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceTreeReader
-
next
public TreeReader.Token next() throws TreeReaderException
- Specified by:
next
in interfaceTreeReader
- Throws:
TreeReaderException
-
mapToToken
protected TreeReader.Token mapToToken(com.fasterxml.jackson.core.JsonToken token)
-
-