uk.ac.ebi.microarray.zooma.mapping
Interface OntologyMapper

All Known Implementing Classes:
JSONOntologyMapper, TextReportingMapper

public interface OntologyMapper

A utility for performing mappings from text descriptions into a defined domain space of ontology terms. Given a Value, OntologyMapper implementations should generate and apply correct ontology mappings, persisting them in some way.

Because it is not always possible to apply mappings automatically, this is a two step process. Firstly, and OntologyMappingOutcome is generated. This will usually delegate to other classes - OntologyMappingFormulator is an interface to the code module for generating possible hypotheses, which can then be used to generate an outcome using an OntologyMappingEvaluator.

Once the outcome is generated, Mapper implementations should assess whether it can be automatically applied. If not, normally some assessment will need to be done before it can be applied. Applying an outcome can have a range of effects: usually this will involve some sort of persistence to a database, or sometimes it will simply involve the generation of a report. If the action taken as part of applying this outcome needs to be parameterised (e.g. database location, file to write a report to) this parameter should be encapsulated with the outcome object.

This class is intended to be used as a service interface, or as a simple point of access for command line or desktop driven applications.

Author:
Tony Burdett
See Also:
OntologyMappingFormulator, OntologyMappingEvaluator, OntologyMappingOutcome

Method Summary
 void applyOutcome(OntologyMappingOutcome outcome)
          Assesses and applies, the given outcome.
 OntologyMappingOutcome generateOutcome(Value value)
          Generates an OntologyMappingOutcome given a description and a mapping context.
 

Method Detail

generateOutcome

OntologyMappingOutcome generateOutcome(Value value)
                                       throws BadOutcomeException
Generates an OntologyMappingOutcome given a description and a mapping context.

Parameters:
value - the description requiring mapping
Returns:
the expected ontology mapping outcome for the given description in a context
Throws:
BadOutcomeException - if the outcome could not be generated due to an error

applyOutcome

void applyOutcome(OntologyMappingOutcome outcome)
                  throws BadOutcomeException
Assesses and applies, the given outcome. Implementations are free to define the actions taken when an outcome is applied. The value and context originally being mapped from is supplied for the purposes of provenance tracking and logging

Parameters:
outcome - the outcome to apply
Throws:
BadOutcomeException - if the outcome could not be applied


Copyright © 2010. All Rights Reserved.