Package in.cdac.medinfo.csnotk.csnolib.model

## Class Relationship

- java.lang.Object
- - in.cdac.medinfo.csnotk.csnolib.model.VersionedComponent
  - - in.cdac.medinfo.csnotk.csnolib.model.Component
    - - in.cdac.medinfo.csnotk.csnolib.model.Relationship

-     public class Relationship
      extends Component

  Relationship represents an association between two concepts.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Relationship​(java.lang.String id, java.util.Date effTime, java.lang.Byte status, java.lang.String modId, Concept sourceConcept, Concept destinationConcept, int relationshipGroup, Concept type, EnumCharacteristicType characteristicTypeId, EnumModifier modifierId, boolean isConcreteRelationship)` | Parameterized constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(java.lang.Object obj)` |
    `java.lang.Byte` | `getActiveStatus()` | Retrieves the status of the Relationship.
    `java.lang.String` | `getCharacteristicTypeId()` | Returns the characteristic type.
    `Concept` | `getDestinationConcept()` | Returns the destination Concept Id.
    `java.lang.String` | `getId()` | Returns the component identifier.
    `java.lang.String` | `getModifierId()` | Returns the modifier Id.
    `java.lang.String` | `getModuleId()` | returns the module Id of the Relationship.
    `int` | `getRelationshipGroup()` | Returns the relationship group.
    `Concept` | `getSourceConcept()` | Returns the source Concept Id.
    `java.util.Date` | `getTime()` | returns the effective time of the Relationship.
    `Concept` | `getType()` |
    `int` | `hashCode()` |
    `boolean` | `isConcreteRelationship()` |
    `void` | `setActiveStatus​(java.lang.Byte activeStatus)` | sets the Relationship status.
    `void` | `setCharacteristicTypeId​(EnumCharacteristicType characteristicTypeId)` | Sets the characteristic type.
    `void` | `setConcreteRelationship​(boolean isConcreteRelationship)` |
    `void` | `setDestinationConcept​(Concept destinationConcept)` | Sets the destination Concept Id.
    `void` | `setId​(java.lang.String id)` | sets the Id of the relationship.
    `void` | `setModifierId​(EnumModifier modifierId)` | Sets the modifier Id.
    `void` | `setModuleId​(java.lang.String modId)` | sets the module Id of the Relationship.
    `void` | `setRelationshipGroup​(int relationshipGroup)` | Sets the relationship group.
    `void` | `setSourceConcept​(Concept sourceConcept)` | Sets the source Concept Id.
    `void` | `setTime​(java.util.Date date)` | sets the effective time.
    `void` | `setType​(Concept type)` | Sets the type of the `Relationship`.

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Relationship

          public Relationship​(java.lang.String id,
                              java.util.Date effTime,
                              java.lang.Byte status,
                              java.lang.String modId,
                              Concept sourceConcept,
                              Concept destinationConcept,
                              int relationshipGroup,
                              Concept type,
                              EnumCharacteristicType characteristicTypeId,
                              EnumModifier modifierId,
                              boolean isConcreteRelationship)

      Parameterized constructor.
      Parameters:
        `id` - Id of the particular SNOMED CT relationship.
        `effTime` - Effective time associated with the Relationship.
        `status` - Active status of the relationship (0 or 1).
        `modId` - represents module Id.
        `sourceId` - Id of the source concept.
        `destinationId` - Id of the destination concept.
        `relationshipGroup` - Integer value that groups together the relationships that are logically associated.
        `typeId` - represents type of relationship.
        `characteristicTypeId` - specifies the characteristic type.
        `modifierId` - specifies the modifier Id.

  - ### Method Detail

    - #### isConcreteRelationship

          public boolean isConcreteRelationship()

    - #### setConcreteRelationship

          public void setConcreteRelationship​(boolean isConcreteRelationship)

    - #### getId

          public java.lang.String getId()

      Description copied from class: `Component`
      Returns the component identifier.
      Overrides:
        `getId` in class `Component`
      Returns:
        a unique identifier for this relationship.

    - #### setId

          public void setId​(java.lang.String id)

      sets the Id of the relationship.
      Overrides:
        `setId` in class `Component`
      Parameters:
        `id` - represents Component id.

    - #### getActiveStatus

          public java.lang.Byte getActiveStatus()

      Retrieves the status of the Relationship.
      Overrides:
        `getActiveStatus` in class `VersionedComponent`
      Returns:
        activeStatus of a component

    - #### setActiveStatus

          public void setActiveStatus​(java.lang.Byte activeStatus)

      sets the Relationship status.
      Overrides:
        `setActiveStatus` in class `VersionedComponent`
      Parameters:
        `activeStatus` - represents active Status of the component

    - #### getModuleId

          public java.lang.String getModuleId()

      returns the module Id of the Relationship.
      Overrides:
        `getModuleId` in class `VersionedComponent`
      Returns:
        module Id of a component

    - #### setModuleId

          public void setModuleId​(java.lang.String modId)

      sets the module Id of the Relationship.
      Overrides:
        `setModuleId` in class `VersionedComponent`
      Parameters:
        `modId` - represents module Id of a component

    - #### getTime

          public java.util.Date getTime()

      returns the effective time of the Relationship.
      Overrides:
        `getTime` in class `VersionedComponent`
      Returns:
        effective time of that component

    - #### setTime

          public void setTime​(java.util.Date date)

      sets the effective time.
      Overrides:
        `setTime` in class `VersionedComponent`
      Parameters:
        `date` - - represents effective time

    - #### getSourceConcept

          public Concept getSourceConcept()

      Returns the source Concept Id.
      Returns:
        the identifier of the source `Concept` of this relationship.

    - #### setSourceConcept

          public void setSourceConcept​(Concept sourceConcept)

      Sets the source Concept Id.
      Parameters:
        `sourceConcept` - Id of the source concept.

    - #### getDestinationConcept

          public Concept getDestinationConcept()

      Returns the destination Concept Id.
      Returns:
        the destination concept of this relationship.

    - #### setDestinationConcept

          public void setDestinationConcept​(Concept destinationConcept)

      Sets the destination Concept Id.
      Parameters:
        `destinationConcept` - destination Concept.

    - #### setType

          public void setType​(Concept type)

      Sets the type of the `Relationship`.
      Parameters:
        `type` - represents the Relationship type.

    - #### getType

          public Concept getType()

      Returns:
        `EnumRelationshipType` the type of this relationship.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals​(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### getRelationshipGroup

          public int getRelationshipGroup()

      Returns the relationship group.
      Returns:
        relationship group to which the particular `Relationship` belongs.

    - #### setRelationshipGroup

          public void setRelationshipGroup​(int relationshipGroup)

      Sets the relationship group.
      Parameters:
        `relationshipGroup` - integer value that represents a group of relationships logically associated with one another.

    - #### getCharacteristicTypeId

          public java.lang.String getCharacteristicTypeId()

      Returns the characteristic type.
      Returns:
        characteristic type Id associated with the `Relationship`.

    - #### setCharacteristicTypeId

          public void setCharacteristicTypeId​(EnumCharacteristicType characteristicTypeId)

      Sets the characteristic type.
      Parameters:
        `characteristicTypeId` - specifies the characteristic type.

    - #### getModifierId

          public java.lang.String getModifierId()

      Returns the modifier Id.
      Returns:
        modifier Id.

    - #### setModifierId

          public void setModifierId​(EnumModifier modifierId)

      Sets the modifier Id.
      Parameters:
        `modifierId` - the modifier Id.