|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ebi.microarray.zooma.formulate.AbstractFormulator
uk.ac.ebi.microarray.zooma.formulate.ContextSensitiveMappingFormulator
public class ContextSensitiveMappingFormulator
An OntologyMappingFormulator
that generates the most specific hypotheses possible and does basic filtering
based on context.
This formulator generates hypotheses (using the supplied factory) by
retrieving all possible matches to a given Value
. Once a set of
results are acquired, it compares contexts for equality and merges hypotheses
that are asserted in the same context. If we have two hypotheses in context
"foo", one that asserts text value 'v' maps to term 't1' and one that asserts
text value 'v' maps to term 't2', this formulator will combine them into a
single hypothesis that suggests the 'v' maps to both 't1' and 't2'. The
original hypotheses are then discarded.
Each alternative hypothesis is generated on the basis of equal contexts. So,
every pairing of Value
to a collection of OntologyTerm
s made in the same context is assumed to be a
single alternative hypothesis.
Constructor Summary | |
---|---|
ContextSensitiveMappingFormulator()
|
Method Summary | |
---|---|
java.util.Collection<OntologyMappingHypothesis> |
formulateHypotheses(Value value)
Formulate a set of hypotheses that describe the possible mappings that might be made about the given value. |
OntologyMappingHypothesisFactory |
getOntologyMappingHypothesisFactory()
|
OntologyTermRetriever |
getOntologyTermRetriever()
|
void |
setOntologyMappingHypothesisFactory(OntologyMappingHypothesisFactory factory)
|
void |
setOntologyTermRetriever(OntologyTermRetriever retriever)
|
Methods inherited from class uk.ac.ebi.microarray.zooma.formulate.AbstractFormulator |
---|
addRetriever, clearRetrievers, getLog, getRetriever, removeRetriever, setRetriever |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContextSensitiveMappingFormulator()
Method Detail |
---|
public void setOntologyMappingHypothesisFactory(OntologyMappingHypothesisFactory factory)
public OntologyMappingHypothesisFactory getOntologyMappingHypothesisFactory()
public void setOntologyTermRetriever(OntologyTermRetriever retriever)
public OntologyTermRetriever getOntologyTermRetriever()
public java.util.Collection<OntologyMappingHypothesis> formulateHypotheses(Value value) throws HypothesisFormulationException
OntologyMappingFormulator
Implementations may use a specific strategy to fetch mappings that may, for example, spread across multiple sources. Such implementations should not usually be suitable for formulating the null hypothesis - normally the null hypothesis will prefer a mapping from a dedicated source or it will assert that no mapping is possible.
Implementations should retrieve, or construct, context information for each hypothesis formulated. Some implementations may wish to formulate hypotheses from the same source with different levels of sensitivity, for example: in some cases, species information may be required whereas in others it may be irrelevant.
Generally, formulators act as a facade over the OntologyTermRetriever
and OntologyMappingHypothesisFactory
interfaces to retrieve then generate hypotheses. However, most
implementations will also describe some higher logic to consider only those
hypotheses from relevant or interesting contexts.
formulateHypotheses
in interface OntologyMappingFormulator
value
- the description to hypothesise about
HypothesisFormulationException
- if any hypotheses could not be generated, due to invalid data or a
failure of retrieval
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |