Package psidev.psi.mi.jami.bridges.obo
Class OntologyOboLoader
- java.lang.Object
-
- uk.ac.ebi.ols.loader.impl.BaseOBO2AbstractLoader
-
- psidev.psi.mi.jami.bridges.obo.AbstractOboLoader<OntologyTerm>
-
- psidev.psi.mi.jami.bridges.obo.OntologyOboLoader
-
- All Implemented Interfaces:
uk.ac.ebi.ols.loader.interfaces.Loader
public class OntologyOboLoader extends AbstractOboLoader<OntologyTerm>
The ontologyOboLoader is a loader of OntologyTerm with parents and children- Since:
17/07/13
- Version:
- $Id$
- Author:
- Marine Dumousseau (marine@ebi.ac.uk)
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
COMMENT_KEY
ConstantCOMMENT_KEY="comment"
protected static String
EXACT_KEY
ConstantEXACT_KEY="exact"
protected static String
LINE_BREAK
ConstantLINE_BREAK="\n"
protected static String
META_XREF_SEPARATOR
ConstantMETA_XREF_SEPARATOR=":"
protected static String
METHOD_REFERENCE
ConstantMETHOD_REFERENCE="method reference"
protected static String
METHOD_REFERENCE_MI_REF
ConstantMETHOD_REFERENCE_MI_REF="MI:0357"
protected static String
PMID
ConstantPMID="PMID"
protected static String
RESID
ConstantRESID="resid"
protected static String
RESID_MI_REF
ConstantRESID_MI_REF="MI:0248"
protected static int
XREF_TYPE
ConstantXREF_TYPE=3
-
Fields inherited from class psidev.psi.mi.jami.bridges.obo.AbstractOboLoader
log
-
Fields inherited from class uk.ac.ebi.ols.loader.impl.BaseOBO2AbstractLoader
ALT_ID, BATCH_MODE, BROAD, DEV_FROM_SET, DEVELOPS_FROM, EXACT, FULL_NAME, IS_A, IS_A_SET, logger, NARROW, ontBean, ONTOLOGY_DEFINITION, ontologyTerms, parser, PART_OF, PART_OF_SET, QUERY_URL, RELATED, SHORT_NAME, SOURCE_URL, SYNONYM, useGreedy
-
-
Constructor Summary
Constructors Constructor Description OntologyOboLoader(String databaseName)
Constructor for OntologyOboLoader.OntologyOboLoader(CvTerm database)
Constructor for OntologyOboLoader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addLinkToTerm(String parentId, String childId, Map<String,OntologyTerm> id2Terms)
addLinkToTerm.void
buildOntology(Map<String,OntologyTerm> id2Terms, Map<String,OntologyTerm> name2Terms)
buildOntology.protected void
buildTermRelationships(Map<String,OntologyTerm> id2Terms)
buildTermRelationships.protected void
createDefinitionFor(String def, OntologyTerm term)
createDefinitionFor.protected OntologyTerm
instantiateNewTerm(String name, Xref identity)
instantiateNewTerm.protected void
processAnnotations(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
Process the annotations of a termprotected void
processDefinition(String definition, OntologyTerm ontologyTerm)
Process the definition Stringprotected void
processDefinition(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
Process the definition of a termprotected void
processInfoInDescription(String definition, String otherInfoString, OntologyTerm ontologyTerm)
Process the other information in the descriptionprotected void
processShortLabel(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
processShortLabel.protected void
processSynonyms(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
processSynonyms.protected void
processXref(String db, String accession, OntologyTerm ontologyTerm)
processXref.protected String
processXrefDefinition(String xref, String database, String accession, String pubmedPrimary, OntologyTerm ontologyTerm)
processXrefDefinition.protected void
processXrefs(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
processXrefs.-
Methods inherited from class psidev.psi.mi.jami.bridges.obo.AbstractOboLoader
configure, createNewTerm, getOntologyDatabase, parseOboFile
-
Methods inherited from class uk.ac.ebi.ols.loader.impl.BaseOBO2AbstractLoader
dumpOntology, dumpOntologyStats, dumpTerm, getOntology, getRootTerms, getUnknownRelationTermBean, initializeCommonObjects, initializeTermBean, load, process, processTerm, safeTrim, safeTrim, setParser, setUseGreedy, unload
-
-
-
-
Field Detail
-
EXACT_KEY
protected static final String EXACT_KEY
ConstantEXACT_KEY="exact"
- See Also:
- Constant Field Values
-
XREF_TYPE
protected static final int XREF_TYPE
ConstantXREF_TYPE=3
- See Also:
- Constant Field Values
-
META_XREF_SEPARATOR
protected static final String META_XREF_SEPARATOR
ConstantMETA_XREF_SEPARATOR=":"
- See Also:
- Constant Field Values
-
LINE_BREAK
protected static final String LINE_BREAK
ConstantLINE_BREAK="\n"
- See Also:
- Constant Field Values
-
COMMENT_KEY
protected static final String COMMENT_KEY
ConstantCOMMENT_KEY="comment"
- See Also:
- Constant Field Values
-
PMID
protected static final String PMID
ConstantPMID="PMID"
- See Also:
- Constant Field Values
-
METHOD_REFERENCE
protected static final String METHOD_REFERENCE
ConstantMETHOD_REFERENCE="method reference"
- See Also:
- Constant Field Values
-
METHOD_REFERENCE_MI_REF
protected static final String METHOD_REFERENCE_MI_REF
ConstantMETHOD_REFERENCE_MI_REF="MI:0357"
- See Also:
- Constant Field Values
-
RESID
protected static final String RESID
ConstantRESID="resid"
- See Also:
- Constant Field Values
-
RESID_MI_REF
protected static final String RESID_MI_REF
ConstantRESID_MI_REF="MI:0248"
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildOntology
public void buildOntology(Map<String,OntologyTerm> id2Terms, Map<String,OntologyTerm> name2Terms)
buildOntology.
- Overrides:
buildOntology
in classAbstractOboLoader<OntologyTerm>
- Parameters:
id2Terms
- aMap
object.name2Terms
- aMap
object.
-
instantiateNewTerm
protected OntologyTerm instantiateNewTerm(String name, Xref identity)
instantiateNewTerm.
- Specified by:
instantiateNewTerm
in classAbstractOboLoader<OntologyTerm>
- Parameters:
name
- aString
object.identity
- aXref
object.- Returns:
- a T object.
-
createDefinitionFor
protected void createDefinitionFor(String def, OntologyTerm term)
createDefinitionFor.
- Specified by:
createDefinitionFor
in classAbstractOboLoader<OntologyTerm>
- Parameters:
def
- aString
object.term
- a T object.
-
processAnnotations
protected void processAnnotations(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
Process the annotations of a term- Overrides:
processAnnotations
in classAbstractOboLoader<OntologyTerm>
- Parameters:
term
- aTerm
object.ontologyTerm
- aOntologyTerm
object.
-
processXrefs
protected void processXrefs(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
processXrefs.
- Overrides:
processXrefs
in classAbstractOboLoader<OntologyTerm>
- Parameters:
term
- aTerm
object.ontologyTerm
- aOntologyTerm
object.
-
processXrefDefinition
protected String processXrefDefinition(String xref, String database, String accession, String pubmedPrimary, OntologyTerm ontologyTerm)
processXrefDefinition.
- Overrides:
processXrefDefinition
in classAbstractOboLoader<OntologyTerm>
- Parameters:
xref
- aString
object.database
- aString
object.accession
- aString
object.pubmedPrimary
- aString
object.ontologyTerm
- aOntologyTerm
object.- Returns:
- a
String
object.
-
processXref
protected void processXref(String db, String accession, OntologyTerm ontologyTerm)
processXref.
- Overrides:
processXref
in classAbstractOboLoader<OntologyTerm>
- Parameters:
db
- aString
object.accession
- aString
object.ontologyTerm
- aOntologyTerm
object.
-
processDefinition
protected void processDefinition(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
Process the definition of a term- Overrides:
processDefinition
in classAbstractOboLoader<OntologyTerm>
- Parameters:
term
- aTerm
object.ontologyTerm
- aOntologyTerm
object.
-
processDefinition
protected void processDefinition(String definition, OntologyTerm ontologyTerm)
Process the definition String- Overrides:
processDefinition
in classAbstractOboLoader<OntologyTerm>
- Parameters:
definition
- aString
object.ontologyTerm
- aOntologyTerm
object.
-
processInfoInDescription
protected void processInfoInDescription(String definition, String otherInfoString, OntologyTerm ontologyTerm)
Process the other information in the description- Overrides:
processInfoInDescription
in classAbstractOboLoader<OntologyTerm>
- Parameters:
definition
- aString
object.otherInfoString
- aString
object.ontologyTerm
- aOntologyTerm
object.
-
processSynonyms
protected void processSynonyms(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
processSynonyms.
- Overrides:
processSynonyms
in classAbstractOboLoader<OntologyTerm>
- Parameters:
term
- aTerm
object.ontologyTerm
- aOntologyTerm
object.
-
processShortLabel
protected void processShortLabel(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)
processShortLabel.
- Overrides:
processShortLabel
in classAbstractOboLoader<OntologyTerm>
- Parameters:
term
- aTerm
object.ontologyTerm
- aOntologyTerm
object.
-
buildTermRelationships
protected void buildTermRelationships(Map<String,OntologyTerm> id2Terms)
buildTermRelationships.
- Parameters:
id2Terms
- aMap
object.
-
-