Class Relationship

java.lang.Object
org.ivoa.dm.regtap.Relationship
All Implemented Interfaces:
org.ivoa.vodml.jpa.JPAManipulations, org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>

@Entity @VoDml(id="RegTAP:Relationship", role=objectType) public class Relationship extends Object implements org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
Relationships between resources (like mirroring, derivation, serving a data collection). objectType: Relationship
  • Field Details

    • _id

      protected Long _id
      inserted database key
    • relationship_type

      @VoDml(id="RegTAP:Relationship.relationship_type", role=attribute, type="ivoa:string", typeRole=primitiveType) protected String relationship_type
      The type of the relationship; these terms are drawn from a controlled vocabulary and are DataCite-compatible. : Attribute relationship_type : multiplicity 1
  • Constructor Details

    • Relationship

      public Relationship()
      Creates a new Relationship
    • Relationship

      public Relationship(String relationship_type, String related_id, String related_name)
      full parameter constructor.
      Parameters:
      relationship_type - The type of the relationship; these terms are drawn from a controlled vocabulary and are DataCite-compatible.
      related_id - The IVOA identifier for the resource referred to.
      related_name - The name of resource that this resource is related to.
    • Relationship

      public Relationship(Relationship other)
      Copy Constructor. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>
      Returns:
      the id
    • updateUsing

      public void updateUsing(Relationship other)
      Update this object with the content of the given object. Note that references will remain as is rather than be copied.
      Parameters:
      other - the object to be copied.
    • getRelationship_type

      public String getRelationship_type()
      Returns relationship_type Attribute.
      Returns:
      relationship_type Attribute
    • setRelationship_type

      public void setRelationship_type(String pRelationship_type)
      Set relationship_type Attribute.
      Parameters:
      pRelationship_type - value to set
    • withRelationship_type

      public Relationship withRelationship_type(String pRelationship_type)
      fluent setter for relationship_type Attribute.
      Parameters:
      pRelationship_type - value to set
      Returns:
      Relationship
    • getRelated_id

      public String getRelated_id()
      Returns related_id Attribute.
      Returns:
      related_id Attribute
    • setRelated_id

      public void setRelated_id(String pRelated_id)
      Set related_id Attribute.
      Parameters:
      pRelated_id - value to set
    • withRelated_id

      public Relationship withRelated_id(String pRelated_id)
      fluent setter for related_id Attribute.
      Parameters:
      pRelated_id - value to set
      Returns:
      Relationship
    • getRelated_name

      public String getRelated_name()
      Returns related_name Attribute.
      Returns:
      related_name Attribute
    • setRelated_name

      public void setRelated_name(String pRelated_name)
      Set related_name Attribute.
      Parameters:
      pRelated_name - value to set
    • withRelated_name

      public Relationship withRelated_name(String pRelated_name)
      fluent setter for related_name Attribute.
      Parameters:
      pRelated_name - value to set
      Returns:
      Relationship
    • createRelationship

      public static Relationship createRelationship(Consumer<Relationship.RelationshipBuilder> f)
      create a Relationship in functional builder style.
      Parameters:
      f - the functional builder.
      Returns:
      an object initialized from the builder.
    • forceLoad

      public void forceLoad()
      Specified by:
      forceLoad in interface org.ivoa.vodml.jpa.JPAManipulations
    • delete

      public void delete(jakarta.persistence.EntityManager em)
      Specified by:
      delete in interface org.ivoa.vodml.jpa.JPAManipulationsForObjectType<Long>