public class FlatJSONDocument extends Object implements Document
| Modifier and Type | Field and Description |
|---|---|
protected int |
fieldIndex |
protected List<String> |
fieldQueue |
protected String[] |
fieldsToProcess |
protected Map<String,String> |
properties |
protected int |
remainingTokens |
protected int |
tokenIndex |
protected Tokeniser |
tokenizer |
String[][] |
tokens |
| Constructor and Description |
|---|
FlatJSONDocument(com.google.gson.JsonObject json) |
FlatJSONDocument(String rawJson) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
endOfDocument()
Returns true when the end of the document has been reached, and there
are no other terms to be retrieved from it.
|
Map<String,String> |
getAllProperties()
Returns the underlying map of all the properties defined by this Document.
|
Set<String> |
getFields()
Returns a list of the fields the current term appears in.
|
String |
getNextTerm()
Gets the next term of the document.
|
String |
getProperty(String name)
Allows access to a named property of the Document.
|
Reader |
getReader()
Returns a Reader object so client code can tokenise the document
or deal with the document itself.
|
protected void |
initalize(String rawJson) |
protected Tokeniser tokenizer
public String[][] tokens
protected String[] fieldsToProcess
protected int fieldIndex
protected int tokenIndex
protected int remainingTokens
public FlatJSONDocument(com.google.gson.JsonObject json)
public FlatJSONDocument(String rawJson) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionprotected void initalize(String rawJson)
public boolean endOfDocument()
DocumentendOfDocument in interface Documentpublic Map<String,String> getAllProperties()
DocumentgetAllProperties in interface Documentpublic Set<String> getFields()
Documentpublic String getNextTerm()
DocumentgetNextTerm in interface Documentpublic String getProperty(String name)
DocumentgetProperty in interface Documentname - Name of the property. It is suggested, but not required that this name
should not be case insensitive.Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow