All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.monarchinitiative.phenol.io.base.TermAnnotationParser Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package org.monarchinitiative.phenol.io.base;

import java.io.Closeable;
import java.io.File;
import java.io.IOException;

import org.monarchinitiative.phenol.ontology.data.TermAnnotation;

/**
 * Interface for classes implementing parsers for files with annotation information for terms.
 *
 * @author Manuel Holtgrewe
 */
public interface TermAnnotationParser extends Closeable {

  /**
   * Returns true if the file contains more element.
   *
   * @return Whether the file contains another annotation.
   */
  boolean hasNext();

  /**
   * Returns the next term annotation.
   *
   * @return The next element in the file.
   * @throws TermAnnotationParserException in case of problems with parsing the file.
   * @throws IOException in case of problems with file I/O.
   */
  A next() throws IOException, TermAnnotationParserException;

  /** @return The {@link File} used for reading. */
  File getFile();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy