public abstract class Transformation
extends java.lang.Object
History:
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NO_MUTATE_INFO
A global definition for no mutation information
|
static int |
UPDATE
a numberical flag used in UpdateLexItem( ) method to set the categories
or inflections to all bits or source bit if the source bit is or is not 0
|
| Constructor and Description |
|---|
Transformation() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
GetTestStr(java.lang.String[] args,
java.lang.String defaultStr)
Get the string to be tested (transformed).
|
protected static void |
PrintResult(LexItem out,
int flowNum,
boolean mutateFlag)
Print the string representation of the transformation results.
|
protected static void |
PrintResults(LexItem in,
java.util.Vector<LexItem> outs)
Print the input and outputs for the current flow component.
|
protected static LexItem |
UpdateLexItem(LexItem in,
int flowIndex,
long category,
long inflection,
java.lang.String details,
java.lang.String mutateInfo)
Update data for a LexItem.
|
protected static LexItem |
UpdateLexItem(LexItem in,
java.lang.String target,
int flowIndex,
long category,
long inflection,
java.lang.String details,
java.lang.String mutateInfo)
Update data for a LexItem.
|
protected static LexItem |
UpdateLexItem(LexItem in,
java.lang.String target,
java.lang.String flowName,
long category,
long inflection,
java.lang.String details,
java.lang.String mutateInfo,
boolean appendFlowFlag)
Update data for a LexItem.
|
public static final int UPDATE
public static final java.lang.String NO_MUTATE_INFO
public static java.lang.String GetTestStr(java.lang.String[] args,
java.lang.String defaultStr)
args - an input string from the command linedefaultStr - a program default stringprotected static void PrintResult(LexItem out, int flowNum, boolean mutateFlag)
out - an output LexItem of a transformationflowNum - flow number, a number indicates which flow produced
the outputmutateFlag - a boolean flag is used to append or not the mutate
information if the value is true or false.protected static LexItem UpdateLexItem(LexItem in, java.lang.String target, java.lang.String flowName, long category, long inflection, java.lang.String details, java.lang.String mutateInfo, boolean appendFlowFlag)
in - the LexItem to be updatedtarget - target term for updatingflowName - the abbreviation name of the flow component of the
tranformationcategory - category to be assigned. if the value is UPDATE, the
category will assigned to all bits or source if the source is or is not 0inflection - inflection to be assigned. if the value is UPDATE,
the category will assigned to all bits or source if the source is or is
not 0details - the detail transform information for all flow
components in a flowmutateInfo - the addition mutate information for a flow
component. The infomation on the last flow component will be used if
there are more than one flow component in the flow.appendFlowFlag - a flag for appending flow historyprotected static LexItem UpdateLexItem(LexItem in, java.lang.String target, int flowIndex, long category, long inflection, java.lang.String details, java.lang.String mutateInfo)
in - the LexItem to be updatedtarget - target term for updatingflowIndex - the index of the flow component of the
tranformationcategory - category to be assigned. if the value is UPDATE, the
category will assigned to all bits or source if the source is or is not 0inflection - inflection to be assigned. if the value is UPDATE,
the category will assigned to all bits or source if the source is or is
not 0details - the detail transform information for all flow
components in a flowmutateInfo - the addition mutate information for a flow
component. The infomation on the last flow component will be used if
there are more than one flow component in the flow.protected static LexItem UpdateLexItem(LexItem in, int flowIndex, long category, long inflection, java.lang.String details, java.lang.String mutateInfo)
in - the LexItem to be updatedflowIndex - the index of the flow componentcategory - category to be assignedinflection - inflection to be assigneddetails - the detail transform information for all flow
components in a flowmutateInfo - the addition mutate information for a flow
component. The infomation on the last flow component will be used if
there are more than one flow component in the flow.