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