protected static class AutoItRs.DefaultRecognizableAutoIt extends AutoItRs.DefaultRecognizable
AutoItRs.Recognizable
for AUTOIT engine.engineRS, fieldNameToRsKeyMap, rawRS
enabled, FAILED_RETRIEVE_VALUE, fieldNameToPersistKeyMap, parent, persistKeyToFieldValueMap, tabulation, threshold, thresholdEnabled, UNKNOWN_VALUE
CONTAINER_ELEMENT
DATA_BIGGER_THAN_THRESHOLD
Constructor and Description |
---|
DefaultRecognizableAutoIt(java.lang.String originalRS) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendEngineRS(java.lang.StringBuilder rs,
java.lang.String rsKey,
java.lang.Object value)
Append "rsKey:value;" to rs.
|
protected void |
beforeParse()
This implementation will:
remove
AutoItRs.AUTOIT_PREFIX from field AutoItRs.DefaultRecognizable.rawRS
|
java.lang.String |
getEngineRS()
This Recognition String is engine specific.
|
protected java.util.Set<java.lang.String> |
getNonRecognizableFields()
This implementation will consider all fields (of its own and super-class) not prefixing by
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS as non-recognizable fields. |
protected java.util.Map<java.lang.String,java.lang.String> |
getRecognizableFieldToRsKeyMap()
Only those fields starting with
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS are considered as
recognizable fields, so those fields not starting with that prefix will be removed from the map. |
java.lang.String |
getText() |
protected void |
parsing()
This implementation will get pairs of (rsKey, value) from original RS,
and set the value to the property of this class.
|
protected java.lang.String |
rsKeyToProperty(java.lang.String rsKey)
Convert the rsKey to the class real property name.
|
boolean |
setField(java.lang.String rsKey,
java.lang.Object value)
Set the field's value of this Persistable object to the persist-key.
The field name can be got from Persistable.getPersitableFields() according to the persist-key, then the value will be set to that field. |
java.lang.String |
setText(java.lang.String rs_gen_text) |
java.lang.String |
toString() |
afterParse, getPersitableFields, getRawRS, getTopMostClassname, parseRawRS, setEngineRS, setRawRS
equals, getContents, getContents, getField, getFlatKey, getParent, getTabulation, getTagName, getThreshold, ignoreFieldForPersist, isEnabled, isIgnoredContentCache, isThresholdEnabled, setEnabled, setIgnoredContentCache, setParent, setTabulation, setThreshold, setThresholdEnabled
protected java.lang.String rs_gen_title
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
and Constants.AutoItConstants.RS_KEY_TITLE
,
the mapping rsKey is Constants.AutoItConstants.RS_KEY_TITLE
protected java.lang.String rs_gen_class
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
and Constants.AutoItConstants.RS_KEY_CLASS
,
the mapping rsKey is Constants.AutoItConstants.RS_KEY_CLASS
protected java.lang.String rs_gen_text
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
and Constants.AutoItConstants.RS_KEY_TEXT
,
the mapping rsKey is Constants.AutoItConstants.RS_KEY_TEXT
protected java.lang.String rs_gen_x
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
and Constants.AutoItConstants.RS_KEY_X
,
the mapping rsKey is Constants.AutoItConstants.RS_KEY_X
protected java.lang.String rs_gen_y
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
and Constants.AutoItConstants.RS_KEY_Y
,
the mapping rsKey is Constants.AutoItConstants.RS_KEY_Y
protected java.lang.String rs_gen_w
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
and Constants.AutoItConstants.RS_KEY_W
,
the mapping rsKey is Constants.AutoItConstants.RS_KEY_W
protected java.lang.String rs_gen_h
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
and Constants.AutoItConstants.RS_KEY_H
,
the mapping rsKey is Constants.AutoItConstants.RS_KEY_H
protected java.lang.String rs_gen_instance
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
and Constants.AutoItConstants.RS_KEY_INSTANCE
,
the mapping rsKey is Constants.AutoItConstants.RS_KEY_INSTANCE
public DefaultRecognizableAutoIt(java.lang.String originalRS)
protected void beforeParse()
AutoItRs.AUTOIT_PREFIX
from field AutoItRs.DefaultRecognizable.rawRS
beforeParse
in class AutoItRs.DefaultRecognizable
protected void parsing()
parsing
in class AutoItRs.DefaultRecognizable
public boolean setField(java.lang.String rsKey, java.lang.Object value)
Persistable
Persistable.getPersitableFields()
according to the persist-key, then the value will be set to that field.setField
in interface Persistable
setField
in class PersistableDefault
rsKey
- String, the persist-key (it can be tag-name in XML, key-string in JSON etc.). refer to Persistable.getPersitableFields()
.value
- Object, the value to setprotected java.util.Set<java.lang.String> getNonRecognizableFields()
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
as non-recognizable fields.getNonRecognizableFields
in class AutoItRs.DefaultRecognizable
protected java.util.Map<java.lang.String,java.lang.String> getRecognizableFieldToRsKeyMap()
Constants.AutoItConstants.PREFIX_PROPERTY_FOR_RS
are considered as
recognizable fields, so those fields not starting with that prefix will be removed from the map.getRecognizableFieldToRsKeyMap
in class AutoItRs.DefaultRecognizable
protected java.lang.String rsKeyToProperty(java.lang.String rsKey)
rsKey
- String, the key name in original RS, such as 'title', 'Title', 'TITLE'.protected void appendEngineRS(java.lang.StringBuilder rs, java.lang.String rsKey, java.lang.Object value)
rs
- StringBuilderrsKey
- Stringvalue
- Objectpublic java.lang.String getEngineRS()
AutoItRs.Recognizable
getEngineRS
in interface AutoItRs.Recognizable
getEngineRS
in class AutoItRs.DefaultRecognizable
public java.lang.String getText()
public java.lang.String setText(java.lang.String rs_gen_text)
public java.lang.String toString()
toString
in class PersistableDefault
Copyright © SAS Institute. All Rights Reserved.