org.decisiondeck.xmcda_oo.utils
Class LaTeXExport

java.lang.Object
  extended by org.decisiondeck.xmcda_oo.utils.LaTeXExport

public class LaTeXExport
extends Object

NB does not work well when ids contain characters that LaTeX does not like (such as underscores). TODO comment alts and crits list thing.

Note that using ordered sets is not supported (their order will not necessarily be used by this object).


Constructor Summary
LaTeXExport()
           
 
Method Summary
 void addAttribute(Criterion attribute, Map<Alternative,String> values)
           
 void exportAllAssignments(Map<DecisionMaker,? extends IOrderedAssignmentsRead> allAssignments, IRdEvaluations evaluations)
           
 void exportAllAssignmentsOld(Map<DecisionMaker,Assignments> allAssignments, IRdEvaluations evaluations)
           
 void exportAllThresholds(Map<DecisionMaker,ICriteriaWithThresholds> allThresholds)
          This method buffers the output writing.
 void exportAssignmentsMultiple(IOrderedAssignmentsToMultipleRead assignments)
           
 void exportAssignmentsSingle(IOrderedAssignmentsRead assignments, IRdEvaluations evaluations)
           
 void exportCoalitions(ICoalitions coalitions)
           
 void exportCoalitions(Map<DecisionMaker,ICoalitions> coalitions)
           
 void exportEvaluations(IRdEvaluations evaluations)
           
 Set<Alternative> getAlternatives()
           
 List<Alternative> getAlternativesList()
           
 List<Criterion> getCriteriaList()
           
 List<DecisionMaker> getDecisionMakersList()
           
 NumberFormat getNumberFormatter()
           
 Integer getShortTableLimit()
           
 void setAlternativesList(List<Alternative> alternativesList)
          Sets the alternatives list to use when exporting.
 void setCriteriaList(List<Criterion> criteriaList)
           
 void setDecisionMakersList(List<DecisionMaker> decisionMakersList)
           
 void setDestination(OutputSupplier<? extends Writer> destination)
           
 void setMaxRecords(int maxRecords)
           
 void setNumberFormatter(NumberFormat numberFormatter)
           
 void setOutput(Writer writer)
           
 void setShortTableLimit(Integer shortTableLimit)
          Sets the limit in number of rows after which this object will use a long table (if the number of rows is greater than the provided limit) instead of a short one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LaTeXExport

public LaTeXExport()
Method Detail

getShortTableLimit

public Integer getShortTableLimit()
Returns:
null for no limit: always use a short table. If negative, will always use a long table.

setShortTableLimit

public void setShortTableLimit(Integer shortTableLimit)
Sets the limit in number of rows after which this object will use a long table (if the number of rows is greater than the provided limit) instead of a short one.

Parameters:
shortTableLimit - null for no limit: always use a short table. If negative, will always use a long table.

getNumberFormatter

public NumberFormat getNumberFormatter()

setNumberFormatter

public void setNumberFormatter(NumberFormat numberFormatter)

exportEvaluations

public void exportEvaluations(IRdEvaluations evaluations)
                       throws IOException
Throws:
IOException

exportAllThresholds

public void exportAllThresholds(Map<DecisionMaker,ICriteriaWithThresholds> allThresholds)
                         throws IOException
This method buffers the output writing. TODO all thresholds, not just vetoes.

Parameters:
allThresholds - the thresholds to export. Not null.
Throws:
IOException - if an I/O error occurs.

exportAllAssignments

public void exportAllAssignments(Map<DecisionMaker,? extends IOrderedAssignmentsRead> allAssignments,
                                 IRdEvaluations evaluations)
                          throws IOException
Throws:
IOException

exportCoalitions

public void exportCoalitions(ICoalitions coalitions)
                      throws IOException
Throws:
IOException

getAlternativesList

public List<Alternative> getAlternativesList()
Returns:
a read-only view of the alternatives list used for exporting by this object, or null.

setAlternativesList

public void setAlternativesList(List<Alternative> alternativesList)
Sets the alternatives list to use when exporting.

Parameters:
alternativesList - if null, no list is used.

getCriteriaList

public List<Criterion> getCriteriaList()

setCriteriaList

public void setCriteriaList(List<Criterion> criteriaList)

getDecisionMakersList

public List<DecisionMaker> getDecisionMakersList()

setDecisionMakersList

public void setDecisionMakersList(List<DecisionMaker> decisionMakersList)

exportAssignmentsSingle

public void exportAssignmentsSingle(IOrderedAssignmentsRead assignments,
                                    IRdEvaluations evaluations)
                             throws IOException
Throws:
IOException

setDestination

public void setDestination(OutputSupplier<? extends Writer> destination)

setOutput

public void setOutput(Writer writer)

exportAllAssignmentsOld

public void exportAllAssignmentsOld(Map<DecisionMaker,Assignments> allAssignments,
                                    IRdEvaluations evaluations)
                             throws IOException
Throws:
IOException

exportCoalitions

public void exportCoalitions(Map<DecisionMaker,ICoalitions> coalitions)
                      throws IOException
Throws:
IOException

exportAssignmentsMultiple

public void exportAssignmentsMultiple(IOrderedAssignmentsToMultipleRead assignments)
                               throws IOException
Throws:
IOException

addAttribute

public void addAttribute(Criterion attribute,
                         Map<Alternative,String> values)

setMaxRecords

public void setMaxRecords(int maxRecords)

getAlternatives

public Set<Alternative> getAlternatives()


Copyright © 2011. All Rights Reserved.