2 * ============LICENSE_START=======================================================
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.aai.sparky.viewandinspect.entity;
23 import org.onap.aai.sparky.viewandinspect.config.VisualizationConfigs;
24 import org.onap.aai.sparky.viewandinspect.enumeration.NodeProcessingState;
29 public class NodeMeta {
31 private String className;
33 private boolean isSearchTarget;
35 private NodeDebug nodeDebug;
36 private boolean nodeIssue;
37 private boolean nodeValidated;
38 private long selfLinkResponseTimeInMs;
39 private long numInboundNeighbors;
40 private long numOutboundNeighbors;
42 private boolean atMaxDepth;
43 private boolean selfLinkResolved;
44 private boolean processingErrorOccurred;
45 private boolean neighborsProcessed;
46 private int nodeDepth;
47 private boolean hasNeighbors;
49 private NodeProcessingState processingState;
51 private VisualizationConfigs visualizationConfigs;
56 * Instantiates a new node meta.
58 public NodeMeta(VisualizationConfigs visualizationConfigs) {
59 this.isSearchTarget = false;
60 this.visualizationConfigs = visualizationConfigs;
63 if (this.visualizationConfigs.isVisualizationDebugEnabled()) {
64 nodeDebug = new NodeDebug();
66 this.numInboundNeighbors = 0;
67 this.numOutboundNeighbors = 0;
69 this.selfLinkResponseTimeInMs = 0;
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;
81 public boolean isAtMaxDepth() {
85 public void setAtMaxDepth(boolean atMaxDepth) {
86 this.atMaxDepth = atMaxDepth;
89 public boolean isSelfLinkResolved() {
90 return selfLinkResolved;
95 public NodeProcessingState getProcessingState() {
96 return processingState;
99 public void setProcessingState(NodeProcessingState processingState) {
100 this.processingState = processingState;
103 public void setSelfLinkResolved(boolean selfLinkResolved) {
104 this.selfLinkResolved = selfLinkResolved;
107 public boolean isProcessingErrorOccurred() {
108 return processingErrorOccurred;
111 public void setProcessingErrorOccurred(boolean processingErrorOccurred) {
112 this.processingErrorOccurred = processingErrorOccurred;
115 public boolean isHasNeighbors() {
119 public void setHasNeighbors(boolean hasNeighbors) {
120 this.hasNeighbors = hasNeighbors;
123 public boolean isNeighborsProcessed() {
124 return neighborsProcessed;
127 public void setNeighborsProcessed(boolean neighborsProcessed) {
128 this.neighborsProcessed = neighborsProcessed;
131 public int getNodeDepth() {
135 public void setNodeDepth(int nodeDepth) {
136 this.nodeDepth = nodeDepth;
139 public void setNodeDebug(NodeDebug nodeDebug) {
140 this.nodeDebug = nodeDebug;
143 public String getClassName() {
147 public long getNumInboundNeighbors() {
148 return numInboundNeighbors;
151 public void setNumInboundNeighbors(long numInboundNeighbors) {
152 this.numInboundNeighbors = numInboundNeighbors;
155 public long getNumOutboundNeighbors() {
156 return numOutboundNeighbors;
159 public void setNumOutboundNeighbors(long numOutboundNeighbors) {
160 this.numOutboundNeighbors = numOutboundNeighbors;
163 public NodeDebug getNodeDebug() {
167 public long getSelfLinkResponseTimeInMs() {
168 return selfLinkResponseTimeInMs;
171 public boolean isNodeIssue() {
175 public boolean isNodeValidated() {
176 return nodeValidated;
179 public boolean isSearchTarget() {
180 return isSearchTarget;
183 public void setClassName(String className) {
184 this.className = className;
187 public void setNodeIssue(boolean nodeIssue) {
188 this.nodeIssue = nodeIssue;
191 public void setNodeValidated(boolean nodeValidated) {
192 this.nodeValidated = nodeValidated;
195 public void setSearchTarget(boolean isSearchTarget) {
196 this.isSearchTarget = isSearchTarget;
199 public void setSelfLinkResponseTimeInMs(long selfLinkResponseTimeInMs) {
200 this.selfLinkResponseTimeInMs = selfLinkResponseTimeInMs;