Interface IdentifiableElement

All Superinterfaces:
Element, Serializable
All Known Subinterfaces:
ConsistsOf<S,T>, ConsistsOfType, Context, Entity, EntityElement, EntityType, ERElement, Facet, FacetType, IsParentOf, IsRelatedTo<S,T>, IsRelatedToType, PropertyType, QueryTemplate, Relation<S,T>, RelationElement<S,T>, RelationType<S,T>, Resource, ResourceType, Type
All Known Implementing Classes:
ConsistsOfImpl, ConsistsOfTypeImpl, ContextImpl, DummyFacet, DummyIsRelatedTo, DummyResource, EntityElementImpl, EntityImpl, EntityTypeImpl, FacetImpl, FacetTypeImpl, IsParentOfImpl, IsRelatedToImpl, IsRelatedToTypeImpl, PropertyTypeImpl, QueryTemplateImpl, RelationElementImpl, RelationImpl, RelationTypeImpl, ResourceImpl, ResourceTypeImpl, TypeImpl

public interface IdentifiableElement extends Element
An element that can be uniquely identified by a UUID and may contain Metadata.

This interface extends the base Element to add properties for a unique identifier (ID) and associated metadata. It is designed for elements that require a persistent and globally unique identity.

Author:
Luca Frosini (ISTI - CNR)
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the property used to store the unique identifier (UUID) of the element.
    static final String
    The name of the property used to store the metadata associated with the element.

    Fields inherited from interface org.gcube.informationsystem.base.reference.Element

    DATETIME_PATTERN, NAME, TYPE_PROPERTY
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the unique identifier (UUID) of the element.
    Returns the metadata associated with the element.
    void
    setID(UUID uuid)
    Sets the unique identifier (UUID) for the element.
    void
    Sets the metadata for the element.

    Methods inherited from interface org.gcube.informationsystem.base.reference.Element

    getTypeName
  • Field Details

    • ID_PROPERTY

      static final String ID_PROPERTY
      The name of the property used to store the unique identifier (UUID) of the element.
      See Also:
    • METADATA_PROPERTY

      static final String METADATA_PROPERTY
      The name of the property used to store the metadata associated with the element.
      See Also:
  • Method Details

    • getID

      UUID getID()
      Returns the unique identifier (UUID) of the element.
      Returns:
      The UUID of the element.
    • setID

      void setID(UUID uuid)
      Sets the unique identifier (UUID) for the element.
      Parameters:
      uuid - The UUID to set.
    • getMetadata

      Metadata getMetadata()
      Returns the metadata associated with the element.

      The metadata is included in JSON serialization only if it is not null.

      Returns:
      The Metadata of the element, or null if none is set.
    • setMetadata

      void setMetadata(Metadata metadata)
      Sets the metadata for the element.
      Parameters:
      metadata - The Metadata to associate with the element.