Class AbstractOlsFetcher<T extends CvTerm>

    • Field Detail

      • olsClient

        protected uk.ac.ebi.pride.utilities.ols.web.service.client.OLSClient olsClient
    • Method Detail

      • initialiseDbMap

        protected void initialiseDbMap()

        initialiseDbMap.

      • createXref

        protected Xref createXref​(String identifier,
                                  String miOntologyName)

        createXref.

        Parameters:
        identifier - a String object.
        miOntologyName - a String object.
        Returns:
        a Xref object.
      • fetchByIdentifier

        public T fetchByIdentifier​(String termIdentifier,
                                   String miOntologyName)
                            throws BridgeFailedException
        Uses the identifier and the name of the database to search for a complete form of the cvTerm.
        Specified by:
        fetchByIdentifier in interface CvTermFetcher<T extends CvTerm>
        Parameters:
        termIdentifier - The identifier for the CvTerm to fetch.
        miOntologyName - The name of the ontology to search for. Eg, psi-mi, psi-mod, go. Must not be Null.
        Returns:
        A full cvTerm which matches the search term or null if one cannot be found.
        Throws:
        BridgeFailedException - if any.
      • fetchByName

        public T fetchByName​(String searchName,
                             String miOntologyName)
                      throws BridgeFailedException
        Uses the name of the term and the name of the database to search for a complete form of the term.
        Specified by:
        fetchByName in interface CvTermFetcher<T extends CvTerm>
        Parameters:
        searchName - A full or short name for the term to be searched for.
        miOntologyName - The ontology to search for the term in.
        Returns:
        A fully enriched cvTerm which matches the search term or null if one cannot be found.
        Throws:
        BridgeFailedException - if any.
      • fetchByName

        public Collection<T> fetchByName​(String searchName)
                                  throws BridgeFailedException
        Uses the name of the term and the name of the database to search for a complete form of the term.

        If the term can not be resolved to a database, then this method may return null.

        Specified by:
        fetchByName in interface CvTermFetcher<T extends CvTerm>
        Parameters:
        searchName - A full or short name for the term to be searched for.
        Returns:
        A fully enriched cvTerm which matches the search term or null if one cannot be found.
        Throws:
        BridgeFailedException - if any.
      • fetchByIdentifiers

        public Collection<T> fetchByIdentifiers​(Collection<String> termIdentifiers,
                                                CvTerm ontologyDatabase)
                                         throws BridgeFailedException
        Uses the identifier and a cvTerm denoting the database to search to fetch a complete from of the term.
        Specified by:
        fetchByIdentifiers in interface CvTermFetcher<T extends CvTerm>
        Parameters:
        termIdentifiers - The identifier for the CvTerms to fetch.
        ontologyDatabase - The name of the ontology to search for the terms in.
        Returns:
        A fully enriched cvTerm which matches the search term or null if one cannot be found.
        Throws:
        BridgeFailedException - if any.
      • fetchByNames

        public Collection<T> fetchByNames​(Collection<String> searchNames,
                                          String miOntologyName)
                                   throws BridgeFailedException
        Uses the name of the term and the name of the database to search for a complete form of the term.
        Specified by:
        fetchByNames in interface CvTermFetcher<T extends CvTerm>
        Parameters:
        searchNames - A full or short name for the term to be searched for.
        miOntologyName - The name of the database to search for the names in.
        Returns:
        A fully enriched cvTerm which matches the search term or null if one cannot be found.
        Throws:
        BridgeFailedException - if any.
      • fetchByNames

        public Collection<T> fetchByNames​(Collection<String> searchNames)
                                   throws BridgeFailedException
        Finds the CvTerms which match the exact names provided.

        If the a term found by the search can not be resolved to a database, this method may return null.

        Specified by:
        fetchByNames in interface CvTermFetcher<T extends CvTerm>
        Parameters:
        searchNames - A collection full or short names for the term to be searched for.
        Returns:
        A collection of cvTerms which matched a search term.
        Throws:
        BridgeFailedException - if any.
      • instantiateCvTerm

        protected abstract T instantiateCvTerm​(String termName,
                                               Xref identity,
                                               String olsOntologyName)

        instantiateCvTerm.

        Parameters:
        termName - a String object.
        identity - a Xref object.
        olsOntologyName - a String object.
        Returns:
        a T object.