|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.gui.util.AbstractCallableToolConfig
net.sourceforge.nite.gui.util.AmigramConfig
public class AmigramConfig
This class contains settings for the AMIGram tool. See also superclass and NXTConfig class. The root name of the AMIGram configuration element is "AMIGramConfig".
Field Summary | |
---|---|
static int |
ATTRIBUTE
|
static int |
DELEGATE
|
static int |
TEXT
|
Method Summary | |
---|---|
java.lang.String |
applyFilter(NOMElement nel)
Return the String to be displayed for the NOM element |
java.lang.String |
defaultDelegateName()
Return a String representing th ename of a delegate class: the value of the defaultfilterdelegateclass attribute of the corpussettings element. |
java.lang.String |
defaultFilterAttributeName()
Return the name of the attribute AMIGram should use as the default presentation attribute. |
java.lang.String |
defaultFilterDelegateClass()
Return the name of the attribute AMIGram should use as the default presentation attribute. |
int |
defaultFilterType()
Return the constant TEXT if all elements should default to presenting their text content; ATTRIBUTE if an attribute should be used; or DELEGATE if a delegate class is teh default behaviour. |
boolean |
defaultToText()
Return "true" if all elements should default to presenting their text content in AMIGram and "false" otherwise. |
java.lang.String |
getAttributeValue(org.w3c.dom.Node node,
java.lang.String attrName)
Returns the value of an attribute of the specified node. |
org.w3c.dom.Node |
getFilter(java.lang.String elementname)
Returns the filter element for the specified element name. |
java.lang.String |
getFilterAttributeName(org.w3c.dom.Node filter)
Returns the filter attribute name of the filter element. |
java.lang.String |
getFilterAttributeName(java.lang.String elementname)
Returns the filter attribute name for the given element name. |
TranscriptionToTextDelegate |
getFilterDelegate()
Default: new instance of class defined in transcriptiondelegateclassname attribute in corpussettings |
java.lang.String |
getFilterElementName(org.w3c.dom.Node filter)
Returns the element name of the specified filter element. |
java.util.List |
getFilterList()
Returns a list with all filter elements (Node objects) for the current corpus. |
int |
getFilterType(org.w3c.dom.Node filter)
Return the constant TEXT if the given element name should present their text content in AMIGram, or ATTRIBUTE if an attribute should be used. |
int |
getFilterType(java.lang.String elementname)
Return the constant TEXT if the given element name should present their text content in AMIGram; ATTRIBUTE if an attribute should be used, and DELEGATE if we should pass the node to a delegate class. |
static AmigramConfig |
getInstance()
Returns the singleton AMIGram configuration object. |
java.lang.String |
getNXTConfigRootName()
Returns the root name of the Amigram configuration element. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TEXT
public static final int ATTRIBUTE
public static final int DELEGATE
Method Detail |
---|
public static AmigramConfig getInstance()
Returns the singleton AMIGram configuration object. Don't forget to set the metadata file.
public java.lang.String getNXTConfigRootName()
Returns the root name of the Amigram configuration element.
getNXTConfigRootName
in class AbstractCallableToolConfig
public java.util.List getFilterList()
Returns a list with all filter elements (Node objects) for the current corpus.
public java.lang.String getAttributeValue(org.w3c.dom.Node node, java.lang.String attrName)
Returns the value of an attribute of the specified node. If the node does not have the specified attribute, this method returns null.
node
- the node that contains the attributeattrName
- the name of the attribute
public org.w3c.dom.Node getFilter(java.lang.String elementname)
Returns the filter element for the specified element name. The element name should be specified in the "elementname" attribute. If there is no such filter element, this method returns null.
elementname
- the element name
public java.lang.String getFilterElementName(org.w3c.dom.Node filter)
Returns the element name of the specified filter element. The elementname is specified in the "elementname" attribute.
filter
- a filter element
public int getFilterType(java.lang.String elementname)
elementname
- the element name
public int getFilterType(org.w3c.dom.Node filter)
filter
- a filter element
public java.lang.String getFilterAttributeName(java.lang.String elementname)
Returns the filter attribute name for the given element name. If the element has its own filter node, we use that value, and otherwise the default. This method returns null if neither is present or if it's a TEXT or DELEGATE filter.
elementname
- an element name
public java.lang.String getFilterAttributeName(org.w3c.dom.Node filter)
Returns the filter attribute name of the filter element. The name should be specified in the "attname" attribute, but will only be present if the filter type is ATTRIBUTE rather than TEXT.
filter
- a filter element
public boolean defaultToText()
public TranscriptionToTextDelegate getFilterDelegate()
public java.lang.String defaultDelegateName()
public int defaultFilterType()
public java.lang.String defaultFilterAttributeName()
public java.lang.String defaultFilterDelegateClass()
public java.lang.String applyFilter(NOMElement nel)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |