
## Diagram

![<%- data.name %>](../img/<%- data._id %>.png)



### Name

<% if (data.name) { %>
<%- data.name %>
<% } %>

### Description

<% if (data.description) { %>
<%- data.description %>
<% } %>


### Reference(s)

<% if (data.reference) { %>
    <% data.reference.forEach(reference => { %>
        <% if (reference.name && reference.url) { %>
[<%- reference.name %>](<%- reference.url %>)
        <% } else { %>
[<%- reference.url %>](<%- reference.url %>)
         <% } %>
    <% }) %>
<% } %>


## Element

[Expand all](#){ .md-button .diff-line }


### Actor

<% if (data.actors) { %>
    <% data.actors.forEach(function(ele){ %>

<details markdown=1>
<summary markdown="span"><%- ele.name %></summary>

<table>
    <caption></caption>
    <thead>
        <tr>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tr>
        <td> <strong>Name</strong> </td>
        <td><%- ele.name %></td>
    </tr>
    <tr>
        <td> <strong>Description</strong> </td>
        <td><%- ele.description %></td>
    </tr>
    <tr>
        <td> <strong>Type</strong> </td>
        <td><%- ele.type %></td>
    </tr>
    <tr>
        <td> <strong>Generic Group</strong> </td>
<td>
        <% if (data.genericGroup && data.genericGroup[ele._id]) { %>
                <% data.genericGroup[ele._id].forEach(gg=> { %>
                <div><strong><%- gg.category %>,<%- gg.name %></strong>[<%- gg.type %>]</div>
                <div><%- gg.description %></div>
                <% }) %>
                <% } %>
</td>
    </tr>
</table>


</details>


    <% }); %>
<% } %>



### Subsystem

<% if (data.subSystems) { %>
    <% data.subSystems.forEach(function(ele){ %>

<details markdown=1>
<summary markdown="span"><%- ele.name %></summary>

<table>
    <caption></caption>
    <thead>
        <tr>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tr>
        <td> <strong>Name</strong> </td>
        <td><%- ele.name %></td>
    </tr>
    <tr>
        <td> <strong>Description</strong> </td>
        <td><%- ele.description %></td>
    </tr>
    <% if (ele.subDiagramID) { %>
    <tr>
        <td> <strong>Sub-Diagram</strong> </td>
        <% if (data.subInfo && data.subInfo[ele.subDiagramID]) { %>
        <td><a href="../../<%- data.subInfo[ele.subDiagramID].artifactTypeName %>/<%- data.subInfo[ele.subDiagramID]._id %>">
                <%- ele.subDiagramId %>
        </a></td>
        <% } else { %>
        <td>
            <%- ele.subDiagramId %>
        </td>
        <% } %>
        
    </tr>
    <% } %>
</table>


</details>


    <% }); %>
<% } %>



### Location

<% if (data.locations) { %>
    <% data.locations.forEach(function(ele){ %>

<details markdown=1>
<summary markdown="span"><%- ele.name %></summary>

<table>
    <caption></caption>
    <thead>
        <tr>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tr>
        <td> <strong>Name</strong> </td>
        <td><%- ele.name %></td>
    </tr>
    <tr>
        <td> <strong>Description</strong> </td>
        <td><%- ele.description %></td>
    </tr>
</table>


</details>


    <% }); %>
<% } %>



### Logical Connection

<% if (data.logicalConnections) { %>
    <% data.logicalConnections.forEach(function(ele){ %>

<details markdown=1>
<summary markdown="span"><%- ele.name %></summary>

<table>
    <caption></caption>
    <thead>
        <tr>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tr>
        <td> <strong>Name</strong> </td>
        <td><%- ele.name %></td>
    </tr>
    <tr>
        <td> <strong>Description</strong> </td>
        <td><%- ele.description %></td>
    </tr>
</table>


</details>


    <% }); %>
<% } %>


### Logical Node

<% if (data.logicalNodes) { %>
    <% data.logicalNodes.forEach(function(ele){ %>

<details markdown=1>
<summary markdown="span"><%- ele.name %></summary>

<table>
    <caption></caption>
    <thead>
        <tr>
            <th></th>
            <th></th>
        </tr>
    </thead>
    <tr>
        <td> <strong>Name</strong> </td>
        <td><%- ele.name %></td>
    </tr>
    <tr>
        <td> <strong>Description</strong> </td>
        <td><%- ele.description %></td>
    </tr>
    <tr>
        <td> <strong>Type</strong> </td>
        <td><%- ele.type %></td>
    </tr>
    <tr>
        <td> <strong>Primary Capability</strong> </td>
        <td><% if (data.logicalNodesList && data.logicalNodesList[ele.name]) { %>
            <% data.logicalNodesList[ele.name].taxonomies.forEach(gg=> { %>
                <div><%- gg %></div>
            <% }) %>
        <% } %></td>
    </tr>
    <tr>
        <td> <strong>Implementation</strong> </td>
        <td><% if (data.logicalNodesList && data.logicalNodesList[ele.name]) { %>
            <% data.logicalNodesList[ele.name].physicalComponents.forEach(gg=> { %>
                <div><a href="<%- gg.url %>"><%- gg.name %></a></div>
            <% }) %>
        <% } %></td>
    </tr>
    <tr>
        <td> <strong>Architectural Decision</strong> </td>
        <td><% if (data.logicalNodesList && data.logicalNodesList[ele.name]) { %>
            <% data.logicalNodesList[ele.name].architecturalDecisions.forEach(gg=> { %>
                <div><a href="../../Architectural Decisions/<%- gg._id %>"><%- gg.name %></a></div>
            <% }) %>
        <% } %></td>
    </tr>
    <tr>
        <td> <strong>Non Functional Requirement</strong> </td>
        <td><% if (data.logicalNodesList && data.logicalNodesList[ele.name]) { %>
            <% data.logicalNodesList[ele.name].nonFunctionalRequirements.forEach(gg=> { %>
                <div><a href="../../Non Functional Requirements/<%- gg._id %>"><%- gg.name %></a></div>
            <% }) %>
        <% } %></td>
    </tr>
    <tr>
        <td> <strong>Generic Group</strong> </td>
        <td><% if (data.genericGroup && data.genericGroup[ele._id]) { %>
                <% data.genericGroup[ele._id].forEach(gg=> { %>
                <div><strong><%- gg.category %>,<%- gg.name %></strong>[<%- gg.type %>]</div>
                <div><%- gg.description %></div>
                <% }) %>
            <% } %></td>
    </tr>
    <tr>
        <td> <strong>Sub-level Diagram</strong> </td>
        <td><% if (data.logicalNodesList && data.logicalNodesList[ele.name]  && data.logicalNodesList[ele.name].subLevelDiagram) { %>
            <% data.logicalNodesList[ele.name].subLevelDiagram.forEach(gg=> { %>
                <div><a href="../../Sub-level Diagram/<%- gg._id %>"><%- gg.name %></a></div>
            <% }) %>
        <% } %></td>
    </tr>
    <tr>
        <td> <strong>Related Diagrams</strong> </td>
        <td><% if (data.diagramRelation && data.diagramRelation[ele._id] && data.diagramRelation[ele._id].diagram) { %>
            <% data.diagramRelation[ele._id].diagram.forEach(gg=> { %>
                <div><a href="../../<%- gg.artifactTypeName %>/<%- gg.properties._id %>"><%- gg.properties.name %></a></div>
            <% }) %>
        <% } %></td>
    </tr>
    <tr>
        <td> <strong>Related Elements</strong> </td>
        <td><% if (data.elementRelation && data.elementRelation[ele._id] && data.elementRelation[ele._id].parentNodes && data.elementRelation[ele._id].childNodes) { %>
            <% data.elementRelation[ele._id].parentNodes.forEach(gg=> { %>
                <div><%- gg.properties.name %></div>
                <% if (gg.properties._id && data.diagramRelation && data.diagramRelation[gg.properties._id]) { %>
                    <% data.diagramRelation[gg.properties._id].diagram.forEach(dia => { %>
                    <li><a href="../../<%- dia.artifactTypeName %>/<%- dia.properties._id %>"><%- dia.properties.name %></a></li>
                    <% }) %>
                <% } %>
            <% }) %>
            <% data.elementRelation[ele._id].childNodes.forEach(gg=> { %>
                <div><%- gg.properties.name %></div>
                <% if (gg.properties._id && data.diagramRelation && data.diagramRelation[gg.properties._id]) { %>
                    <% data.diagramRelation[gg.properties._id].diagram.forEach(dia => { %>
                    <li><div><a href="../../<%- dia.artifactTypeName %>/<%- dia.properties._id %>"><%- dia.properties.name %></a></div></li>
                    <% }) %>
                <% } %>
            <% }) %>
        <% } %></td>
    </tr>
    <% if (ele.subDiagramID) { %>
    <tr>
        <td> <strong>Sub-Diagram</strong> </td>
        <% if (data.subInfo && data.subInfo[ele.subDiagramID]) { %>
        <td><a href="../../<%- data.subInfo[ele.subDiagramID].artifactTypeName %>/<%- data.subInfo[ele.subDiagramID]._id %>">
                <%- ele.subDiagramId %>
        </a></td>
        <% } else { %>
        <td>
            <%- ele.subDiagramId %>
        </td>
        <% } %>
        
    </tr>
    <% } %>
</table>


</details>


    <% }); %>
<% } %>


