Package org.intermine.client.results
Class JSONResult
- java.lang.Object
-
- org.intermine.client.results.ResultSet
-
- org.intermine.client.results.JSONResult
-
public class JSONResult extends ResultSet
-
-
Constructor Summary
Constructors Constructor Description JSONResult(java.lang.String s)
Constructor with a stringJSONResult(HttpConnection c)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<org.json.JSONObject>
getIterator()
java.util.List<org.json.JSONObject>
getObjects()
org.json.JSONArray
getResults()
-
Methods inherited from class org.intermine.client.results.ResultSet
getNextLine, getReader
-
-
-
-
Constructor Detail
-
JSONResult
public JSONResult(HttpConnection c)
Constructor- Parameters:
c
- source of data
-
JSONResult
public JSONResult(java.lang.String s)
Constructor with a string- Parameters:
s
- The source of the content.
-
-
Method Detail
-
getObjects
public java.util.List<org.json.JSONObject> getObjects() throws org.json.JSONException
- Returns:
- The results as a list of JSON-Objects.
- Throws:
org.json.JSONException
- If there is an error parsing the content.
-
getResults
public org.json.JSONArray getResults()
- Returns:
- The results as a JSONArray.
-
getIterator
public java.util.Iterator<org.json.JSONObject> getIterator() throws org.json.JSONException
- Returns:
- An iterator over each object in the result set.
- Throws:
org.json.JSONException
- if there is an error parsing the data in the JSON.
-
-