Adding interfaces in documentation
[aai/sparky-be.git] / sparkybe-onap-service / src / main / java / org / onap / aai / 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 package org.onap.aai.sparky.viewandinspect.entity;
26
27 import org.onap.aai.sparky.viewandinspect.config.VisualizationConfigs;
28 import org.onap.aai.sparky.viewandinspect.enumeration.NodeProcessingState;
29
30 /**
31  * The Class NodeMeta.
32  */
33 public class NodeMeta {
34
35   private String className;
36
37   private boolean isSearchTarget;
38
39   private NodeDebug nodeDebug;
40   private boolean nodeIssue;
41   private boolean nodeValidated;
42   private long selfLinkResponseTimeInMs;
43   private long numInboundNeighbors;
44   private long numOutboundNeighbors;
45
46   private boolean atMaxDepth;
47   private boolean selfLinkResolved;
48   private boolean processingErrorOccurred;
49   private boolean neighborsProcessed;
50   private int nodeDepth;
51   private boolean hasNeighbors;
52
53   private NodeProcessingState processingState;
54
55   private VisualizationConfigs visualizationConfigs;
56   
57   
58
59   /**
60    * Instantiates a new node meta.
61    */
62   public NodeMeta(VisualizationConfigs visualizationConfigs) {
63     this.isSearchTarget = false;
64     this.visualizationConfigs = visualizationConfigs; 
65     
66
67     if (this.visualizationConfigs.isVisualizationDebugEnabled()) {
68       nodeDebug = new NodeDebug();
69     }
70     this.numInboundNeighbors = 0;
71     this.numOutboundNeighbors = 0;
72
73     this.selfLinkResponseTimeInMs = 0;
74
75     this.atMaxDepth = false;
76     this.selfLinkResolved = false;
77     this.processingErrorOccurred = false;
78     this.hasNeighbors = false;
79     this.neighborsProcessed = false;
80     this.nodeDepth = ActiveInventoryNode.DEFAULT_INIT_NODE_DEPTH;
81     this.processingState = NodeProcessingState.INIT;
82
83   }
84
85   public boolean isAtMaxDepth() {
86     return atMaxDepth;
87   }
88
89   public void setAtMaxDepth(boolean atMaxDepth) {
90     this.atMaxDepth = atMaxDepth;
91   }
92
93   public boolean isSelfLinkResolved() {
94     return selfLinkResolved;
95   }
96
97
98
99   public NodeProcessingState getProcessingState() {
100     return processingState;
101   }
102
103   public void setProcessingState(NodeProcessingState processingState) {
104     this.processingState = processingState;
105   }
106
107   public void setSelfLinkResolved(boolean selfLinkResolved) {
108     this.selfLinkResolved = selfLinkResolved;
109   }
110
111   public boolean isProcessingErrorOccurred() {
112     return processingErrorOccurred;
113   }
114
115   public void setProcessingErrorOccurred(boolean processingErrorOccurred) {
116     this.processingErrorOccurred = processingErrorOccurred;
117   }
118
119   public boolean isHasNeighbors() {
120     return hasNeighbors;
121   }
122
123   public void setHasNeighbors(boolean hasNeighbors) {
124     this.hasNeighbors = hasNeighbors;
125   }
126
127   public boolean isNeighborsProcessed() {
128     return neighborsProcessed;
129   }
130
131   public void setNeighborsProcessed(boolean neighborsProcessed) {
132     this.neighborsProcessed = neighborsProcessed;
133   }
134
135   public int getNodeDepth() {
136     return nodeDepth;
137   }
138
139   public void setNodeDepth(int nodeDepth) {
140     this.nodeDepth = nodeDepth;
141   }
142
143   public void setNodeDebug(NodeDebug nodeDebug) {
144     this.nodeDebug = nodeDebug;
145   }
146
147   public String getClassName() {
148     return className;
149   }
150
151   public long getNumInboundNeighbors() {
152     return numInboundNeighbors;
153   }
154
155   public void setNumInboundNeighbors(long numInboundNeighbors) {
156     this.numInboundNeighbors = numInboundNeighbors;
157   }
158
159   public long getNumOutboundNeighbors() {
160     return numOutboundNeighbors;
161   }
162
163   public void setNumOutboundNeighbors(long numOutboundNeighbors) {
164     this.numOutboundNeighbors = numOutboundNeighbors;
165   }
166
167   public NodeDebug getNodeDebug() {
168     return nodeDebug;
169   }
170
171   public long getSelfLinkResponseTimeInMs() {
172     return selfLinkResponseTimeInMs;
173   }
174
175   public boolean isNodeIssue() {
176     return nodeIssue;
177   }
178
179   public boolean isNodeValidated() {
180     return nodeValidated;
181   }
182
183   public boolean isSearchTarget() {
184     return isSearchTarget;
185   }
186
187   public void setClassName(String className) {
188     this.className = className;
189   }
190
191   public void setNodeIssue(boolean nodeIssue) {
192     this.nodeIssue = nodeIssue;
193   }
194
195   public void setNodeValidated(boolean nodeValidated) {
196     this.nodeValidated = nodeValidated;
197   }
198
199   public void setSearchTarget(boolean isSearchTarget) {
200     this.isSearchTarget = isSearchTarget;
201   }
202
203   public void setSelfLinkResponseTimeInMs(long selfLinkResponseTimeInMs) {
204     this.selfLinkResponseTimeInMs = selfLinkResponseTimeInMs;
205   }
206
207 }