All Implemented Interfaces:
Serializable, Element, EntityElement, IdentifiableElement, SchemaMixedElement, Entity, Facet, ERElement, ModelElement
Direct Known Subclasses:
DummyFacet

public abstract class FacetImpl extends EntityImpl implements Facet
The default abstract implementation of the Facet interface.
Author:
Luca Frosini (ISTI - CNR)
See Also:
  • Field Details

    • additionalProperties

      protected Map<String,Object> additionalProperties
      Additional properties of the facet.
    • allowedAdditionalKeys

      protected final Set<String> allowedAdditionalKeys
      A set of keys that are allowed as additional properties, even if they start with '_' or '@'.
  • Constructor Details

    • FacetImpl

      protected FacetImpl()
      Default constructor.
  • Method Details

    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Returns a map of all additional properties not defined in the schema.

      This method allows retrieving all additional properties of the facet that are not part of its defined schema.

      Specified by:
      getAdditionalProperties in interface Facet
      Specified by:
      getAdditionalProperties in interface SchemaMixedElement
      Returns:
      A Map containing the additional properties, where the key is the property name and the value is the property value.
    • setAdditionalProperties

      public void setAdditionalProperties(Map<String,Object> additionalProperties)
      Sets the map of additional properties for the element.
      Specified by:
      setAdditionalProperties in interface Facet
      Specified by:
      setAdditionalProperties in interface SchemaMixedElement
      Parameters:
      additionalProperties - A Map of additional properties.
    • getAdditionalProperty

      public Object getAdditionalProperty(String key)
      Retrieves a single additional property by its key.
      Specified by:
      getAdditionalProperty in interface Facet
      Specified by:
      getAdditionalProperty in interface SchemaMixedElement
      Parameters:
      key - The name of the additional property to retrieve.
      Returns:
      The value of the property, or null if the key is not found.
    • setAdditionalProperty

      public void setAdditionalProperty(String key, Object value)
      Sets a single additional property.

      This method allows setting additional properties on the facet that are not part of its defined schema.

      Specified by:
      setAdditionalProperty in interface Facet
      Specified by:
      setAdditionalProperty in interface SchemaMixedElement
      Parameters:
      key - The name of the additional property.
      value - The value of the additional property.
    • addAllowedAdditionalKey

      public void addAllowedAdditionalKey(String allowedAdditionalKey)
      Adds a key to the set of allowed additional keys.
      Parameters:
      allowedAdditionalKey - The key to add.