|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.ebi.microarray.zooma.mapping.TextReportingMapper
public class TextReportingMapper
A mapper implementation that generates a simple tab delimited text file mapping report.
This mapper is not fully thread-safe - it is designed for writing multiple outcomes to a singleTextReportWriter
,
the lifecycle of which should be handled by the calling class. Whilst
applying outcomes from parallel threads is likely to be safe, calling classes
should take care to ensure that the ReportWriter has been initialized fully
before commencing writing, and should take care to close down only once
writing has finished.
This reporting mapper needs to be fully wired with it's subsystem
dependencies before usage. Generally, this is easy to acheive for all
reusable modules (evaluators, calculators, rankers, factories etc) but
retrievers may change between requests. For this reason, there is a
convenience method to supply new retrievers (addRetriever(uk.ac.ebi.microarray.zooma.retrieval.OntologyTermRetriever)
)
on the fly.
Constructor Summary | |
---|---|
TextReportingMapper()
|
Method Summary | |
---|---|
void |
addRetriever(OntologyTermRetriever retriever)
Add an ontology term retriever to use to generate mapping outcomes. |
void |
applyOutcome(OntologyMappingOutcome outcome)
Assesses and applies, the given outcome. |
OntologyMappingOutcome |
generateOutcome(Value value)
Generates an OntologyMappingOutcome given a description and a
mapping context. |
OntologyMappingFormulator |
getAlternativeHypothesisFormulator()
|
OntologyMappingEvaluator |
getEvaluator()
|
protected org.slf4j.Logger |
getLog()
|
OntologyMappingFormulator |
getNullHypothesisFormulator()
|
boolean |
isReportingFails()
|
void |
setAlternativeHypothesisFormulator(OntologyMappingFormulator alternativeHypothesisFormulator)
|
void |
setEvaluator(OntologyMappingEvaluator evaluator)
|
void |
setNullHypothesisFormulator(OntologyMappingFormulator nullHypothesisFormulator)
|
void |
setReportingFails(boolean reportFails)
|
void |
writeFailureOutcomesWith(TextReportWriter failureReportWriter)
|
void |
writeOutcomesWith(TextReportWriter reportWriter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextReportingMapper()
Method Detail |
---|
protected org.slf4j.Logger getLog()
public void setNullHypothesisFormulator(OntologyMappingFormulator nullHypothesisFormulator)
public OntologyMappingFormulator getNullHypothesisFormulator()
public void setAlternativeHypothesisFormulator(OntologyMappingFormulator alternativeHypothesisFormulator)
public OntologyMappingFormulator getAlternativeHypothesisFormulator()
public void setEvaluator(OntologyMappingEvaluator evaluator)
public OntologyMappingEvaluator getEvaluator()
public void setReportingFails(boolean reportFails)
public boolean isReportingFails()
public void writeOutcomesWith(TextReportWriter reportWriter)
public void writeFailureOutcomesWith(TextReportWriter failureReportWriter)
public void addRetriever(OntologyTermRetriever retriever)
retriever
- the retriever to add to fetch terms frompublic OntologyMappingOutcome generateOutcome(Value value) throws BadOutcomeException
OntologyMapper
OntologyMappingOutcome
given a description and a
mapping context.
generateOutcome
in interface OntologyMapper
value
- the description requiring mapping
BadOutcomeException
- if the outcome could not be generated due to an errorpublic void applyOutcome(OntologyMappingOutcome outcome) throws BadOutcomeException
OntologyMapper
applyOutcome
in interface OntologyMapper
outcome
- the outcome to apply
BadOutcomeException
- if the outcome could not be applied
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |