org.monarchinitiative.phenol.io.base.TermAnnotationParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of phenol-io Show documentation
Show all versions of phenol-io Show documentation
phenol-io contains the generic I/O functionality for ontologies
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();
}