Exemplo n.º 1
0
 /** Add a single instance, with given src and id, to the datafile */
 public void addInstance(String src, String id, String text) {
   Instance inst = new Instance(src, id, text);
   ArrayList list = (ArrayList) sourceLists.get(src);
   if (list == null) {
     list = new ArrayList();
     sourceLists.put(src, list);
     sourceNames.add(src);
   }
   list.add(inst);
 }
Exemplo n.º 2
0
 /** Get string identifier for i-th source */
 public String getSource(int i) {
   return (String) sourceNames.get(i);
 }
Exemplo n.º 3
0
 /** Number of sources in data set */
 public int numSources() {
   return sourceNames.size();
 }