Interface RelationElement<S extends EntityElement,T extends EntityElement>

Type Parameters:
S - The type of the source entity.
T - The type of the target entity.
All Superinterfaces:
Element, IdentifiableElement, Serializable
All Known Subinterfaces:
ConsistsOf<S,T>, ConsistsOfSchema, IsRelatedTo<S,T>, IsRelatedToSchema, Relation<S,T>, RelationSchema<S,T>
All Known Implementing Classes:
ConsistsOfImpl, ConsistsOfSchemaImpl, DummyIsRelatedTo, IsRelatedToImpl, IsRelatedToSchemaImpl, RelationElementImpl, RelationImpl, RelationSchemaImpl

@TypeMetadata(name="RelationElement", description="The base type for all relations in the Information System model; defines a directed relationship between a source and a target entity, both subtypes of EntityElement, and ensures every relation is uniquely identifiable.", version="1.0.0") @Change(version="1.0.0", description="First Version") public interface RelationElement<S extends EntityElement,T extends EntityElement> extends Element, IdentifiableElement
The base interface for all relation elements in the Information System model.

This interface defines a directed relationship between a source and a target entity, both of which must be subtypes of EntityElement. It extends IdentifiableElement to ensure that every relation is uniquely identifiable.

Author:
Luca Frosini (ISTI - CNR)
  • Field Details

  • Method Details

    • getID

      @ISProperty(name="id", description="This UUID is used to identify the instance uniquely.", readonly=true, mandatory=true) UUID getID()
      Returns the unique identifier (UUID) of the element.

      This UUID is used to uniquely identify the relation instance. It is read-only, mandatory, and cannot be null.

      Specified by:
      getID in interface IdentifiableElement
      Returns:
      The UUID of the element.
    • setID

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

      @ISProperty(name="metadata", mandatory=true, description="Metadata associated with the instance that is automatically created/updated by the system.") Metadata getMetadata()
      Returns the metadata associated with the element.

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

      Metadata is automatically managed by the system and is mandatory.

      Specified by:
      getMetadata in interface IdentifiableElement
      Returns:
      The Metadata of the element, or null if none is set.
    • setMetadata

      void setMetadata(Metadata metadata)
      Sets the metadata for the element.
      Specified by:
      setMetadata in interface IdentifiableElement
      Parameters:
      metadata - The Metadata to associate with the element.
    • getSource

      S getSource()
      Returns the source entity of the relation.
      Returns:
      The source entity.
    • setSource

      void setSource(S source)
      Sets the source entity of the relation.
      Parameters:
      source - The source entity to set.
    • getTarget

      T getTarget()
      Returns the target entity of the relation.
      Returns:
      The target entity.
    • setTarget

      void setTarget(T target)
      Sets the target entity of the relation.
      Parameters:
      target - The target entity to set.