cz.cuni.mff.mirovsky.trees
Class CoreferencePattern

java.lang.Object
  extended by cz.cuni.mff.mirovsky.trees.CoreferencePattern

public class CoreferencePattern
extends java.lang.Object

Title: CoreferencePattern

Description: Class for keeping one pattern of coreferences in trees

Copyright: Copyright (c) 2004

Company: Charles University in Prague, Institute of Formal and Applied Linguistics


Field Summary
static int SHAPE_DASHES_DARC
           
 
Constructor Summary
CoreferencePattern()
           
CoreferencePattern(ShowMessagesAble p_mess)
          Creates an empty pattern
 
Method Summary
 void addEndNodeIgnoreValue(java.lang.String value)
           
 void addStartNodeIgnoreValue(java.lang.String value)
           
 void addValueDependentRule(java.lang.String value, java.awt.Color color, int shape)
           
 void clearEndNodeIgnoreValues()
           
 void clearStartNodeIgnoreValues()
           
 void clearValueDependentValues()
           
 CoreferencePattern getClone()
          Returns a deep copy of the coreference pattern
 boolean getDisplay()
           
 java.lang.String getDisplayMode()
           
 java.lang.String getEndAttrNodeName()
           
 javax.swing.DefaultListModel getEndNodeIgnoreValues()
           
 boolean getEndNodeNilArrow()
           
 java.awt.Color getGeneralColor()
           
 int getGeneralShape()
           
 java.lang.String getName()
           
 java.lang.String getStartAttrNodeName()
           
 javax.swing.DefaultListModel getStartNodeIgnoreValues()
           
 boolean getStartNodeNilArrow()
           
 java.lang.String getValueDependentAttrName()
           
 java.awt.Color getValueDependentColor(java.lang.String value)
          Gives a color to be used with a value of the value dependent attribute.
 int getValueDependentShape(java.lang.String value)
          Gives a shape to be used with a value of the value dependent attribute.
 javax.swing.DefaultListModel getValueDependentValues()
           
 boolean changeDisplay()
          Changes the state of displaying the pattern if editable
 boolean isEditable()
          Informs whether the coreference pattern allows changing its state
 void readPatternFromString(java.lang.String line)
          Reads the pattern from String.
 boolean setDisplay(boolean display)
           
 void setDisplayMode(java.lang.String display)
           
 void setEndAttrNodeName(java.lang.String name)
           
 void setEndNodeNilArrow(boolean display)
           
 void setGeneralColor(java.awt.Color color)
           
 void setGeneralShape(int shape)
           
 void setName(java.lang.String name)
           
 void setStartAttrNodeName(java.lang.String name)
           
 void setStartNodeNilArrow(boolean display)
           
 void setValueDependentAttrName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SHAPE_DASHES_DARC

public static final int SHAPE_DASHES_DARC
See Also:
Constant Field Values
Constructor Detail

CoreferencePattern

public CoreferencePattern()

CoreferencePattern

public CoreferencePattern(ShowMessagesAble p_mess)
Creates an empty pattern

Method Detail

getClone

public CoreferencePattern getClone()
Returns a deep copy of the coreference pattern


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setName

public void setName(java.lang.String name)

getName

public java.lang.String getName()

setDisplayMode

public void setDisplayMode(java.lang.String display)

getDisplayMode

public java.lang.String getDisplayMode()

setDisplay

public boolean setDisplay(boolean display)

getDisplay

public boolean getDisplay()

changeDisplay

public boolean changeDisplay()
Changes the state of displaying the pattern if editable

Returns:
the resulting state

isEditable

public boolean isEditable()
Informs whether the coreference pattern allows changing its state

Returns:
true if change is allowed; false otherwise

setStartNodeNilArrow

public void setStartNodeNilArrow(boolean display)

getStartNodeNilArrow

public boolean getStartNodeNilArrow()

setEndNodeNilArrow

public void setEndNodeNilArrow(boolean display)

getEndNodeNilArrow

public boolean getEndNodeNilArrow()

setStartAttrNodeName

public void setStartAttrNodeName(java.lang.String name)

getStartAttrNodeName

public java.lang.String getStartAttrNodeName()

setEndAttrNodeName

public void setEndAttrNodeName(java.lang.String name)

getEndAttrNodeName

public java.lang.String getEndAttrNodeName()

addStartNodeIgnoreValue

public void addStartNodeIgnoreValue(java.lang.String value)

clearStartNodeIgnoreValues

public void clearStartNodeIgnoreValues()

getStartNodeIgnoreValues

public javax.swing.DefaultListModel getStartNodeIgnoreValues()

addEndNodeIgnoreValue

public void addEndNodeIgnoreValue(java.lang.String value)

clearEndNodeIgnoreValues

public void clearEndNodeIgnoreValues()

getEndNodeIgnoreValues

public javax.swing.DefaultListModel getEndNodeIgnoreValues()

setGeneralColor

public void setGeneralColor(java.awt.Color color)

getGeneralColor

public java.awt.Color getGeneralColor()

setGeneralShape

public void setGeneralShape(int shape)

getGeneralShape

public int getGeneralShape()

setValueDependentAttrName

public void setValueDependentAttrName(java.lang.String name)

getValueDependentAttrName

public java.lang.String getValueDependentAttrName()

addValueDependentRule

public void addValueDependentRule(java.lang.String value,
                                  java.awt.Color color,
                                  int shape)

getValueDependentValues

public javax.swing.DefaultListModel getValueDependentValues()

getValueDependentColor

public java.awt.Color getValueDependentColor(java.lang.String value)
Gives a color to be used with a value of the value dependent attribute. If no such rule exists, the general color is given.

Parameters:
value - String
Returns:
Color

getValueDependentShape

public int getValueDependentShape(java.lang.String value)
Gives a shape to be used with a value of the value dependent attribute. If no such rule exists, the general shape is given.

Parameters:
value - String
Returns:
int

clearValueDependentValues

public void clearValueDependentValues()

readPatternFromString

public void readPatternFromString(java.lang.String line)
Reads the pattern from String.

Parameters:
line - String Example of the String: "start_attr=coref, end_attr=AID, start_ignore= , start_ignore=null, end_ignore= , end_ignore=null, start_nill_arrow=true, end_nill_arrow=true, general_color=#231812, general_shape=1, value_depend_attr=cortype, value_depend=grammatical;#202020;0, value_depend=textual;#402010;0"