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

java.lang.Object
  extended by uk.ac.ebi.microarray.zooma.eval.OntologyMappingOutcomeDecorator
      extended by uk.ac.ebi.microarray.zooma.eval.JSONProducerDecorator
All Implemented Interfaces:
OntologyMappingOutcome

public class JSONProducerDecorator
extends OntologyMappingOutcomeDecorator

A decorator that has the ability to generate a JSON object from an outcome once applied. Having been applied, clients can extract the JSON representation of the outcome by calling getJSONObject().

Author:
Tony Burdett

Constructor Summary
protected JSONProducerDecorator(OntologyMappingOutcome outcome)
           
 
Method Summary
 void apply()
          Applies the current outcome.
static OntologyMappingOutcome generateJSONProducingOutcome(OntologyMappingOutcome outcome)
           
 net.sf.json.JSONObject getJSONObject()
           
 
Methods inherited from class uk.ac.ebi.microarray.zooma.eval.OntologyMappingOutcomeDecorator
getBestHypotheses, getOutcome, getUnmappedValue, isAutomaticallyAcceptable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONProducerDecorator

protected JSONProducerDecorator(OntologyMappingOutcome outcome)
Method Detail

generateJSONProducingOutcome

public static OntologyMappingOutcome generateJSONProducingOutcome(OntologyMappingOutcome outcome)

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
Overrides:
apply in class OntologyMappingOutcomeDecorator
Throws:
BadOutcomeException

getJSONObject

public net.sf.json.JSONObject getJSONObject()


Copyright © 2010. All Rights Reserved.