at.tuwien.ifs.somtoolbox.summarisation.output
Class DocumentDisplayer

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.summarisation.output.DocumentDisplayer

public class DocumentDisplayer
extends Object

Version:
$Id: DocumentDisplayer.java 3590 2010-05-21 10:43:45Z mayer $
Author:
Julius Penaranda

Field Summary
private  StyledDocument doc
           
private  cern.colt.list.DoubleArrayList doubarray
           
private  SOMLibSparseInputData inputvectors
           
private  cern.colt.list.IntArrayList intarray
           
private  Object[] itemNames
           
(package private)  String newline
           
(package private)  ArrayList<String>[] parsedDocuments
           
private  CommonSOMViewerStateData state
           
private  SOMLibTemplateVector templatevectors
           
private  JTextPane textp
           
 
Constructor Summary
DocumentDisplayer(CommonSOMViewerStateData st, JScrollPane pane, ArrayList<String>[] parsedDoc, Object[] items)
           
 
Method Summary
protected  void addStylesToDocument(StyledDocument doc, Color[] col)
           
 void clearResults()
           
private  double getBorderSentence(cern.colt.list.DoubleArrayList doublearray)
           
private  double getBorderWord()
           
private  double getBorderWord(int ind)
           
private  void highlight_sent(double border, String sent, double score)
          highlights sentence with a colour according to its score
private  void highlight_word(double border, String sent)
           
private  void removehighlightStyles()
           
 void searchString(int docID, ArrayList<String> doku, String str)
           
 void setCaretPosition(int i)
           
 void setPalette(Color[] palet)
           
 void showAllResults(ArrayList<String> result, cern.colt.list.DoubleArrayList resultscores, ArrayList<String> resultItemnames, boolean scores, int highl, boolean filename)
           
 void showOriginal(ArrayList<String> result, cern.colt.list.DoubleArrayList[] allscores, boolean scores, int highl, boolean filename)
          shows full text and highlights selected sentences used for summarization
 void showOriginal(int docID, ArrayList<String> result, cern.colt.list.DoubleArrayList allscores, boolean scores, int highl, boolean filename)
          shows original text and highlights the sentences equal to the sentences in 'result'
 void showResult(int docID, ArrayList<String> resultdoc, cern.colt.list.DoubleArrayList resultscores, boolean scores, int highl, boolean filename)
          displays results
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doc

private StyledDocument doc

textp

private JTextPane textp

newline

String newline

parsedDocuments

ArrayList<String>[] parsedDocuments

itemNames

private Object[] itemNames

state

private CommonSOMViewerStateData state

inputvectors

private SOMLibSparseInputData inputvectors

templatevectors

private SOMLibTemplateVector templatevectors

intarray

private cern.colt.list.IntArrayList intarray

doubarray

private cern.colt.list.DoubleArrayList doubarray
Constructor Detail

DocumentDisplayer

public DocumentDisplayer(CommonSOMViewerStateData st,
                         JScrollPane pane,
                         ArrayList<String>[] parsedDoc,
                         Object[] items)
Method Detail

showResult

public void showResult(int docID,
                       ArrayList<String> resultdoc,
                       cern.colt.list.DoubleArrayList resultscores,
                       boolean scores,
                       int highl,
                       boolean filename)
displays results


showAllResults

public void showAllResults(ArrayList<String> result,
                           cern.colt.list.DoubleArrayList resultscores,
                           ArrayList<String> resultItemnames,
                           boolean scores,
                           int highl,
                           boolean filename)

showOriginal

public void showOriginal(ArrayList<String> result,
                         cern.colt.list.DoubleArrayList[] allscores,
                         boolean scores,
                         int highl,
                         boolean filename)
shows full text and highlights selected sentences used for summarization


showOriginal

public void showOriginal(int docID,
                         ArrayList<String> result,
                         cern.colt.list.DoubleArrayList allscores,
                         boolean scores,
                         int highl,
                         boolean filename)
shows original text and highlights the sentences equal to the sentences in 'result'


searchString

public void searchString(int docID,
                         ArrayList<String> doku,
                         String str)

getBorderSentence

private double getBorderSentence(cern.colt.list.DoubleArrayList doublearray)

getBorderWord

private double getBorderWord(int ind)

getBorderWord

private double getBorderWord()

highlight_word

private void highlight_word(double border,
                            String sent)

highlight_sent

private void highlight_sent(double border,
                            String sent,
                            double score)
highlights sentence with a colour according to its score


setCaretPosition

public void setCaretPosition(int i)

clearResults

public void clearResults()

setPalette

public void setPalette(Color[] palet)

removehighlightStyles

private void removehighlightStyles()

addStylesToDocument

protected void addStylesToDocument(StyledDocument doc,
                                   Color[] col)