2 * ============LICENSE_START===================================================
3 * SPARKY (AAI UI service)
4 * ============================================================================
5 * Copyright © 2017 AT&T Intellectual Property.
6 * Copyright © 2017 Amdocs
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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=====================================================
22 * ECOMP and OpenECOMP are trademarks
23 * and service marks of AT&T Intellectual Property.
25 package org.onap.aai.sparky.viewandinspect.entity;
27 import org.onap.aai.sparky.viewandinspect.config.VisualizationConfigs;
28 import org.onap.aai.sparky.viewandinspect.enumeration.NodeProcessingState;
33 public class NodeMeta {
35 private String className;
37 private boolean isSearchTarget;
39 private NodeDebug nodeDebug;
40 private boolean nodeIssue;
41 private boolean nodeValidated;
42 private long selfLinkResponseTimeInMs;
43 private long numInboundNeighbors;
44 private long numOutboundNeighbors;
46 private boolean atMaxDepth;
47 private boolean selfLinkResolved;
48 private boolean processingErrorOccurred;
49 private boolean neighborsProcessed;
50 private int nodeDepth;
51 private boolean hasNeighbors;
53 private NodeProcessingState processingState;
55 private VisualizationConfigs visualizationConfigs;
60 * Instantiates a new node meta.
62 public NodeMeta(VisualizationConfigs visualizationConfigs) {
63 this.isSearchTarget = false;
64 this.visualizationConfigs = visualizationConfigs;
67 if (this.visualizationConfigs.isVisualizationDebugEnabled()) {
68 nodeDebug = new NodeDebug();
70 this.numInboundNeighbors = 0;
71 this.numOutboundNeighbors = 0;
73 this.selfLinkResponseTimeInMs = 0;
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;
85 public boolean isAtMaxDepth() {
89 public void setAtMaxDepth(boolean atMaxDepth) {
90 this.atMaxDepth = atMaxDepth;
93 public boolean isSelfLinkResolved() {
94 return selfLinkResolved;
99 public NodeProcessingState getProcessingState() {
100 return processingState;
103 public void setProcessingState(NodeProcessingState processingState) {
104 this.processingState = processingState;
107 public void setSelfLinkResolved(boolean selfLinkResolved) {
108 this.selfLinkResolved = selfLinkResolved;
111 public boolean isProcessingErrorOccurred() {
112 return processingErrorOccurred;
115 public void setProcessingErrorOccurred(boolean processingErrorOccurred) {
116 this.processingErrorOccurred = processingErrorOccurred;
119 public boolean isHasNeighbors() {
123 public void setHasNeighbors(boolean hasNeighbors) {
124 this.hasNeighbors = hasNeighbors;
127 public boolean isNeighborsProcessed() {
128 return neighborsProcessed;
131 public void setNeighborsProcessed(boolean neighborsProcessed) {
132 this.neighborsProcessed = neighborsProcessed;
135 public int getNodeDepth() {
139 public void setNodeDepth(int nodeDepth) {
140 this.nodeDepth = nodeDepth;
143 public void setNodeDebug(NodeDebug nodeDebug) {
144 this.nodeDebug = nodeDebug;
147 public String getClassName() {
151 public long getNumInboundNeighbors() {
152 return numInboundNeighbors;
155 public void setNumInboundNeighbors(long numInboundNeighbors) {
156 this.numInboundNeighbors = numInboundNeighbors;
159 public long getNumOutboundNeighbors() {
160 return numOutboundNeighbors;
163 public void setNumOutboundNeighbors(long numOutboundNeighbors) {
164 this.numOutboundNeighbors = numOutboundNeighbors;
167 public NodeDebug getNodeDebug() {
171 public long getSelfLinkResponseTimeInMs() {
172 return selfLinkResponseTimeInMs;
175 public boolean isNodeIssue() {
179 public boolean isNodeValidated() {
180 return nodeValidated;
183 public boolean isSearchTarget() {
184 return isSearchTarget;
187 public void setClassName(String className) {
188 this.className = className;
191 public void setNodeIssue(boolean nodeIssue) {
192 this.nodeIssue = nodeIssue;
195 public void setNodeValidated(boolean nodeValidated) {
196 this.nodeValidated = nodeValidated;
199 public void setSearchTarget(boolean isSearchTarget) {
200 this.isSearchTarget = isSearchTarget;
203 public void setSelfLinkResponseTimeInMs(long selfLinkResponseTimeInMs) {
204 this.selfLinkResponseTimeInMs = selfLinkResponseTimeInMs;