Class Figure

java.lang.Object
  extended byFigure

public class Figure
extends java.lang.Object

A Figure object contains rhetorical figures about a YaspPoem.


Constructor Summary
Figure()
          Create an instance of Figure.
Figure(YaspPoem yPoem)
          Create an instance of Figure.
 
Method Summary
 void addToAlliterationList(int[] item)
          Add an alliteration in the poem to the alliteration list.
 void addToAnaphorList(int[] item)
          Add an occurrence of an anaphor in the current poem to the anaphora list.
 void addToEpipherList(int[] item)
          Add an occurrence of an epipher in the current poem to the epipher list.
 void addToRepetitionList(int[] item)
          Add a repetition in the poem to the repetition list.
 void detectFigures(YaspPoem poem)
          Detect figures on the given instance of YaspPoem.
 int getAllitCode()
          Get the current alliteration code.
 java.util.ArrayList getAlliterationList()
          Return the list of alliterations in poem.
 int getAnaphCode()
          Get the current anaphora code.
 java.util.ArrayList getAnaphorList()
          Return the list of anaphora in the poem this instance processes.
 int getEpiphCode()
          Get the current epipher code.
 java.util.ArrayList getEpipherList()
          Return the list of epiphers in this poem.
 int getNewAllitCode()
          Get the current alliteration code increased by 1.
 int getNewAnaphCode()
           
 int getNewEpiphCode()
           
 int getNewRepCode()
           
 int getRepCode()
          Get the current repetition code.
 java.util.ArrayList getRepetitionList()
          Return the list of repetitions in poem.
 int getStanzaNumber()
          Return the number of stanzas in the poem this instance processes.
 YaspPoem getYaspPoem()
          Get the YaspPoem this Figure instance processes.
 void run()
          Process the current poem, finding all rhetorical figures contained in it.
 void setAlliterationList(java.util.ArrayList a)
           
 void setAnaphorList(java.util.ArrayList a)
           
 void setEpipherList(java.util.ArrayList a)
           
 void setRepetitionList(java.util.ArrayList a)
           
 void setStanzaNumber(int n)
           
 void setYaspPoem(YaspPoem yp)
          Set the YaspPoem this Figure instance is supposed to process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Figure

public Figure(YaspPoem yPoem)
Create an instance of Figure.

Parameters:
yPoem - the YaspPoem whose figures are to be determined.

Figure

public Figure()
Create an instance of Figure. Set the poem later on.

Method Detail

getYaspPoem

public YaspPoem getYaspPoem()
Get the YaspPoem this Figure instance processes.


setYaspPoem

public void setYaspPoem(YaspPoem yp)
Set the YaspPoem this Figure instance is supposed to process.


getStanzaNumber

public int getStanzaNumber()
Return the number of stanzas in the poem this instance processes.


setStanzaNumber

public void setStanzaNumber(int n)

getAnaphorList

public java.util.ArrayList getAnaphorList()
Return the list of anaphora in the poem this instance processes.


setAnaphorList

public void setAnaphorList(java.util.ArrayList a)

addToAnaphorList

public void addToAnaphorList(int[] item)
Add an occurrence of an anaphor in the current poem to the anaphora list.

Parameters:
item - the coordinates (4-dim vector) of the anaphor in the poem.

getEpipherList

public java.util.ArrayList getEpipherList()
Return the list of epiphers in this poem.


setEpipherList

public void setEpipherList(java.util.ArrayList a)

addToEpipherList

public void addToEpipherList(int[] item)
Add an occurrence of an epipher in the current poem to the epipher list.

Parameters:
item - the coordinates (4-dim vector) of the epipher in the poem.

getRepetitionList

public java.util.ArrayList getRepetitionList()
Return the list of repetitions in poem.


setRepetitionList

public void setRepetitionList(java.util.ArrayList a)

addToRepetitionList

public void addToRepetitionList(int[] item)
Add a repetition in the poem to the repetition list. The coordinates have to be given as 4-dim vector (int array).

Parameters:
item - The int array containing the 4-dim coordinates [#stanza,#verse,#word1,#word2].

getAlliterationList

public java.util.ArrayList getAlliterationList()
Return the list of alliterations in poem.


setAlliterationList

public void setAlliterationList(java.util.ArrayList a)

addToAlliterationList

public void addToAlliterationList(int[] item)
Add an alliteration in the poem to the alliteration list. The coordinates have to be given as 4-dim vector (int array).

Parameters:
item - The int array containing the 4-dim coordinates [#stanza,#verse,#word1,#word2].

getAllitCode

public int getAllitCode()
Get the current alliteration code.

Returns:
integer number representing the current alliteration code.

getRepCode

public int getRepCode()
Get the current repetition code.

Returns:
integer number representing the current repetition code.

getAnaphCode

public int getAnaphCode()
Get the current anaphora code.

Returns:
integer number representing the current anaphora code.

getEpiphCode

public int getEpiphCode()
Get the current epipher code.

Returns:
integer number representing the current epipher code.

getNewAllitCode

public int getNewAllitCode()
Get the current alliteration code increased by 1.

Returns:
integer number representing the increased alliteration code.

getNewRepCode

public int getNewRepCode()

getNewAnaphCode

public int getNewAnaphCode()

getNewEpiphCode

public int getNewEpiphCode()

run

public void run()
Process the current poem, finding all rhetorical figures contained in it.


detectFigures

public void detectFigures(YaspPoem poem)
Detect figures on the given instance of YaspPoem.

Parameters:
poem - the poem to find figures in.