org.thewonderlemming.c4plantuml.graphml.model

## Class NodeModel

- java.lang.Object
- - org.thewonderlemming.c4plantuml.graphml.model.NodeModel

-     public class NodeModel
      extends Object

  The <node> part of the representation of a GraphML stream.

  It is based on JAXB.

  Author:
    thewonderlemming

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `TAG_NAME` The current model XML tag name.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addOrReplaceData(DataModel data)` Adds the given `DataModel` to the list if its `DataModel.getKey()` is not already there or replaces it else.
    `static WithId<String,WithData<Build<NodeModel>>>` | `builder()` A builder to the current `NodeModel` class.
    `List<DataModel>` | `getData()` Returns the current <node> data tags.
    `GraphModel` | `getGraph()` Returns the current <node> inner graph.
    `String` | `getId()` Returns the current <node> ID.
    `void` | `setDescription(String description)` Sets a <data> tag of type `C4Keys.DESCRIPTION` and with the given value.
    `void` | `setEntityType(EntityType entityType)` Sets a <data> tag of type `C4Keys.ENTITY_TYPE` and with the given value.
    `void` | `setGraph(GraphModel graph)` Sets a child <graph> into the current <node>.
    `void` | `setId(String id)` Sets the current <node> `id` attribute.
    `void` | `setName(String name)` Sets a <data> tag of type `C4Keys.NAME` and with the given value.
    `void` | `setTechnologicalStack(String technologicalStack)` Sets a <data> tag of type `C4Keys.TECHNOLOGICAL_STACK` and with the given value.

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

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

- - ### Field Detail

    - #### TAG_NAME

          public static final String TAG_NAME

      The current model XML tag name.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### builder

          public static WithId<String,WithData<Build<NodeModel>>> builder()

      A builder to the current `NodeModel` class.
      Returns:
        a new `NodeModel` instance.

    - #### addOrReplaceData

          public void addOrReplaceData(DataModel data)

      Adds the given `DataModel` to the list if its `DataModel.getKey()` is not already there or replaces it else.
      Parameters:
        `data` - the given `DataModel` to add/replace.

    - #### getData

          public List<DataModel> getData()

      Returns the current <node> data tags.
      Returns:
        the node data tags.

    - #### getGraph

          public GraphModel getGraph()

      Returns the current <node> inner graph.
      Returns:
        the node inner graph.

    - #### getId

          public String getId()

      Returns the current <node> ID.
      Returns:
        the node ID.

    - #### setDescription

          public void setDescription(String description)

      Sets a <data> tag of type `C4Keys.DESCRIPTION` and with the given value.
      Parameters:
        `description` - the data value to set.

    - #### setEntityType

          public void setEntityType(EntityType entityType)

      Sets a <data> tag of type `C4Keys.ENTITY_TYPE` and with the given value.
      Parameters:
        `entityType` - the data value to set.

    - #### setGraph

          public void setGraph(GraphModel graph)

      Sets a child <graph> into the current <node>.
      Parameters:
        `graph` - the graph to set.

    - #### setId

          public void setId(String id)

      Sets the current <node> `id` attribute.
      Parameters:
        `id` - the id to set.

    - #### setName

          public void setName(String name)

      Sets a <data> tag of type `C4Keys.NAME` and with the given value.
      Parameters:
        `name` - the data value to set.

    - #### setTechnologicalStack

          public void setTechnologicalStack(String technologicalStack)

      Sets a <data> tag of type `C4Keys.TECHNOLOGICAL_STACK` and with the given value.
      Parameters:
        `technologicalStack` - the data value to set.

Copyright © 2020. All rights reserved.