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

org.erasmusmc.data_mining.ontology.api.Ontology Maven / Gradle / Ivy

The newest version!
/**
 * Peregrine is an indexing engine that can recognize concepts in human readable
 * text, based on a database (thesaurus) of known terms.
 *
 * Copyright 2005-2011 Erasmus University Medical Centre (EMC)
 * Copyright 2009-2011 Netherlands Bioinformatics Centre (NBIC)
 *
 * Contact us at: [email protected]
 *
 * This file is part of Peregrine. Peregrine is free software: you can
 * redistribute it and/or modify it under the terms of the GNU Affero General
 * Public License as published by the Free Software Foundation, either version 3
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see .
 */
package org.erasmusmc.data_mining.ontology.api;

import java.io.Serializable;
import java.util.Iterator;

/**
 * This interface provides an access to collection of concepts.
 */
public interface Ontology {

    /**
     * Get the concept for the given identifier. The identifier must be the
     * primary identifier of the concept in this ontology.
     *
     * @param conceptId The primary concept identifier in this ontology. Must
     * not be null.
     * @return The concept for the given identifier. When the identifier is not
     * found this method will return null.
     */
    Concept getConcept(Serializable conceptId);

    /**
     * Get the Term that is identified by the given identifier.
     *
     * @param termId The identifier for the term. Must not be null.
     * @return The Term identified by this Term.Id. When the identifier is not
     * found this method will return null.
     */
    Term getTerm(Term.Id termId);

    /**
     * Get an Iterator over all concepts (including terms).
     *
     * @return An iterator over the concepts.
     */
    Iterator getConceptsIterator();

    /**
     * Get an Iterator over all terms.
     *
     * @return An iterator over the terms.
     */
    Iterator getTermsIterator();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy