uk.ac.ebi.microarray.zooma.eval
Class OntologyMappingOutcomeDecorator

java.lang.Object
  extended by uk.ac.ebi.microarray.zooma.eval.OntologyMappingOutcomeDecorator
All Implemented Interfaces:
OntologyMappingOutcome
Direct Known Subclasses:
CurationDecorator, FailureReportWriterDecorator, JSONProducerDecorator, ReportWriterDecorator

public abstract class OntologyMappingOutcomeDecorator
extends java.lang.Object
implements OntologyMappingOutcome

An abstract class that implements OntologyMappingOutcome and follows the decorator pattern. This allows us to decorate outcomes, tagging

Author:
Tony Burdett

Constructor Summary
protected OntologyMappingOutcomeDecorator(OntologyMappingOutcome outcome)
           
 
Method Summary
 void apply()
          Applies the current outcome.
 java.util.Collection<OntologyMappingHypothesis> getBestHypotheses()
          A collection of OntologyMappingHypothesis objects that describe ontology mappings.
protected  OntologyMappingOutcome getOutcome()
           
 Value getUnmappedValue()
          Returns that value that has been used to produce this outcome.
 boolean isAutomaticallyAcceptable()
          Whether or not it was possible to automatically accept a given outcome.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OntologyMappingOutcomeDecorator

protected OntologyMappingOutcomeDecorator(OntologyMappingOutcome outcome)
Method Detail

getOutcome

protected OntologyMappingOutcome getOutcome()

getUnmappedValue

public Value getUnmappedValue()
Description copied from interface: OntologyMappingOutcome
Returns that value that has been used to produce this outcome.

Specified by:
getUnmappedValue in interface OntologyMappingOutcome
Returns:
the value that produced this outcome

getBestHypotheses

public java.util.Collection<OntologyMappingHypothesis> getBestHypotheses()
Description copied from interface: OntologyMappingOutcome
A collection of OntologyMappingHypothesis objects that describe ontology mappings. In the general case, if there is a single valued hypothesis it can be automatically accepted, and if there are many hypotheses user curation will be required before a single outcome can be applied. If there are zero, no mappings were possible.

Specified by:
getBestHypotheses in interface OntologyMappingOutcome
Returns:
a collections of hypotheses describing how a description may match to known ontology terms

isAutomaticallyAcceptable

public boolean isAutomaticallyAcceptable()
Description copied from interface: OntologyMappingOutcome
Whether or not it was possible to automatically accept a given outcome. Generally, this will be true if there was a single improved hypothesis that was accepted and written to some underlying datasource, but implementations are free to define their own criteria for automated acceptance.

Specified by:
isAutomaticallyAcceptable in interface OntologyMappingOutcome
Returns:
whether this mapping outcome was automatically accepted

apply

public void apply()
           throws BadOutcomeException
Description copied from interface: OntologyMappingOutcome
Applies the current outcome. This will normally trigger some action that results in the persistance of the new mapping.

Specified by:
apply in interface OntologyMappingOutcome
Throws:
BadOutcomeException


Copyright © 2010. All Rights Reserved.