Initial commit for AAI-UI(sparky-backend)
[aai/sparky-be.git] / src / main / java / org / openecomp / sparky / viewandinspect / entity / NodeMeta.java
1 /**
2  * ============LICENSE_START===================================================
3  * SPARKY (AAI UI service)
4  * ============================================================================
5  * Copyright © 2017 AT&T Intellectual Property.
6  * Copyright © 2017 Amdocs
7  * All rights reserved.
8  * ============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=====================================================
21  *
22  * ECOMP and OpenECOMP are trademarks
23  * and service marks of AT&T Intellectual Property.
24  */
25
26 package org.openecomp.sparky.viewandinspect.entity;
27
28 import org.openecomp.sparky.viewandinspect.config.VisualizationConfig;
29 import org.openecomp.sparky.viewandinspect.enumeration.NodeProcessingState;
30
31 /**
32  * The Class NodeMeta.
33  */
34 public class NodeMeta {
35
36   private String className;
37
38   private boolean isEnrichableNode;
39   private boolean isSearchTarget;
40
41   private NodeDebug nodeDebug;
42   private boolean nodeIssue;
43   private boolean nodeValidated;
44   private long selfLinkResponseTimeInMs;
45   private long numInboundNeighbors;
46   private long numOutboundNeighbors;
47
48   private boolean atMaxDepth;
49   private boolean selfLinkResolved;
50   private boolean processingErrorOccurred;
51   private boolean neighborsProcessed;
52   private int nodeDepth;
53   private boolean hasNeighbors;
54
55   private NodeProcessingState processingState;
56
57   /**
58    * Instantiates a new node meta.
59    */
60   public NodeMeta() {
61     this.isSearchTarget = false;
62     this.isEnrichableNode = false;
63
64     if (VisualizationConfig.getConfig().isVisualizationDebugEnabled()) {
65       nodeDebug = new NodeDebug();
66     }
67     this.numInboundNeighbors = 0;
68     this.numOutboundNeighbors = 0;
69
70     this.selfLinkResponseTimeInMs = 0;
71
72     this.atMaxDepth = false;
73     this.selfLinkResolved = false;
74     this.processingErrorOccurred = false;
75     this.hasNeighbors = false;
76     this.neighborsProcessed = false;
77     this.nodeDepth = ActiveInventoryNode.DEFAULT_INIT_NODE_DEPTH;
78     this.processingState = NodeProcessingState.INIT;
79
80   }
81
82   public boolean isAtMaxDepth() {
83     return atMaxDepth;
84   }
85
86   public void setAtMaxDepth(boolean atMaxDepth) {
87     this.atMaxDepth = atMaxDepth;
88   }
89
90   public boolean isSelfLinkResolved() {
91     return selfLinkResolved;
92   }
93
94
95
96   public NodeProcessingState getProcessingState() {
97     return processingState;
98   }
99
100   public void setProcessingState(NodeProcessingState processingState) {
101     this.processingState = processingState;
102   }
103
104   public void setSelfLinkResolved(boolean selfLinkResolved) {
105     this.selfLinkResolved = selfLinkResolved;
106   }
107
108   public boolean isProcessingErrorOccurred() {
109     return processingErrorOccurred;
110   }
111
112   public void setProcessingErrorOccurred(boolean processingErrorOccurred) {
113     this.processingErrorOccurred = processingErrorOccurred;
114   }
115
116   public boolean isHasNeighbors() {
117     return hasNeighbors;
118   }
119
120   public void setHasNeighbors(boolean hasNeighbors) {
121     this.hasNeighbors = hasNeighbors;
122   }
123
124   public boolean isNeighborsProcessed() {
125     return neighborsProcessed;
126   }
127
128   public void setNeighborsProcessed(boolean neighborsProcessed) {
129     this.neighborsProcessed = neighborsProcessed;
130   }
131
132   public int getNodeDepth() {
133     return nodeDepth;
134   }
135
136   public void setNodeDepth(int nodeDepth) {
137     this.nodeDepth = nodeDepth;
138   }
139
140   public void setNodeDebug(NodeDebug nodeDebug) {
141     this.nodeDebug = nodeDebug;
142   }
143
144   public String getClassName() {
145     return className;
146   }
147
148   public long getNumInboundNeighbors() {
149     return numInboundNeighbors;
150   }
151
152   public void setNumInboundNeighbors(long numInboundNeighbors) {
153     this.numInboundNeighbors = numInboundNeighbors;
154   }
155
156   public long getNumOutboundNeighbors() {
157     return numOutboundNeighbors;
158   }
159
160   public void setNumOutboundNeighbors(long numOutboundNeighbors) {
161     this.numOutboundNeighbors = numOutboundNeighbors;
162   }
163
164   public NodeDebug getNodeDebug() {
165     return nodeDebug;
166   }
167
168   public long getSelfLinkResponseTimeInMs() {
169     return selfLinkResponseTimeInMs;
170   }
171
172   public boolean isEnrichableNode() {
173     return isEnrichableNode;
174   }
175
176   public boolean isNodeIssue() {
177     return nodeIssue;
178   }
179
180   public boolean isNodeValidated() {
181     return nodeValidated;
182   }
183
184   public boolean isSearchTarget() {
185     return isSearchTarget;
186   }
187
188   public void setClassName(String className) {
189     this.className = className;
190   }
191
192   public void setEnrichableNode(boolean isEnrichableNode) {
193     this.isEnrichableNode = isEnrichableNode;
194   }
195
196   public void setNodeIssue(boolean nodeIssue) {
197     this.nodeIssue = nodeIssue;
198   }
199
200   public void setNodeValidated(boolean nodeValidated) {
201     this.nodeValidated = nodeValidated;
202   }
203
204   public void setSearchTarget(boolean isSearchTarget) {
205     this.isSearchTarget = isSearchTarget;
206   }
207
208   public void setSelfLinkResponseTimeInMs(long selfLinkResponseTimeInMs) {
209     this.selfLinkResponseTimeInMs = selfLinkResponseTimeInMs;
210   }
211
212 }