org.safs
Class GuiObjectRecognition

java.lang.Object
  extended by org.safs.GuiObjectRecognition
Direct Known Subclasses:
AGuiObjectRecognition, RGuiObjectRecognition

public abstract class GuiObjectRecognition
extends java.lang.Object

Used internally.
Manages and manipulates object recognition string information. Provides utility functions for parsing and identifying components of our recognition strings. Example recognition strings:

 Type=Window;Caption=Notepad                     :Window with specified Caption
 Type=EditBox;Index=2                                    :2nd EditBox
 Type=CheckBox;Name=check1                       :A Named CheckBox              
 Class=java.awt.Button;ClassIndex=1    :The first java.awt.Button
 Type=JavaMenu;Index=1;Path=File->Exit :A File Exit menuitem.
 

Recognition strings are made of of different named "pieces" or components.

  1. Recognition "Category"

  2. Recognition "Qualifier" (some not yet implemented)

In general, a single object's recognition string is comprised of a Category and one or more Qualifiers.

Domain can specify a specific domain (like Domain=Html;) to search and would precede other Category info like Type or Class. Domain would not normally be used with the Process Category as mentioned below.

Process can specify a specific Process (like Process=EXCEL.EXE;) to search and would precede other Category info like Type or Class. This would normally only be used when dealing with native objects in the Win or Net Domains and would not normally be used with the Domain Category mentioned above. The process name specified is currently case-sensitive, so an exact match is attempted when compared.

CurrentWindow is Process, Domain, and Category independent and means "the topmost window"--regardless of what Type or Domain it is.

To identify a particular child object in a hierarchy of objects we provide a recognition string that provides some or all of the object hierarchy information. Each child recognition string is separated from it's parent recognition string with an object separator substring: ";\;"

Example: Type=Window;Caption=MyApp;\;Type=EditBox;Index=1

This matches the first child EditBox (Index=1) in a Window with Caption "MyApp".

Note, however, that an instance of this class only handles the recognition string for a single object in the hierarchy. There will be a separate instance handling each parent and each child of the full path recognition string.

Since:
JUL 03, 2003

Nested Class Summary
protected  class GuiObjectRecognition.GORInfo
          Used internally, or by direct subclasses only.
 
Field Summary
static boolean _convert_NBSP_Strings
          Default true means always convert NBSP characters to normal SPACE characters during comparisons.
protected  java.lang.String assignSeparator
           
static java.lang.String CATEGORY_CLASS
          "Class"
static int CATEGORY_CLASS_ID
           
static java.lang.String CATEGORY_CURRENTWINDOW
          "CurrentWindow"
static int CATEGORY_CURRENTWINDOW_ID
           
static java.lang.String CATEGORY_DOMAIN
          "Domain"
static int CATEGORY_DOMAIN_ID
           
static java.lang.String CATEGORY_JAVA_CLASS
          "JavaClass"
static java.lang.String CATEGORY_PROCESS
          "Process"
static int CATEGORY_PROCESS_ID
           
static java.lang.String CATEGORY_TYPE
          "Type"
static int CATEGORY_TYPE_ID
           
static int CATEGORY_UNKNOWN_ID
           
protected  int categoryIndex
          index to the Category value portion of the recognition string.
protected  java.lang.String classCategory
          only the Category class/type portion of the recognition string.
protected  int classCategoryID
          The Category ID of the recognition string.
protected  java.lang.String classInfo
          only the Category portion of the recognition string.
protected  java.lang.String classValue
          only the Category value portion of the recognition string.
protected static java.lang.String[] containerClassesIgnoredForRecognition
          List of container classes we may wish to not only exclude from longer recognition strings but also exclude from whole component hierarchy.
protected static java.lang.String[] containerNamesIgnoredForRecognition
          List of container names we may wish to exclude from longer recognition strings.
protected static java.lang.String[] containerTypes
          List of items considered to be component containers:
TabControl, JavaPanel, JavaWindow, Window, JavaSplitPane
protected static java.lang.String[] containerTypesIgnoredForRecognition
          List of container types we may wish to exclude from longer recognition strings.
protected static java.lang.String[] containerTypesWithOnlyOneChildVisible
          List of containers whose non-visible children we may sometimes wish to process.
static java.lang.String DEFAULT_ASSIGN_SEPARATOR
          "="
static java.lang.String DEFAULT_CLOSE_CAPTION_EXPRESSION
          "}" End wildcard definition
static java.lang.String DEFAULT_MATCH_ANY
           
static java.lang.String DEFAULT_OPEN_CAPTION_EXPRESSION
          "{" Begin wildcard definition
static java.lang.String DEFAULT_QUALIFIER_SEPARATOR
          ";"
static java.lang.String DEFUALT_PATH_SEPARATOR
          "->"
static java.lang.String DEFUALT_PROPERTY_QUALIFIER_SEPARATOR
          ":"
static java.lang.String[] DhtmlElements
           
protected  java.lang.String domainInfo
          only the Domain portion of the recognition string, if present.
protected  java.lang.String domainValue
          only the Domain value portion of the recognition string, if present.
protected  GuiObjectRecognition.GORInfo[] gorInfos
          There can be multiple qualifiers.
protected  int govLevel
          the hierarchy level within the GuiObjectVector path represented by this recognition substring.
static java.lang.String[] htmlElements
           
protected static java.lang.String[] ignoreTypeChildren
          List of components from which we should not getChildren() as we go through the hierarchy.
static java.lang.String[] linkHtmlElements
           
static java.lang.String NBSP_STRING
          "xA0" or #160 -- non-breaking space in Html
protected  java.lang.String pathInfo
          the full recognition string provided to constructor Ex: "Type=Window;Caption=MyApp"
protected  java.lang.String processInfo
          only the Process portion of the recognition string, if present.
protected  java.lang.String processValue
          only the Process value portion of the recognition string, if present.
static java.lang.String QUALIFIER_ABS_INDEX
          "AbsIndex"
static int QUALIFIER_ABS_INDEX_ID
           
static java.lang.String QUALIFIER_CAPTION
          "Caption"
static int QUALIFIER_CAPTION_ID
           
static java.lang.String QUALIFIER_CLASS
          "Class"
static int QUALIFIER_CLASS_ID
           
static java.lang.String QUALIFIER_CLASS_INDEX
          "ClassIndex"
static int QUALIFIER_CLASS_INDEX_ID
           
static java.lang.String QUALIFIER_HTMLID
          "HTMLID"
static int QUALIFIER_HTMLID_ID
           
static java.lang.String QUALIFIER_HTMLTEXT
          "HTMLText"
static int QUALIFIER_HTMLTEXT_ID
           
static java.lang.String QUALIFIER_HTMLTITLE
          "HTMLTitle"
static int QUALIFIER_HTMLTITLE_ID
           
static java.lang.String QUALIFIER_ID
          "ID"
static int QUALIFIER_ID_ID
           
static java.lang.String QUALIFIER_INDEX
          "Index"
static int QUALIFIER_INDEX_ID
           
static java.lang.String QUALIFIER_JAVA_CLASS
          "JavaClass"
static java.lang.String QUALIFIER_JAVACAPTION
          "JavaCaption"
static int QUALIFIER_JAVACAPTION_ID
           
static java.lang.String QUALIFIER_LEVEL
          "Level"
static int QUALIFIER_LEVEL_ID
           
static java.lang.String QUALIFIER_NAME
          "Name"
static java.lang.String QUALIFIER_NAME_CONTAINS
          "NameContains"
static int QUALIFIER_NAME_CONTAINS_ID
           
static int QUALIFIER_NAME_ID
           
static java.lang.String QUALIFIER_OBJECT_INDEX
          "ObjectIndex"
static int QUALIFIER_OBJECT_INDEX_ID
           
static java.lang.String QUALIFIER_PATH
          "Path"
static int QUALIFIER_PATH_ID
           
static java.lang.String QUALIFIER_PROPERTY
          "Property"
static java.lang.String QUALIFIER_PROPERTY_CONTAINS
          "PropertyContains"
static int QUALIFIER_PROPERTY_CONTAINS_ID
           
static int QUALIFIER_PROPERTY_ID
           
static java.lang.String QUALIFIER_TEXT
          "Text"
static int QUALIFIER_TEXT_ID
           
static int QUALIFIER_UNKNOWN_ID
           
protected  java.lang.String qualifierInfo
          only the Qualifier portion of the recognition string.
protected  int qualifierMatches
          Tracks multiple qualifier matches.
protected  java.lang.String qualifierSeparator
           
protected static java.lang.String[] textOKForRecognition
          List of component types we may wish to getText on for recognition purposes.
protected static java.lang.String[] topLevelContainers
          List of known container types that should have IndexMaps prepared for their children.
 
Constructor Summary
GuiObjectRecognition(java.lang.String objectInfo, int govLevel)
          Used internally, or by direct subclasses only.
Standard Constructor using default qualifier separator.
GuiObjectRecognition(java.lang.String objectInfo, java.lang.String aQualifierSeparator, int govLevel)
          Used internally, or by direct subclasses only.
Constructor using a different qualifier separator from our standard.
 
Method Summary
protected  boolean compareText(java.lang.String theText, java.lang.String objText)
          Used to compare 2 text values.
protected  void extractClassInfo()
          Used internally, or by direct subclasses only.
Internal helper routine to fill internal fields.
Separates the Category into classCategory and classValue fields.
Ex: "Type=Window" gets separated into:
 java.lang.String getClassCategory()
          Used internally, or by direct subclasses only.
 int getClassCategoryID()
          Used internally, or by direct subclasses only.
 java.lang.String getClassRecognition()
          Used internally, or by direct subclasses only.
 java.lang.String getClassValue()
          Used internally, or by direct subclasses only.
 java.lang.String getDomainValue()
          Normally only valid for the topmost Parent GOR object.
 int getGovLevel()
          Returns the govLevel assigned in the constructor.
 java.lang.Object getMatchingObject(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Called from ChildIterator.
abstract  java.lang.Object getMatchingPathObject(java.lang.Object theObject, java.lang.String thePath)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
 java.lang.String getObjectAccessibleName(java.lang.Object theObject)
          Allow individual engines (ie.
abstract  java.lang.String getObjectCaption(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
 java.lang.String getObjectClassIndex(java.lang.Object item)
          Used internally, or by direct subclasses only.
Subclasses are generally expected to implement a means to determine the Nth occurrence of the specific object class in the application's child object hierarchy.
abstract  java.lang.String getObjectClassName(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
abstract  java.lang.String getObjectDomain(java.lang.Object theObject)
          Used internally or by subclasses only.
abstract  java.lang.String getObjectID(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
abstract  int getObjectLevel(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Level is generally considered to be the Z-Order information of the object--where in the Z-Order the object (usually a window) resides.
abstract  java.lang.String getObjectName(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
abstract  java.lang.String getObjectProperty(java.lang.Object theObject, java.lang.String theProperty)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
abstract  java.lang.String[] getObjectPropertyNames(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
 java.lang.String getObjectRecognition()
          Used internally, or by direct subclasses only.
 java.lang.String[] getObjectSuperClassNames(java.lang.Object theObject)
          Used internally, or by direct subclasses.
Subclasses using proxies must override with a tool-dependent mechanism to provide the requested information.
abstract  java.lang.String getObjectText(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
 java.lang.String getProcessValue()
          Normally only valid for the topmost Parent GOR object.
 java.lang.String getQualifierCategory(int index)
          Used internally, or by direct subclasses only.
 int getQualifierCategoryID(int index)
          Used internally, or by direct subclasses only.
 int getQualifierCount()
          Used internally, or by direct subclasses only.
 java.lang.String getQualifierIDValue(int qualifierID)
          Used internally, or by direct subclasses only.
Extracts the Value of the qualifier with the matching qualifier type ID.
 java.lang.String getQualifierRecognition()
          Used internally, or by direct subclasses only.
 java.lang.String getQualifierSeparator()
          Used internally, or by direct subclasses only.
 java.lang.String getQualifierValue(int index)
          Used internally, or by direct subclasses only.
protected  boolean hasCategoryInfo()
          Used internally, or by direct subclasses only.
protected  boolean hasDomainInfo()
          Used internally, or by direct subclasses only.
Sets the domainInfo, domainValue if Domain is present.
protected  boolean hasProcessInfo()
          Used internally, or by direct subclasses only.
Sets the processInfo, processValue if Process is present.
 void initDomainInfo()
          Initialize to isolate any Domain= or Process= information in the recognition string.
static boolean isContainerClassIgnoredForRecognition(java.lang.String compClass)
          Called by PCTree#ignoreParentRecognitionString(PCTree)
static boolean isContainerNameIgnoredForRecognition(java.lang.String compName)
           
static boolean isContainerType(java.lang.String compType)
           
static boolean isContainerTypeIgnoredForRecognition(java.lang.String compType)
           
static boolean isContainerTypeWithOnlyOneChildVisible(java.lang.String compType)
           
static boolean isDHtmlElement(java.lang.String element)
           
 boolean isFinalMatch(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Perform whatever tests we want on the found Object to decide if this is our desired final match.
static boolean isHtmlElement(java.lang.String element)
           
static boolean isIgnoredTypeChild(java.lang.String compType)
           
static boolean isLinkHtmlElement(java.lang.String element)
           
 boolean isMatchingCaption(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Convenience routine to check if the object matches the Caption information stored in this GuiObjectRecognition instance *without* specifying what the is as required by the primary, tool-dependent isMatchingCaption routine.
Simply calls the subclass isMatchingCaption routine with null as the caption parameter.
 boolean isMatchingCaption(java.lang.Object theObject, java.lang.String theCaption)
          Used internally, or by direct subclasses only.
Calls the subclass's getObjectCaption function.
 boolean isMatchingClass(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Convenience routine to check if the object matches the Class or Type information stored in this GuiObjectRecognition instance *without* specifying what the classname or type is as required by the primary, tool-dependent isMatchingClass routine.
Simply calls the subclass isMatchingClass routine with null as the classname parameter.
 boolean isMatchingClass(java.lang.Object theObject, java.lang.String theClass)
          Used internally, or by direct subclasses only.
Determine if the provided Object matches our segment of the recognition string.
 boolean isMatchingID(java.lang.Object theObject, java.lang.String theID)
          Used internally, or by direct subclasses only.
Calls the subclass's getObjectID function.
 boolean isMatchingLevel(java.lang.Object theObject, int theLevel)
          Used internally, or by direct subclasses only.
Calls the subclass's getObjectLevel function.
 boolean isMatchingName(java.lang.Object theObject, java.lang.String theName, boolean blnExact)
          Used internally, or by direct subclasses only.
Calls the subclass's getObjectName function.
 boolean isMatchingObject(java.lang.Object theObject, int classindex, int absindex, java.lang.String[] matchName)
          Used internally, or by direct subclasses only.
First checks to see if the provided object matches class information for our stored recognition method.
abstract  boolean isMatchingPath(java.lang.Object theObject, java.lang.String thePath)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
 boolean isMatchingProperty(java.lang.Object theObject, java.lang.String qualifierValue, boolean blnExact)
          Used internally, or by direct subclasses only.
calls the subclass's getObjectProperty function with correct information (string parse occurs before call)
protected  boolean isMatchingQualifiers(java.lang.Object theObject, int classindex, int absindex)
          Used internally, called by isMatchingObject.
Attempts to verify that every gorInfo qualifier from the recogntion string stored herein is satisfied by theObject.
abstract  boolean isMatchingSubClass(java.lang.Object theObject, java.lang.String theClass, java.lang.String parentClass)
          Used internally, or by direct subclasses only.
Subclasses are generally expected to simply forward this request on to the tool-dependent GuiClassData.isMatched (like RGuiClassData) function after casting the object to the appropriate class for the tool implementation.
 boolean isMatchingText(java.lang.Object theObject, java.lang.String theText)
          Used internally, or by direct subclasses only.
Calls the subclass's getObjectText function.
abstract  boolean isMatchingType(java.lang.Object theObject, java.lang.String theClass)
          Used internally, or by direct subclasses only.
Subclasses are generally expected to simply forward this request on to the tool-dependent GuiClassData.getMappedClassType (like RGuiClassData) function after casting the object to the appropriate class for the tool implementation.
abstract  boolean isObjectShowing(java.lang.Object theObject)
          Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.
static boolean isTextOKForRecognition(java.lang.String compType)
           
static boolean isTopLevelContainer(java.lang.String compType)
           
 java.lang.String makeRegexReadyWildcards(java.lang.String expression)
          Convenience routine to convert our single Caption char ? and * wildcard characters to regex equivalent wildcards.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_QUALIFIER_SEPARATOR

public static final java.lang.String DEFAULT_QUALIFIER_SEPARATOR
";"

See Also:
Constant Field Values

DEFAULT_ASSIGN_SEPARATOR

public static final java.lang.String DEFAULT_ASSIGN_SEPARATOR
"="

See Also:
Constant Field Values

DEFUALT_PROPERTY_QUALIFIER_SEPARATOR

public static final java.lang.String DEFUALT_PROPERTY_QUALIFIER_SEPARATOR
":"

See Also:
Constant Field Values

DEFUALT_PATH_SEPARATOR

public static final java.lang.String DEFUALT_PATH_SEPARATOR
"->"

See Also:
Constant Field Values

CATEGORY_PROCESS

public static final java.lang.String CATEGORY_PROCESS
"Process"

See Also:
Constant Field Values

CATEGORY_DOMAIN

public static final java.lang.String CATEGORY_DOMAIN
"Domain"

See Also:
Constant Field Values

CATEGORY_CLASS

public static final java.lang.String CATEGORY_CLASS
"Class"

See Also:
Constant Field Values

CATEGORY_JAVA_CLASS

public static final java.lang.String CATEGORY_JAVA_CLASS
"JavaClass"

See Also:
Constant Field Values

CATEGORY_TYPE

public static final java.lang.String CATEGORY_TYPE
"Type"

See Also:
Constant Field Values

CATEGORY_CURRENTWINDOW

public static final java.lang.String CATEGORY_CURRENTWINDOW
"CurrentWindow"

See Also:
Constant Field Values

CATEGORY_UNKNOWN_ID

public static final int CATEGORY_UNKNOWN_ID
See Also:
Constant Field Values

CATEGORY_CLASS_ID

public static final int CATEGORY_CLASS_ID
See Also:
Constant Field Values

CATEGORY_TYPE_ID

public static final int CATEGORY_TYPE_ID
See Also:
Constant Field Values

CATEGORY_CURRENTWINDOW_ID

public static final int CATEGORY_CURRENTWINDOW_ID
See Also:
Constant Field Values

CATEGORY_DOMAIN_ID

public static final int CATEGORY_DOMAIN_ID
See Also:
Constant Field Values

CATEGORY_PROCESS_ID

public static final int CATEGORY_PROCESS_ID
See Also:
Constant Field Values

QUALIFIER_INDEX

public static final java.lang.String QUALIFIER_INDEX
"Index"

See Also:
Constant Field Values

QUALIFIER_OBJECT_INDEX

public static final java.lang.String QUALIFIER_OBJECT_INDEX
"ObjectIndex"

See Also:
Constant Field Values

QUALIFIER_CLASS_INDEX

public static final java.lang.String QUALIFIER_CLASS_INDEX
"ClassIndex"

See Also:
Constant Field Values

QUALIFIER_ABS_INDEX

public static final java.lang.String QUALIFIER_ABS_INDEX
"AbsIndex"

See Also:
Constant Field Values

QUALIFIER_CLASS

public static final java.lang.String QUALIFIER_CLASS
"Class"

See Also:
Constant Field Values

QUALIFIER_JAVA_CLASS

public static final java.lang.String QUALIFIER_JAVA_CLASS
"JavaClass"

See Also:
Constant Field Values

QUALIFIER_CAPTION

public static final java.lang.String QUALIFIER_CAPTION
"Caption"

See Also:
Constant Field Values

QUALIFIER_JAVACAPTION

public static final java.lang.String QUALIFIER_JAVACAPTION
"JavaCaption"

See Also:
Constant Field Values

QUALIFIER_PROPERTY

public static final java.lang.String QUALIFIER_PROPERTY
"Property"

See Also:
Constant Field Values

QUALIFIER_PROPERTY_CONTAINS

public static final java.lang.String QUALIFIER_PROPERTY_CONTAINS
"PropertyContains"

See Also:
Constant Field Values

QUALIFIER_LEVEL

public static final java.lang.String QUALIFIER_LEVEL
"Level"

See Also:
Constant Field Values

QUALIFIER_PATH

public static final java.lang.String QUALIFIER_PATH
"Path"

See Also:
Constant Field Values

QUALIFIER_NAME

public static final java.lang.String QUALIFIER_NAME
"Name"

See Also:
Constant Field Values

QUALIFIER_NAME_CONTAINS

public static final java.lang.String QUALIFIER_NAME_CONTAINS
"NameContains"

See Also:
Constant Field Values

QUALIFIER_TEXT

public static final java.lang.String QUALIFIER_TEXT
"Text"

See Also:
Constant Field Values

QUALIFIER_ID

public static final java.lang.String QUALIFIER_ID
"ID"

See Also:
Constant Field Values

QUALIFIER_HTMLID

public static final java.lang.String QUALIFIER_HTMLID
"HTMLID"

See Also:
Constant Field Values

QUALIFIER_HTMLTEXT

public static final java.lang.String QUALIFIER_HTMLTEXT
"HTMLText"

See Also:
Constant Field Values

QUALIFIER_HTMLTITLE

public static final java.lang.String QUALIFIER_HTMLTITLE
"HTMLTitle"

See Also:
Constant Field Values

QUALIFIER_UNKNOWN_ID

public static final int QUALIFIER_UNKNOWN_ID
See Also:
Constant Field Values

QUALIFIER_CLASS_ID

public static final int QUALIFIER_CLASS_ID
See Also:
Constant Field Values

QUALIFIER_OBJECT_INDEX_ID

public static final int QUALIFIER_OBJECT_INDEX_ID
See Also:
Constant Field Values

QUALIFIER_ABS_INDEX_ID

public static final int QUALIFIER_ABS_INDEX_ID
See Also:
Constant Field Values

QUALIFIER_INDEX_ID

public static final int QUALIFIER_INDEX_ID
See Also:
Constant Field Values

QUALIFIER_CLASS_INDEX_ID

public static final int QUALIFIER_CLASS_INDEX_ID
See Also:
Constant Field Values

QUALIFIER_CAPTION_ID

public static final int QUALIFIER_CAPTION_ID
See Also:
Constant Field Values

QUALIFIER_JAVACAPTION_ID

public static final int QUALIFIER_JAVACAPTION_ID
See Also:
Constant Field Values

QUALIFIER_PROPERTY_ID

public static final int QUALIFIER_PROPERTY_ID
See Also:
Constant Field Values

QUALIFIER_PROPERTY_CONTAINS_ID

public static final int QUALIFIER_PROPERTY_CONTAINS_ID
See Also:
Constant Field Values

QUALIFIER_LEVEL_ID

public static final int QUALIFIER_LEVEL_ID
See Also:
Constant Field Values

QUALIFIER_NAME_ID

public static final int QUALIFIER_NAME_ID
See Also:
Constant Field Values

QUALIFIER_NAME_CONTAINS_ID

public static final int QUALIFIER_NAME_CONTAINS_ID
See Also:
Constant Field Values

QUALIFIER_TEXT_ID

public static final int QUALIFIER_TEXT_ID
See Also:
Constant Field Values

QUALIFIER_ID_ID

public static final int QUALIFIER_ID_ID
See Also:
Constant Field Values

QUALIFIER_PATH_ID

public static final int QUALIFIER_PATH_ID
See Also:
Constant Field Values

QUALIFIER_HTMLTEXT_ID

public static final int QUALIFIER_HTMLTEXT_ID
See Also:
Constant Field Values

QUALIFIER_HTMLTITLE_ID

public static final int QUALIFIER_HTMLTITLE_ID
See Also:
Constant Field Values

QUALIFIER_HTMLID_ID

public static final int QUALIFIER_HTMLID_ID
See Also:
Constant Field Values

DEFAULT_OPEN_CAPTION_EXPRESSION

public static final java.lang.String DEFAULT_OPEN_CAPTION_EXPRESSION
"{" Begin wildcard definition

See Also:
Constant Field Values

DEFAULT_CLOSE_CAPTION_EXPRESSION

public static final java.lang.String DEFAULT_CLOSE_CAPTION_EXPRESSION
"}" End wildcard definition

See Also:
Constant Field Values

DEFAULT_MATCH_ANY

public static final java.lang.String DEFAULT_MATCH_ANY
See Also:
Constant Field Values

NBSP_STRING

public static final java.lang.String NBSP_STRING
"xA0" or #160 -- non-breaking space in Html


_convert_NBSP_Strings

public static boolean _convert_NBSP_Strings
Default true means always convert NBSP characters to normal SPACE characters during comparisons. Set to false to require NBSP exact matching.


qualifierSeparator

protected java.lang.String qualifierSeparator

assignSeparator

protected java.lang.String assignSeparator

govLevel

protected int govLevel
the hierarchy level within the GuiObjectVector path represented by this recognition substring. The first item in the GuiObjectVector path is at govLevel 0.


pathInfo

protected java.lang.String pathInfo
the full recognition string provided to constructor Ex: "Type=Window;Caption=MyApp"


domainInfo

protected java.lang.String domainInfo
only the Domain portion of the recognition string, if present. Ex: "Domain=Html"


domainValue

protected java.lang.String domainValue
only the Domain value portion of the recognition string, if present. Ex: "Html"


processInfo

protected java.lang.String processInfo
only the Process portion of the recognition string, if present. Ex: "Process=Excel.exe"


processValue

protected java.lang.String processValue
only the Process value portion of the recognition string, if present. Ex: "Excel.exe"


classInfo

protected java.lang.String classInfo
only the Category portion of the recognition string. Ex: "Type=Window"


classCategory

protected java.lang.String classCategory
only the Category class/type portion of the recognition string. Ex: "Type"


classCategoryID

protected int classCategoryID
The Category ID of the recognition string. Ex: CATEGORY_TYPE_ID


categoryIndex

protected int categoryIndex
index to the Category value portion of the recognition string. Normally, this is 0. However, it will be >0 if Domain is present. Ex: "Type=Window"


classValue

protected java.lang.String classValue
only the Category value portion of the recognition string. Ex: "Window"


qualifierInfo

protected java.lang.String qualifierInfo
only the Qualifier portion of the recognition string. Ex: "Caption=MyApp"


gorInfos

protected GuiObjectRecognition.GORInfo[] gorInfos
There can be multiple qualifiers. So they are stored in the gorInfos array.


qualifierMatches

protected int qualifierMatches
Tracks multiple qualifier matches. When there is more than one qualifier, such as Text=SomeText;Index=2, we need to count how many times we match all other qualifiers besides Index. All other qualifiers matching will increment this counter which will be compared against the target Index=N value.


htmlElements

public static final java.lang.String[] htmlElements

linkHtmlElements

public static final java.lang.String[] linkHtmlElements

DhtmlElements

public static final java.lang.String[] DhtmlElements

containerTypes

protected static final java.lang.String[] containerTypes
List of items considered to be component containers:
TabControl, JavaPanel, JavaWindow, Window, JavaSplitPane


containerTypesWithOnlyOneChildVisible

protected static final java.lang.String[] containerTypesWithOnlyOneChildVisible
List of containers whose non-visible children we may sometimes wish to process. This list affects how indices are calculated for immediate container children and their children as the indices are reset to entry values for each separate child container for these objects. See the 'setupIndexMap' function for more details on this.

Some containers, like TabControls, might have multiple children, but only one is visible at any given time. For example, only one TabPane is selected and visible in a TabControl at any given time. This is a list of such known container types.

See Also:
#setupIndexMap

topLevelContainers

protected static final java.lang.String[] topLevelContainers
List of known container types that should have IndexMaps prepared for their children. These are generally top level containers we know we want to process as testable windows.


ignoreTypeChildren

protected static final java.lang.String[] ignoreTypeChildren
List of components from which we should not getChildren() as we go through the hierarchy. ComboBox, ListBox, CellRendererPane


containerTypesIgnoredForRecognition

protected static final java.lang.String[] containerTypesIgnoredForRecognition
List of container types we may wish to exclude from longer recognition strings. For example, we don't really care about the RootPane of a JFrame, or the TabControl parent of child Panels. We usually care more about identifying the child Panels instead.


containerClassesIgnoredForRecognition

protected static final java.lang.String[] containerClassesIgnoredForRecognition
List of container classes we may wish to not only exclude from longer recognition strings but also exclude from whole component hierarchy. Without showing those container classes, the component hierarchy would be more clear with less levels. It could be more easy for users to find out the cared component in the the component hierarchy. For example, we don't really care about mx.containers.GridItem in Flex. We usually care more about identifying the child Panels instead.


containerNamesIgnoredForRecognition

protected static final java.lang.String[] containerNamesIgnoredForRecognition
List of container names we may wish to exclude from longer recognition strings. These are generally containers given default names by the OS or JVM for container types that we otherwise do care about, but not these particular instances. Example, the low-level contentPane (JavaPanel) and layeredPane (JavaPanel) of a JFrame we don't really need in the recognition string, but other JavaPanels we do care about.


textOKForRecognition

protected static final java.lang.String[] textOKForRecognition
List of component types we may wish to getText on for recognition purposes. For example, the static text of comps like labels and buttons may be appropriate to use for Text= types of recognition.

Constructor Detail

GuiObjectRecognition

public GuiObjectRecognition(java.lang.String objectInfo,
                            int govLevel)
Used internally, or by direct subclasses only.
Standard Constructor using default qualifier separator.

Parameters:
objectInfo - the recognition string representing one of the parent or child objects in the full hierarchy being searched.

GuiObjectRecognition

public GuiObjectRecognition(java.lang.String objectInfo,
                            java.lang.String aQualifierSeparator,
                            int govLevel)
Used internally, or by direct subclasses only.
Constructor using a different qualifier separator from our standard.

Parameters:
objectInfo - the recognition string representing one of the parent or child objects in the full hierarchy being searched.

aQualifierSeparator - an alternate qualifier separator used in this recognition string. If null, then the default separator will be used.
Method Detail

getDomainValue

public java.lang.String getDomainValue()
Normally only valid for the topmost Parent GOR object.

Returns:
the domainValue. The "Html" of "Domain=Html", if present. May be null.

getProcessValue

public java.lang.String getProcessValue()
Normally only valid for the topmost Parent GOR object.

Returns:
the processValue. The "Excel.exe" of "Process=Excel.exe", if present. May be null.

isHtmlElement

public static boolean isHtmlElement(java.lang.String element)

isLinkHtmlElement

public static boolean isLinkHtmlElement(java.lang.String element)

isDHtmlElement

public static boolean isDHtmlElement(java.lang.String element)

isContainerType

public static boolean isContainerType(java.lang.String compType)
Parameters:
compType -
Returns:
true if compType.equalsIgnoreCase an item in the containerTypes list.

isContainerTypeWithOnlyOneChildVisible

public static boolean isContainerTypeWithOnlyOneChildVisible(java.lang.String compType)
Parameters:
compType -
Returns:
true if compType.equalsIgnoreCase an item in the containerTypesWithOnlyOneChildVisible list.

isTopLevelContainer

public static boolean isTopLevelContainer(java.lang.String compType)
Parameters:
compType -
Returns:
true if compType.equalsIgnoreCase an item in the topLevelContainers list.

isIgnoredTypeChild

public static boolean isIgnoredTypeChild(java.lang.String compType)
Parameters:
compType -
Returns:
true if compType.equalsIgnoreCase an item in the ignoreTypeChildren list.

isContainerTypeIgnoredForRecognition

public static boolean isContainerTypeIgnoredForRecognition(java.lang.String compType)
Parameters:
compType -
Returns:
true if compType.equalsIgnoreCase an item in the containerTypesIgnoredForRecognition list.

isContainerClassIgnoredForRecognition

public static boolean isContainerClassIgnoredForRecognition(java.lang.String compClass)
Called by PCTree#ignoreParentRecognitionString(PCTree)

Parameters:
compClass -
Returns:
true if compClass.equalsIgnoreCase an item in the containerClassesIgnoredForRecognition list.

isContainerNameIgnoredForRecognition

public static boolean isContainerNameIgnoredForRecognition(java.lang.String compName)
Parameters:
compName -
Returns:
true if compName.equalsIgnoreCase an item in the containerNamesIgnoredForRecognition list.

isTextOKForRecognition

public static boolean isTextOKForRecognition(java.lang.String compType)
Parameters:
compType -
Returns:
true if compType.equalsIgnoreCase an item in the textOKForRecognition list.

getGovLevel

public int getGovLevel()
Returns the govLevel assigned in the constructor.

Returns:
int govLevel assigned at construction.

getObjectRecognition

public java.lang.String getObjectRecognition()
Used internally, or by direct subclasses only.

Returns:
String recognition string provided at construction.
Ex: "Type=Window;Caption=MyApp"

getQualifierSeparator

public java.lang.String getQualifierSeparator()
Used internally, or by direct subclasses only.

Returns:
String qualifier separator in use.

initDomainInfo

public void initDomainInfo()
Initialize to isolate any Domain= or Process= information in the recognition string.


hasDomainInfo

protected boolean hasDomainInfo()
Used internally, or by direct subclasses only.
Sets the domainInfo, domainValue if Domain is present.

Returns:
true if the recognition string contains leading Domain information (Ex: Domain=Html)

hasProcessInfo

protected boolean hasProcessInfo()
Used internally, or by direct subclasses only.
Sets the processInfo, processValue if Process is present.

Returns:
true if the recognition string contains leading Process information (Ex: Process=Excel.exe)

hasCategoryInfo

protected boolean hasCategoryInfo()
Used internally, or by direct subclasses only.

Returns:
true if the recognition string contains leading Category information (Type= or Class= or JavaClass= etc..) The routine calls hasDomainInfo to see if Category info is preceded by Domain. The call to hasDomainInfo also sets the categoryIndex if necessary.

getClassRecognition

public java.lang.String getClassRecognition()
Used internally, or by direct subclasses only.

Returns:
String Category portion of the provided recognition string minus and Domain information, if present.
Ex: "Type=Window" or "Class=aClassName" This may be the full recognition string of qualifiers if no Type= or Class= category info exists in the recognition string. Ex: "HTMLTitle=MyApp" In that case, the class category will be UNKNOWN (0).

extractClassInfo

protected void extractClassInfo()
Used internally, or by direct subclasses only.
Internal helper routine to fill internal fields.
Separates the Category into classCategory and classValue fields.
Ex: "Type=Window" gets separated into:

classCategory = "Type"
classValue = "Window"


getClassCategory

public java.lang.String getClassCategory()
Used internally, or by direct subclasses only.

Returns:
the classCategory portion of the recognition string.
Ex: Of "Type=Window", this returns "Type".

getClassCategoryID

public int getClassCategoryID()
Used internally, or by direct subclasses only.

Returns:
the int Constant that represents the type of class category we have.
Ex: CATEGORY_CLASS_ID or CATEGORY_TYPE_ID

getClassValue

public java.lang.String getClassValue()
Used internally, or by direct subclasses only.

Returns:
the classValue portion of the recognition string.
Ex: Of "Type=Window", this returns "Window".

getQualifierRecognition

public java.lang.String getQualifierRecognition()
Used internally, or by direct subclasses only.

Returns:
String Qualifier portion of the provided recognition string.
Can include multiple separated qualifiers.
May have no Class Category at all!! Type= or Class= may not be present!
Ex: "Caption=MyApp" or "Name=aName" or "Index=1;Path=File->Exit"

getQualifierCount

public int getQualifierCount()
Used internally, or by direct subclasses only.

Returns:
the number of qualifiers found in the recognition string.
Usually there is just 1. Occassionally, more.

getQualifierCategory

public java.lang.String getQualifierCategory(int index)
Used internally, or by direct subclasses only.

Parameters:
index - the 0-based index of the gorInfo qualifier to interrogate.
index=0 is the first (and usually "only") qualifier.

Returns:
the qualifierCategory portion of the indexed qualifier string.
Ex: Of "Caption=MyApp", this returns "Caption".

getQualifierCategoryID

public int getQualifierCategoryID(int index)
Used internally, or by direct subclasses only.

Parameters:
index - the 0-based index of the gorInfo qualifier to interrogate.
index=0 is the first (and usually "only") qualifier.

Returns:
the int Constant that represents the type of qualifier category we have.
Ex: QUALIFIER_INDEX_ID or QUALIFIER_CAPTION_ID

getQualifierValue

public java.lang.String getQualifierValue(int index)
Used internally, or by direct subclasses only.

Parameters:
index - the 0-based index of the gorInfo qualifier to interrogate.
index=0 is the first (and usually "only") qualifier.

Returns:
the qualifierValue portion of the indexed qualifier string.
Ex: Of "Caption=MyApp", this returns "MyApp".

makeRegexReadyWildcards

public java.lang.String makeRegexReadyWildcards(java.lang.String expression)
Convenience routine to convert our single Caption char ? and * wildcard characters to regex equivalent wildcards.

Parameters:
expression - Generally a qualifierValue holding Caption information.
Returns:
String expression with correct regex wildcard pattern (if appropriate).

isMatchingClass

public boolean isMatchingClass(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Convenience routine to check if the object matches the Class or Type information stored in this GuiObjectRecognition instance *without* specifying what the classname or type is as required by the primary, tool-dependent isMatchingClass routine.
Simply calls the subclass isMatchingClass routine with null as the classname parameter.

Parameters:
theObject - to evaluate against our stored recognition information.
Returns:
true if theObject is considered a match to our stored class information.

getObjectSuperClassNames

public java.lang.String[] getObjectSuperClassNames(java.lang.Object theObject)
Used internally, or by direct subclasses.
Subclasses using proxies must override with a tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information. This implementation assumes the Java object of interest is provided. Implementations using caches and keys will need to override this method.

Parameters:
theObject--sometimes - a tool-dependent proxy for the object to be evaluated.
Returns:
String[] values of the requested object information. A 0-length array for Object.class or null objects.

isMatchingCaption

public boolean isMatchingCaption(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Convenience routine to check if the object matches the Caption information stored in this GuiObjectRecognition instance *without* specifying what the is as required by the primary, tool-dependent isMatchingCaption routine.
Simply calls the subclass isMatchingCaption routine with null as the caption parameter.

Parameters:
theObject - to evaluate against our stored recognition information.
Returns:
true if theObject is considered a match to any stored caption information.

getQualifierIDValue

public java.lang.String getQualifierIDValue(int qualifierID)
Used internally, or by direct subclasses only.
Extracts the Value of the qualifier with the matching qualifier type ID. Example, return the value of the Caption qualifier if given the QUALIFIER_CAPTION_ID as the provided parameter.

Parameters:
qualifierID - constant for the type of qualifier from which we want the value.
Ex: QUALIFIER_CAPTION_ID, QUALIFIER_INDEX_ID, QUALIFIER_NAME_ID, etc..

Returns:
the qualifierValue portion of the matching gorInfo qualifier.
null if the requested qualifier type is not present anywhere in the recognition string.
Ex: Of "Caption=MyApp", this returns "MyApp".

isMatchingObject

public boolean isMatchingObject(java.lang.Object theObject,
                                int classindex,
                                int absindex,
                                java.lang.String[] matchName)
                         throws SAFSObjectRecognitionException
Used internally, or by direct subclasses only.
First checks to see if the provided object matches class information for our stored recognition method. If it does, it proceeds to check against all the stored gorInfo qualifiers too.

Parameters:
theObject - to evaluate against our stored recognition information.
classindex - to use when comparing Index= class qualifiers. This will either be the index of the Class instance encountered (ex: javax.swing.JPanel), or the index of the Class Type encountered (ex: JavaPanel). The correct index type will have been determined and forwarded by the calling routine (usually a GuiChildIterator).
matchName, - String [] , if not null, then return in matchName[0] the matching name, but only when the name is used to match with.
Returns:
true if both the Class information and all gorInfo qualifiers are satisfied by theObject.
Throws:
SAFSObjectRecognitionException - passed along from called routines like isMatchingQualifiers.

getMatchingObject

public java.lang.Object getMatchingObject(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Called from ChildIterator. Usually just returns theObject that was provided. In the case of objects with subitems, like subitems referenced with "Path=" qualifiers, this routine will actually locate the subitem via appropriate calls in the subclass implementation and return those instead.

Parameters:
theObject - to evaluate with stored recognition information checking for the need to locate a different (sub)item.
Returns:
Object -- Usually just returns theObject as provided. May return a subitem or other associated Object if that is what is specified in the recognition string.

isMatchingQualifiers

protected boolean isMatchingQualifiers(java.lang.Object theObject,
                                       int classindex,
                                       int absindex)
                                throws SAFSObjectRecognitionException
Used internally, called by isMatchingObject.
Attempts to verify that every gorInfo qualifier from the recogntion string stored herein is satisfied by theObject.

Parameters:
theObject - to evaluate against our stored recognition information.
classindex - to use when comparing Index= class qualifiers. This will either be the index of the Class instance encountered (ex: javax.swing.JPanel), or the index of the Class Type encountered (ex: JavaPanel). The correct index type will have been determined and forwarded by the calling routine (usually a GuiChildIterator).
Returns:
true if all gorInfo qualifiers are satisfied by theObject or if there are no qualifiers. No qualifiers means that a matching Type= or Class= is always a match. This is generally only useful when we are seeking ALL objects of a particular Type or Class.
Throws:
SAFSObjectRecognitionException - when encountering unknown or unsupported categories or qualifiers.

isMatchingClass

public boolean isMatchingClass(java.lang.Object theObject,
                               java.lang.String theClass)
Used internally, or by direct subclasses only.
Determine if the provided Object matches our segment of the recognition string.

If our recognition string contains a Class definition Class=classname then the routine will try a case-sensitive match of the provided classname. If that doesn't match, the routine will try to see if the actual class is a subclass of the class specified in the recognition string.

If our recognition string contains a Type definition Type=typename then the routine will call isMatchingType(Object, String) to attempt the match.

Parameters:
Object - proxy of the actual object to be compared against our recognition string.
Returns:
true if the class matches, or is a subclass of, the class specified in the recognition string. false if we cannot identify an appropriate match or an error occurs.

isMatchingCaption

public boolean isMatchingCaption(java.lang.Object theObject,
                                 java.lang.String theCaption)
Used internally, or by direct subclasses only.
Calls the subclass's getObjectCaption function. This is generally only valid for top level Window types of objects.

Parameters:
theObject - to evaluate
theCaption - to match. If null, we will attempt to retrieve the stored recognition information in qualifiers for CAPTION or JAVACAPTION.
Returns:
true if the retrieved value from getObjectCaption matches theID exactly, or matches an appropriate SAFS wildcard expression like {SomeSubString*}.

compareText

protected boolean compareText(java.lang.String theText,
                              java.lang.String objText)
Used to compare 2 text values. Normally this is required to be an exact match using .equals(). However, in the case of some text we might want to ignore various differences.

The routine currently handles:
-- text benchmarks that might have originally been captured and truncated by Rational Robot
-- text that might contain mnemonic or hotkey ampersands (&)
-- text that might contain non-breaking spaces that can be ignored
-- retrieved object text needing trim()med whitespace

Parameters:
theText - - non-null text to match
objText - - non-null retrieved text to compare
Returns:
See Also:
_convert_NBSP_Strings

isMatchingProperty

public boolean isMatchingProperty(java.lang.Object theObject,
                                  java.lang.String qualifierValue,
                                  boolean blnExact)
Used internally, or by direct subclasses only.
calls the subclass's getObjectProperty function with correct information (string parse occurs before call)

Parameters:
theObject - to evaluate
qualifierValue - used to determine property test/value
blnExact - true will run exact match; false will wildcard: *theValue*
Returns:
true if the retrieved value from getObjectProperty matches the Property value.

isMatchingName

public boolean isMatchingName(java.lang.Object theObject,
                              java.lang.String theName,
                              boolean blnExact)
Used internally, or by direct subclasses only.
Calls the subclass's getObjectName function.

Parameters:
theObject - to evaluate
theName - to match
blnExact - true will run exact match; false will wildcard: *theName*
Returns:
true if the retrieved value from getObjectAccessibleName OR getObjectName matches theName.

isMatchingLevel

public boolean isMatchingLevel(java.lang.Object theObject,
                               int theLevel)
Used internally, or by direct subclasses only.
Calls the subclass's getObjectLevel function.

Parameters:
theObject - to evaluate
theLevel - to match
Returns:
true if the retrieved value from getObjectLevel matches theLevel exactly.

isMatchingText

public boolean isMatchingText(java.lang.Object theObject,
                              java.lang.String theText)
Used internally, or by direct subclasses only.
Calls the subclass's getObjectText function. Uses the compareText() function to handle certain ignorable cases of missing or mismatched text from UI-specific elements.

Parameters:
theObject - to evaluate
theText - to match
Returns:
true if the retrieved value from getObjectText matches theText "exactly".
See Also:
compareText(String, String)

isMatchingID

public boolean isMatchingID(java.lang.Object theObject,
                            java.lang.String theID)
Used internally, or by direct subclasses only.
Calls the subclass's getObjectID function.

Parameters:
theObject - to evaluate
theID - to match
Returns:
true if the retrieved value from getObjectID matches theID exactly.

isFinalMatch

public boolean isFinalMatch(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Perform whatever tests we want on the found Object to decide if this is our desired final match.

Currently, we test that the object isShowing if the object is found by Index. This is done via a call to the subclass's isObjectShowing function. This check is required because different object in hidden panels can have the same Index as those that are showing.

We will have to resolve cases where there are multiple potential matches and none of them are showing. Especially when doing things like interrogating the property values of temporarily hidden (not showing) components.

Parameters:
theObject - -- the Object to evaluate for a final match.

Returns:
true if the algorithm determines this Object satisfies our search.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
Overrides the Object.toString() method to return our recognition string.

getObjectAccessibleName

public java.lang.String getObjectAccessibleName(java.lang.Object theObject)
Allow individual engines (ie. RJ) to override this method with their own implementation.

Parameters:
theObject -
Returns:
String

getObjectName

public abstract java.lang.String getObjectName(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
Returns:
String value of the requested object information.

getObjectClassName

public abstract java.lang.String getObjectClassName(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
Returns:
String value of the requested object information.

getObjectCaption

public abstract java.lang.String getObjectCaption(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
Returns:
String value of the requested object information.

getObjectDomain

public abstract java.lang.String getObjectDomain(java.lang.Object theObject)
Used internally or by subclasses only. The object domain is the environment, OS, or programming language origins of theObject. Example: Java, Html, Win, Net, Visual Basic, etc.

Parameters:
theObject - -- usually a tool-dependent proxy for the object to be evaluated.
Returns:
String value of "Java" , "Net", "Html", Win", etc..

getObjectLevel

public abstract int getObjectLevel(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Level is generally considered to be the Z-Order information of the object--where in the Z-Order the object (usually a window) resides.

Subclasses implement tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
Returns:
int value of the requested object information.

getObjectText

public abstract java.lang.String getObjectText(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
Returns:
String value of the requested object information.

getObjectID

public abstract java.lang.String getObjectID(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
Returns:
String value of the requested object information.

getObjectPropertyNames

public abstract java.lang.String[] getObjectPropertyNames(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
Returns:
String[] of all known property names. Property names are assumed to be case-sensitive.

getObjectProperty

public abstract java.lang.String getObjectProperty(java.lang.Object theObject,
                                                   java.lang.String theProperty)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
theProperty - name of the property value to be evaluated in the object. Property names are assumed to be case-sensitive.
Returns:
String value of the requested object information.

getMatchingPathObject

public abstract java.lang.Object getMatchingPathObject(java.lang.Object theObject,
                                                       java.lang.String thePath)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. Retrieves the resulting object identified with the Path information applied to theObject.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
thePath - information to locate another object or subitem relative to theObject. this is usually something like a menuitem or tree node where supported.
Returns:
Object child sub-object found relative to theObject

isMatchingPath

public abstract boolean isMatchingPath(java.lang.Object theObject,
                                       java.lang.String thePath)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
thePath - information to locate another object or subitem relative to theObject. this is usually something like a menuitem or tree node where supported.
Returns:
true if the child sub-object was found relative to theObject.

isObjectShowing

public abstract boolean isObjectShowing(java.lang.Object theObject)
Used internally, or by direct subclasses only.
Subclasses implement tool-dependent mechanism to provide the requested information. The information is used to determine if a particular object is a match for our stored recognition information.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
Returns:
true if theObject was found to be "showing" or "visible".

isMatchingType

public abstract boolean isMatchingType(java.lang.Object theObject,
                                       java.lang.String theClass)
Used internally, or by direct subclasses only.
Subclasses are generally expected to simply forward this request on to the tool-dependent GuiClassData.getMappedClassType (like RGuiClassData) function after casting the object to the appropriate class for the tool implementation.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
theClass - information extracted here and forwarded for GuiClassData.isMappedClassType.
Returns:
true if theObject is determined to satisfy Class Type information.

isMatchingSubClass

public abstract boolean isMatchingSubClass(java.lang.Object theObject,
                                           java.lang.String theClass,
                                           java.lang.String parentClass)
Used internally, or by direct subclasses only.
Subclasses are generally expected to simply forward this request on to the tool-dependent GuiClassData.isMatched (like RGuiClassData) function after casting the object to the appropriate class for the tool implementation. Subclasses should also use this method to support the "CurrentWindow" recognition string. isMatchingSubclass should return true IF the class sought is "CurrentWindow" and the object is determined to be the topmost active window with input (keyboard) focus.

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
theClass - information extracted here and forwarded for GuiClassData.isMatched.
parentClass - information extracted here and forwarded for GuiClassData.isMatched.
Returns:
true if theObject is determined to satisfy the requested information.

getObjectClassIndex

public java.lang.String getObjectClassIndex(java.lang.Object item)
Used internally, or by direct subclasses only.
Subclasses are generally expected to implement a means to determine the Nth occurrence of the specific object class in the application's child object hierarchy. This index is used in future attempts to locate the correct occurrence of the child object via one or more search algorithms. The index should be 1-Based. That is, the first occurrence is "1".

Example use: Give us the Class Index that would work for a Class category recognition string like:

Child="Class=com.custom.class.MyTreeClass;Index=N", or
Child="Class=com.custom.class.MyTreeClass;ClassIndex=N"

Parameters:
theObject--usually - a tool-dependent proxy for the object to be evaluated.
Returns:
String representation of the index or an empty string (""). This default implementation which should be overwritten in subclasses, if possible, is to return an empty string ("").