uk.ac.ebi.adfconverter.tools.checker.ontology
Class MGEDOntologyChecker

java.lang.Object
  extended byuk.ac.ebi.adfconverter.tools.checker.ontology.MGEDOntologyChecker

public class MGEDOntologyChecker
extends java.lang.Object

Check if a term is in the MGED ontology using Ontology helper from MAGEstk (read daml file) From TestMOE of MAGESTK

Version:
1 TODO file is red each time/ optimize
Author:
Pierre MARGUERITE

Constructor Summary
MGEDOntologyChecker()
          Creates a new instance of testMGEDOE
MGEDOntologyChecker(java.lang.String _OntologyFilePath)
          Creates a new instance of MGEDOntologyChecker
MGEDOntologyChecker(java.lang.String _OntologyFilePath, java.io.File _ADFMGEDOntology, java.lang.String _descriptionFile, boolean _isOntologyCheckerEnable)
          Creates a new instance of MGEDOntologyChecker
 
Method Summary
 void assignFirstValue(org.biomage.tools.helpers.MGEDOntologyEntry entry)
          Assign first value to current entry if assignable
 boolean checkOntologyEntry(ADFConverterLogger log, Extendable MAGEobj, OntologyEntry oentry, java.lang.String link)
          Check the ontology term in a an OntologyEntry
 boolean checkontologyTerm(ADFConverterLogger log, java.lang.String type, DataBuffer value)
          Check if a term belong to the MGED ontology
 OntologyEntry createOntologyEntry(java.lang.String type, java.lang.String value)
          Creates an ontology entry object
 void setIdentifierRule(java.lang.String databaseRule)
          Set the database identifier generation rule.
 void testAssigningValues(java.util.Vector mgedOntClassEntries)
          Tests if Ontoloy class entries are correct
 java.util.Vector testInitOfMGEDOE(java.util.Vector mgedOntClassNames)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MGEDOntologyChecker

public MGEDOntologyChecker()
Creates a new instance of testMGEDOE


MGEDOntologyChecker

public MGEDOntologyChecker(java.lang.String _OntologyFilePath)
                    throws java.lang.Exception
Creates a new instance of MGEDOntologyChecker

Parameters:
_OntologyFilePath - The path to the ontology daml file
Throws:
java.lang.Exception - if error during ontology file reading

MGEDOntologyChecker

public MGEDOntologyChecker(java.lang.String _OntologyFilePath,
                           java.io.File _ADFMGEDOntology,
                           java.lang.String _descriptionFile,
                           boolean _isOntologyCheckerEnable)
                    throws java.lang.Exception
Creates a new instance of MGEDOntologyChecker

Parameters:
_OntologyFilePath - The path to the ontology daml file
_ADFMGEDOntology - the path to the ADF MGEDOntology link file
_descriptionFile - the path to the file describing the file structure
Throws:
java.lang.Exception - if error during ontology file reading
Method Detail

assignFirstValue

public void assignFirstValue(org.biomage.tools.helpers.MGEDOntologyEntry entry)
Assign first value to current entry if assignable

Parameters:
entry -

checkOntologyEntry

public boolean checkOntologyEntry(ADFConverterLogger log,
                                  Extendable MAGEobj,
                                  OntologyEntry oentry,
                                  java.lang.String link)
Check the ontology term in a an OntologyEntry

Parameters:
log - the log for text output
MAGEobj - The MAGE Object associated to the Ontology entry
oentry - The ontology entry itself
link - the link for MAGE and MGED classes
Returns:
true, if the ontology entry value is correct for the given MAGEObj and link. false,othewise

checkontologyTerm

public boolean checkontologyTerm(ADFConverterLogger log,
                                 java.lang.String type,
                                 DataBuffer value)
Check if a term belong to the MGED ontology

Parameters:
log - the logger to report information
type - the ontology type
value - the ontlogy value
Returns:
true, if the term is correct, false otherwise

createOntologyEntry

public OntologyEntry createOntologyEntry(java.lang.String type,
                                         java.lang.String value)
Creates an ontology entry object

Parameters:
type - the type of the ontology
value - the value of the ontology
Returns:
the corresponding ontology entry

setIdentifierRule

public void setIdentifierRule(java.lang.String databaseRule)
                       throws java.lang.Exception
Set the database identifier generation rule.

Parameters:
databaseRule - the database identifier rule
Throws:
java.lang.Exception - if an error occurs during ontology manager initialisation

testAssigningValues

public void testAssigningValues(java.util.Vector mgedOntClassEntries)
Tests if Ontoloy class entries are correct

Parameters:
mgedOntClassEntries - Vector of Entries to test

testInitOfMGEDOE

public java.util.Vector testInitOfMGEDOE(java.util.Vector mgedOntClassNames)


European Bioinformatics InstituteMicroarray Informatics Team