|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.bham.gloss.Mode
public class Mode
A mode is the main building block for modular vocabularies and the glossing operation. This class stores various data concerning a mode, and is used to provide a convenient object for storage and transmission of data during a gloss Copyright Richard Kaye 2007-8 for GLOSS, http://gloss.bham.ac.uk Usage permitted according to the GPL. No waranty.
Field Summary | |
---|---|
protected java.lang.String |
accept
|
protected boolean |
acceptDef
|
protected java.util.TreeMap<java.lang.String,Mode> |
capturedModes
|
protected int |
children
|
protected boolean |
childrenDef
|
static int |
EXECUTE_TYPE
|
protected Mode |
executeMode
|
static int |
INCLUDE_TYPE
|
protected org.w3c.dom.Element |
modeElt
|
protected org.w3c.dom.NodeList |
modeElts
|
protected java.lang.String |
modeName
|
protected int |
modeType
|
protected Mode |
postProcessMode
|
protected ParameterContainer |
prefixes
|
protected Mode |
preProcessMode
|
static int |
PROCESS_TYPE
|
protected Mode |
processMode
|
protected java.lang.String |
template
|
protected boolean |
templateDef
|
static java.lang.String[] |
typeString
|
static int |
UNDEFINED_TYPE
|
protected boolean |
useIndentation
|
protected boolean |
useIndentationDef
|
Constructor Summary | |
---|---|
Mode()
Constructs a strange "init" node used as the root to get the gloss process going. |
|
Mode(org.w3c.dom.Element mode,
ParameterContainer p)
Main constructor: defines a mode from a given XML DOM element and a given list of valid prefixes. |
|
Mode(Mode mode)
shallow clone of an existing mode |
|
Mode(ParameterContainer p)
Constructs a strange "init" node used as the root to initialize variables. |
Method Summary | |
---|---|
java.lang.String |
accept()
returns the "accept" attribute |
Mode |
actionMode(java.lang.String action)
gets the action mode corresponding to preprocess, process, postprocess, execute. |
org.w3c.dom.NodeList |
children()
Returns the children nodes for this mode. |
int |
childrenToFind()
returns the number of children to find |
int |
depth()
Returns the depth of the current token, provided for compatibility with ModeExecution. |
Mode |
executeMode()
Accessor |
Mode |
getCapturedMode(java.lang.String name,
java.lang.String type)
Accessor |
boolean |
isExecuteType()
Returns true if it is a execute type mode. |
boolean |
isIncludeType()
Returns true if it is a include type mode. |
boolean |
isProcessType()
Returns true if it is a process type mode. |
boolean |
isUndefinedType()
Returns true if it is a process type mode. |
java.lang.String |
name()
Returns the mode name. |
org.w3c.dom.Element |
node()
Returns the node for this mode. |
Mode |
parent()
Returns the mode name. |
Mode |
postProcessMode()
Accessor |
ParameterContainer |
prefixes()
Returns the container of prefixes. |
Mode |
preProcessMode()
Accessor |
Mode |
processMode()
Accessor |
java.lang.String |
resolvePrefix(java.lang.String name)
uses this mode's set of prefixes to resolve the name |
void |
setAccept(java.lang.String val)
Resets the "accept" attribute |
void |
setActionMode(Mode m,
java.lang.String type)
gets the action mode corresponding to preprocess, process, postprocess, execute. |
void |
setCapturedMode(java.lang.String name,
java.lang.String type,
Mode mode)
Sets captured mode |
Token |
token()
Returns the current token, for compatibility with ModeExecution. |
java.lang.String |
toString()
Returns a string representation of this mode. |
int |
type()
Returns the mode type. |
boolean |
useIndentation()
returns the use-indentation status |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UNDEFINED_TYPE
public static final int EXECUTE_TYPE
public static final int PROCESS_TYPE
public static final int INCLUDE_TYPE
public static final java.lang.String[] typeString
protected java.lang.String modeName
protected int modeType
protected org.w3c.dom.Element modeElt
protected org.w3c.dom.NodeList modeElts
protected ParameterContainer prefixes
protected boolean useIndentation
protected java.lang.String accept
protected int children
protected java.lang.String template
protected boolean useIndentationDef
protected boolean acceptDef
protected boolean childrenDef
protected boolean templateDef
protected java.util.TreeMap<java.lang.String,Mode> capturedModes
protected Mode executeMode
protected Mode preProcessMode
protected Mode processMode
protected Mode postProcessMode
Constructor Detail |
---|
public Mode()
public Mode(ParameterContainer p)
public Mode(Mode mode)
public Mode(org.w3c.dom.Element mode, ParameterContainer p) throws GlossException
GlossException
Method Detail |
---|
public java.lang.String name()
public Mode parent()
public int type()
public boolean isUndefinedType()
public boolean isProcessType()
public boolean isExecuteType()
public boolean isIncludeType()
public ParameterContainer prefixes()
public org.w3c.dom.Element node()
public org.w3c.dom.NodeList children()
public java.lang.String accept()
public void setAccept(java.lang.String val)
public int childrenToFind()
public boolean useIndentation()
public Mode executeMode()
public Mode preProcessMode()
public Mode processMode()
public Mode postProcessMode()
public Mode actionMode(java.lang.String action)
public void setActionMode(Mode m, java.lang.String type)
public Mode getCapturedMode(java.lang.String name, java.lang.String type)
public void setCapturedMode(java.lang.String name, java.lang.String type, Mode mode)
public java.lang.String resolvePrefix(java.lang.String name)
public int depth()
public Token token()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |