java.lang.Object
com.aquima.interactions.communication.impl.evaluator.parser.SchemaEntity
All Implemented Interfaces:
Serializable

public class SchemaEntity extends Object implements Serializable
Since:
11.3
Author:
Voicu Moldovan
See Also:
  • Constructor Details

    • SchemaEntity

      protected SchemaEntity(String propertyName, EntityValue reference, String propertyPath)
      Creates a new instance which is not a hidden root.
      Parameters:
      propertyName - the name of the property from the parent object to which this entity is attached
      reference - the reference to the instance
    • SchemaEntity

      protected SchemaEntity(String propertyName, EntityValue reference, String propertyPath, boolean hiddenRoot)
      Creates a new instance.
      Parameters:
      propertyName - the name of the property from the parent object to which this entity instance is attached
      reference - the reference to the instance
      hiddenRoot - indicates that this instance is the hidden root of a message
  • Method Details

    • isHiddenRoot

      public boolean isHiddenRoot()
      Indicates whether this is a hidden root of a message
      Returns:
      true if this is a hidden root, false otherwise.
    • setHiddenRoot

      protected void setHiddenRoot(boolean hiddenRoot)
    • getKey

    • getPropertyName

      public String getPropertyName()
      Returns the name of the property to which this entity was attached.

      For example, in the JSON message: "person":{"firstName":"John", "lastName":"Smith"}, the object represented by this SchemaEntity is {"firstName":"John", "lastName":"Smith"} and its property name is "person".

      Note that the property name may be null, for instance for the root object in a JSON, or for objects which are array members.

      Returns:
      the property name of this entity, may be null.
    • addAttribute

      protected void addAttribute(SchemaAttribute attribute)
    • addRelation

      protected void addRelation(SchemaRelation relation)
    • getAttributes

      public List<SchemaAttribute> getAttributes()
    • getRelations

      public List<SchemaRelation> getRelations()
    • getReference

      public EntityValue getReference()
    • toString

      public String toString()
      Overrides:
      toString in class Object