All Implemented Interfaces:
Serializable, Element, EntityElement, IdentifiableElement, Entity, ERElement, ModelElement
Direct Known Subclasses:
FacetImpl, ResourceImpl

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

    • supertypes

      protected List<String> supertypes
      The list of supertypes.
    • expectedtype

      protected String expectedtype
      The expected type.
    • contexts

      protected Map<UUID,String> contexts
      The contexts in which the entity exists.
  • Constructor Details

    • EntityImpl

      protected EntityImpl()
      Default constructor.
  • Method Details

    • getSupertypes

      public List<String> getSupertypes()
      Returns the list of supertypes for this element.

      This list is included in JSON serialization only if it is not empty.

      Specified by:
      getSupertypes in interface ModelElement
      Returns:
      A List of supertype names.
    • getExpectedtype

      public String getExpectedtype()
      Returns the name of the expected type.

      This is used during deserialization to indicate the original type when a fallback to a supertype was necessary. It is included in JSON serialization only if it is not empty.

      Specified by:
      getExpectedtype in interface ModelElement
      Returns:
      The expected type name.
    • getContexts

      public Map<UUID,String> getContexts()
      Returns a map of contexts where this element is present.

      The map keys are the context UUIDs, and the values are the context names. This property is included in JSON serialization only if it is not null.

      Specified by:
      getContexts in interface ERElement
      Returns:
      A Map of context UUIDs to context names, or null.
    • setContexts

      protected void setContexts(Map<UUID,String> contexts)
      Sets the contexts in which the entity exists.
      Parameters:
      contexts - The contexts.