Class 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();
         ...
     }
     
    • 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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
    • Method Detail

      • getData

        public java.util.List<java.util.List<java.lang.String>> getData()
      • getIterator

        public java.util.Iterator<java.util.List<java.lang.String>> getIterator()