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 StringCOMMENT_KEYConstantCOMMENT_KEY="comment"protected static StringEXACT_KEYConstantEXACT_KEY="exact"protected static StringLINE_BREAKConstantLINE_BREAK="\n"protected static StringMETA_XREF_SEPARATORConstantMETA_XREF_SEPARATOR=":"protected static StringMETHOD_REFERENCEConstantMETHOD_REFERENCE="method reference"protected static StringMETHOD_REFERENCE_MI_REFConstantMETHOD_REFERENCE_MI_REF="MI:0357"protected static StringPMIDConstantPMID="PMID"protected static StringRESIDConstantRESID="resid"protected static StringRESID_MI_REFConstantRESID_MI_REF="MI:0248"protected static intXREF_TYPEConstantXREF_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 voidaddLinkToTerm(String parentId, String childId, Map<String,OntologyTerm> id2Terms)addLinkToTerm.voidbuildOntology(Map<String,OntologyTerm> id2Terms, Map<String,OntologyTerm> name2Terms)buildOntology.protected voidbuildTermRelationships(Map<String,OntologyTerm> id2Terms)buildTermRelationships.protected voidcreateDefinitionFor(String def, OntologyTerm term)createDefinitionFor.protected OntologyTerminstantiateNewTerm(String name, Xref identity)instantiateNewTerm.protected voidprocessAnnotations(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)Process the annotations of a termprotected voidprocessDefinition(String definition, OntologyTerm ontologyTerm)Process the definition Stringprotected voidprocessDefinition(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)Process the definition of a termprotected voidprocessInfoInDescription(String definition, String otherInfoString, OntologyTerm ontologyTerm)Process the other information in the descriptionprotected voidprocessShortLabel(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)processShortLabel.protected voidprocessSynonyms(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)processSynonyms.protected voidprocessXref(String db, String accession, OntologyTerm ontologyTerm)processXref.protected StringprocessXrefDefinition(String xref, String database, String accession, String pubmedPrimary, OntologyTerm ontologyTerm)processXrefDefinition.protected voidprocessXrefs(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:
buildOntologyin classAbstractOboLoader<OntologyTerm>- Parameters:
id2Terms- aMapobject.name2Terms- aMapobject.
-
instantiateNewTerm
protected OntologyTerm instantiateNewTerm(String name, Xref identity)
instantiateNewTerm.
- Specified by:
instantiateNewTermin classAbstractOboLoader<OntologyTerm>- Parameters:
name- aStringobject.identity- aXrefobject.- Returns:
- a T object.
-
createDefinitionFor
protected void createDefinitionFor(String def, OntologyTerm term)
createDefinitionFor.
- Specified by:
createDefinitionForin classAbstractOboLoader<OntologyTerm>- Parameters:
def- aStringobject.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:
processAnnotationsin classAbstractOboLoader<OntologyTerm>- Parameters:
term- aTermobject.ontologyTerm- aOntologyTermobject.
-
processXrefs
protected void processXrefs(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)processXrefs.
- Overrides:
processXrefsin classAbstractOboLoader<OntologyTerm>- Parameters:
term- aTermobject.ontologyTerm- aOntologyTermobject.
-
processXrefDefinition
protected String processXrefDefinition(String xref, String database, String accession, String pubmedPrimary, OntologyTerm ontologyTerm)
processXrefDefinition.
- Overrides:
processXrefDefinitionin classAbstractOboLoader<OntologyTerm>- Parameters:
xref- aStringobject.database- aStringobject.accession- aStringobject.pubmedPrimary- aStringobject.ontologyTerm- aOntologyTermobject.- Returns:
- a
Stringobject.
-
processXref
protected void processXref(String db, String accession, OntologyTerm ontologyTerm)
processXref.
- Overrides:
processXrefin classAbstractOboLoader<OntologyTerm>- Parameters:
db- aStringobject.accession- aStringobject.ontologyTerm- aOntologyTermobject.
-
processDefinition
protected void processDefinition(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)Process the definition of a term- Overrides:
processDefinitionin classAbstractOboLoader<OntologyTerm>- Parameters:
term- aTermobject.ontologyTerm- aOntologyTermobject.
-
processDefinition
protected void processDefinition(String definition, OntologyTerm ontologyTerm)
Process the definition String- Overrides:
processDefinitionin classAbstractOboLoader<OntologyTerm>- Parameters:
definition- aStringobject.ontologyTerm- aOntologyTermobject.
-
processInfoInDescription
protected void processInfoInDescription(String definition, String otherInfoString, OntologyTerm ontologyTerm)
Process the other information in the description- Overrides:
processInfoInDescriptionin classAbstractOboLoader<OntologyTerm>- Parameters:
definition- aStringobject.otherInfoString- aStringobject.ontologyTerm- aOntologyTermobject.
-
processSynonyms
protected void processSynonyms(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)processSynonyms.
- Overrides:
processSynonymsin classAbstractOboLoader<OntologyTerm>- Parameters:
term- aTermobject.ontologyTerm- aOntologyTermobject.
-
processShortLabel
protected void processShortLabel(uk.ac.ebi.ols.model.interfaces.Term term, OntologyTerm ontologyTerm)processShortLabel.
- Overrides:
processShortLabelin classAbstractOboLoader<OntologyTerm>- Parameters:
term- aTermobject.ontologyTerm- aOntologyTermobject.
-
buildTermRelationships
protected void buildTermRelationships(Map<String,OntologyTerm> id2Terms)
buildTermRelationships.
- Parameters:
id2Terms- aMapobject.
-
-