public class TwitterJSONDocument extends Object implements Document
Constructor and Description |
---|
TwitterJSONDocument(com.google.gson.JsonObject json) |
TwitterJSONDocument(String JSONTweet) |
TwitterJSONDocument(String JSONTweet,
boolean saveAll) |
Modifier and Type | Method and Description |
---|---|
void |
addProperty(String propertyName,
String propertyValue)
Add a specific property to the properties for this document.
|
protected int |
byteLength(String t) |
void |
doParsing(com.google.gson.JsonObject json) |
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 |
getJsonText() |
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.
|
void |
setJsonText(String jsonText) |
public TwitterJSONDocument(String JSONTweet)
public TwitterJSONDocument(String JSONTweet, boolean saveAll)
public TwitterJSONDocument(com.google.gson.JsonObject json)
public void doParsing(com.google.gson.JsonObject json)
public String getNextTerm()
Document
getNextTerm
in interface Document
public Set<String> getFields()
Document
public boolean endOfDocument()
Document
endOfDocument
in interface Document
public Reader getReader()
Document
public String getProperty(String name)
Document
getProperty
in interface Document
name
- Name of the property. It is suggested, but not required that this name
should not be case insensitive.public Map<String,String> getAllProperties()
Document
getAllProperties
in interface Document
public void addProperty(String propertyName, String propertyValue)
propertyName
- propertyValue
- protected int byteLength(String t)
public String getJsonText()
public void setJsonText(String jsonText)
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow