Package org.intermine.client.results
Class XMLTableResult
- java.lang.Object
-
- org.intermine.client.results.ResultSet
-
- org.intermine.client.results.XMLTableResult
-
public class XMLTableResult extends ResultSet
A utility class for parsing tab separated values in the results. The purpose of this class it to transform raw results in the form of an InterMine XML resultset into a data structure containing the rows and their values. This can be done as an iterator or the data can be read directly into a list. usage:XMLTableResult table = new XMLTableResult(connection); if (getMeAList) { List<List<String>> data = table.getData(); ... } else { Iterator<List<String>> iterator = table.getIterator(); ... }
-
-
Constructor Summary
Constructors Constructor Description XMLTableResult(java.io.BufferedReader reader)
Constructor with a reader.XMLTableResult(java.lang.String s)
Constructor.XMLTableResult(HttpConnection c)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.util.List<java.lang.String>>
getData()
java.util.Iterator<java.util.List<java.lang.String>>
getIterator()
-
Methods inherited from class org.intermine.client.results.ResultSet
getNextLine, getReader
-
-
-
-
Constructor Detail
-
XMLTableResult
public XMLTableResult(HttpConnection c)
Constructor. Return a new XMLTableResult object that reads its data from an opened HTTP connection.- Parameters:
c
- The connection to read the data from
-
XMLTableResult
public XMLTableResult(java.lang.String s)
Constructor. Return a new XMLTableResult object that reads its data from a string.- Parameters:
s
- A string to read the data from
-
XMLTableResult
public XMLTableResult(java.io.BufferedReader reader)
Constructor with a reader. Use this constructor when you want to make the request yourself.- Parameters:
reader
- A presupplied reader, presumably obtained by opening a URL or a file.
-
-