Class Relation

java.lang.Object
com.hp.lft.sdk.ai.Relation
All Implemented Interfaces:
Locator, com.hp.lft.sdk.internal.GroupedProperty

public class Relation extends Object implements Locator, com.hp.lft.sdk.internal.GroupedProperty
This Locator helps distinguish an AiObject that may appear multiple times in the application by its relation with respect to other objects in the view.
  • Constructor Details

    • Relation

      public Relation(RelationType relationType, AiObject anchor)
      Constructs a new Relation that can be used to uniquely identify an AiObject by its visual relation.
      Parameters:
      relationType - the relation type with respect to the AiObject.
      anchor - the AiObject which has a visual relation with respect to the object to be identified.
  • Method Details

    • getRelationType

      public RelationType getRelationType()
      Get the type of the Relation.
      Returns:
      the type of the Relation.
    • setRelationType

      public void setRelationType(RelationType relationType)
      Sets the type of the Relation.
      Parameters:
      relationType - the type of the Relation.
    • getAnchor

      public AiObject getAnchor()
      Get the AiObject which has a visual relation with respect to the object to be identified.
      Returns:
      the AiObject which has a visual relation with respect to the object to be identified.
    • setAnchor

      public void setAnchor(AiObject anchor)
      Sets the AiObject which has a visual relation with respect to the object to be identified.
      Parameters:
      anchor - the AiObject which has a visual relation with respect to the object to be identified.
    • getProperties

      public Map<String,Object> getProperties()
      Specified by:
      getProperties in interface com.hp.lft.sdk.internal.GroupedProperty