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

## Class ComponentFactory

- java.lang.Object
- - in.cdac.medinfo.csnotk.csnolib.model.ComponentFactory

-     public class ComponentFactory
      extends java.lang.Object

  Factory class to generate Components using the `getComponent()` method.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `VersionedComponent` | `getComponent​(EnumComponent componentType, java.lang.String id)` | Function to return the object of the desired Component type.
    `static ComponentFactory` | `getInstance()` | Static function to return the instance of `ComponentFactory` class.

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

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getComponent

          public VersionedComponent getComponent​(EnumComponent componentType,
                                                 java.lang.String id)

      Function to return the object of the desired Component type.
      Parameters:
        `componentType` - `EnumComponent` value that represents the type of the Component whose object has to be created.
        `id` - represents the Component Id
      Returns:
        `VersionedComponent` It can be an object of `Concept` class or `Description` class or `Relationship` class.

    - #### getInstance

          public static ComponentFactory getInstance()

      Static function to return the instance of `ComponentFactory` class.
      Returns:
        instance of `ComponentFactory` class.