Class SchemaEntity

    • 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 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 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)
      • 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)