Class SchemaEntity
- 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SchemaEntity.SchemaEntityKey
-
Constructor Summary
Constructors Modifier Constructor Description protected
SchemaEntity(String propertyName, EntityValue reference, String propertyPath)
Creates a new instance which is not a hidden root.protected
SchemaEntity(String propertyName, EntityValue reference, String propertyPath, boolean hiddenRoot)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAttribute(SchemaAttribute attribute)
protected void
addRelation(SchemaRelation relation)
List<SchemaAttribute>
getAttributes()
SchemaEntity.SchemaEntityKey
getKey()
String
getPropertyName()
Returns the name of the property to which this entity was attached.EntityValue
getReference()
List<SchemaRelation>
getRelations()
boolean
isHiddenRoot()
Indicates whether this is a hidden root of a messageprotected void
setHiddenRoot(boolean hiddenRoot)
String
toString()
-
-
-
Constructor Detail
-
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 attachedreference
- 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 attachedreference
- the reference to the instancehiddenRoot
- indicates that this instance is the hidden root of a message
-
-
Method Detail
-
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
public SchemaEntity.SchemaEntityKey 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()
-
-