uk.ac.ebi.microarray.zooma.hypothesis
Class AbstractTrackedHypothesis

java.lang.Object
  extended by uk.ac.ebi.microarray.zooma.hypothesis.AbstractTrackedHypothesis
All Implemented Interfaces:
OntologyMappingHypothesis, Information
Direct Known Subclasses:
NoMappingPossibleHypothesis, PossibleDuplicateMappingsHypothesis

public abstract class AbstractTrackedHypothesis
extends java.lang.Object
implements OntologyMappingHypothesis, Information

An ontology mapping hypothesis that communicates with an InformationTracker to facilitate hypothesis assessment.

Author:
Tony Burdett

Field Summary
protected  OntologyMappingContext context
           
protected  java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> terms
           
protected  Value value
           
 
Constructor Summary
AbstractTrackedHypothesis()
           
 
Method Summary
 void acceptHypothesis()
          Accept this hypothesis, informing the ontology mapping mediator of this change.
 void addOntologyTerm(uk.ac.ebi.ontocat.OntologyTerm ontologyTerm)
          Adds an additional term to the collection of terms that are mapped by this hypothesis.
 void aggregateContextFromEquivalentHypothesis(OntologyMappingContext equivalentContext)
           
 void changed()
          Called whenever this information object is updated, this calls back to the mediator governing this information object and updates all dependent information artifacts.
 OntologyMappingContext getContext()
          The context in which this mapping hypothesis should be attempted
protected  InformationTracker getMappingTracker()
           
 java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> getOntologyTerms()
          Gets the collections of OntologyTerms that can hypothetically be mapped to the given value.
 Value getValue()
          Gets the description that is attempted to be mapped in this hypothesis.
 boolean isAccepted()
          Returns whether or not this hypothesis has been accepted as the best mapping hypothesis
 boolean isRejected()
          Returns whether or not this hypothesis has been rejected against another, better hypothesis
 void rejectHypothesis()
          Reject this hypothesis, informing the ontology mapping mediator of this change.
 void setOntologyMappingTracker(InformationTracker mappingTracker)
          Set the mediator service that this hypothesis can provide feedback to.
 void setOntologyTerms(java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> ontologyTerms)
          Sets the collection of OntologyTerms that can hypothetically be mapped to the value for this hypothesis.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface uk.ac.ebi.microarray.zooma.hypothesis.OntologyMappingHypothesis
accept
 

Field Detail

value

protected Value value

terms

protected java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> terms

context

protected OntologyMappingContext context
Constructor Detail

AbstractTrackedHypothesis

public AbstractTrackedHypothesis()
Method Detail

getMappingTracker

protected InformationTracker getMappingTracker()

getValue

public Value getValue()
Description copied from interface: OntologyMappingHypothesis
Gets the description that is attempted to be mapped in this hypothesis.

Specified by:
getValue in interface OntologyMappingHypothesis
Returns:
the description we're trying to map

setOntologyTerms

public void setOntologyTerms(java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> ontologyTerms)
Description copied from interface: OntologyMappingHypothesis
Sets the collection of OntologyTerms that can hypothetically be mapped to the value for this hypothesis.

Specified by:
setOntologyTerms in interface OntologyMappingHypothesis
Parameters:
ontologyTerms - the collections of terms that can be mapped

getOntologyTerms

public java.util.Collection<uk.ac.ebi.ontocat.OntologyTerm> getOntologyTerms()
Description copied from interface: OntologyMappingHypothesis
Gets the collections of OntologyTerms that can hypothetically be mapped to the given value.

Specified by:
getOntologyTerms in interface OntologyMappingHypothesis
Returns:
a collection of possible ontology term mappings

addOntologyTerm

public void addOntologyTerm(uk.ac.ebi.ontocat.OntologyTerm ontologyTerm)
Description copied from interface: OntologyMappingHypothesis
Adds an additional term to the collection of terms that are mapped by this hypothesis. Implementations should define whether duplicate mappings are possible for this hypothesis.

Specified by:
addOntologyTerm in interface OntologyMappingHypothesis
Parameters:
ontologyTerm - the ontology term being added to this hypothesis

getContext

public OntologyMappingContext getContext()
Description copied from interface: OntologyMappingHypothesis
The context in which this mapping hypothesis should be attempted

Specified by:
getContext in interface OntologyMappingHypothesis
Returns:
the mapping context for this outcome

isAccepted

public boolean isAccepted()
Description copied from interface: OntologyMappingHypothesis
Returns whether or not this hypothesis has been accepted as the best mapping hypothesis

Specified by:
isAccepted in interface OntologyMappingHypothesis
Returns:
true if this hypothesis is accepted, false otherwise

isRejected

public boolean isRejected()
Description copied from interface: OntologyMappingHypothesis
Returns whether or not this hypothesis has been rejected against another, better hypothesis

Specified by:
isRejected in interface OntologyMappingHypothesis
Returns:
true if this hypothesis is rejected, false otherwise

setOntologyMappingTracker

public void setOntologyMappingTracker(InformationTracker mappingTracker)
Set the mediator service that this hypothesis can provide feedback to. Whenever a hypothesis is changed with acceptHypothesis() or rejectHypothesis() it should inform the mediator.

Parameters:
mappingTracker - the mediator to inform of changes

acceptHypothesis

public void acceptHypothesis()
Description copied from interface: OntologyMappingHypothesis
Accept this hypothesis, informing the ontology mapping mediator of this change.

Specified by:
acceptHypothesis in interface OntologyMappingHypothesis

rejectHypothesis

public void rejectHypothesis()
Description copied from interface: OntologyMappingHypothesis
Reject this hypothesis, informing the ontology mapping mediator of this change.

Specified by:
rejectHypothesis in interface OntologyMappingHypothesis

changed

public void changed()
Description copied from interface: Information
Called whenever this information object is updated, this calls back to the mediator governing this information object and updates all dependent information artifacts.

Specified by:
changed in interface Information

aggregateContextFromEquivalentHypothesis

public void aggregateContextFromEquivalentHypothesis(OntologyMappingContext equivalentContext)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.