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()
DocumentgetNextTerm in interface Documentpublic Set<String> getFields()
Documentpublic boolean endOfDocument()
DocumentendOfDocument in interface Documentpublic Reader getReader()
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.public Map<String,String> getAllProperties()
DocumentgetAllProperties in interface Documentpublic 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.2. Copyright © 2004-2019, University of Glasgow