2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright © 2017 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 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 package org.onap.aai.sparky.viewandinspect.entity;
25 import org.onap.aai.sparky.viewandinspect.config.VisualizationConfigs;
26 import org.onap.aai.sparky.viewandinspect.enumeration.NodeProcessingState;
31 public class NodeMeta {
33 private String className;
35 private boolean isSearchTarget;
37 private NodeDebug nodeDebug;
38 private boolean nodeIssue;
39 private boolean nodeValidated;
40 private long selfLinkResponseTimeInMs;
41 private long numInboundNeighbors;
42 private long numOutboundNeighbors;
44 private boolean atMaxDepth;
45 private boolean selfLinkResolved;
46 private boolean processingErrorOccurred;
47 private boolean neighborsProcessed;
48 private int nodeDepth;
49 private boolean hasNeighbors;
51 private NodeProcessingState processingState;
53 private VisualizationConfigs visualizationConfigs;
58 * Instantiates a new node meta.
60 public NodeMeta(VisualizationConfigs visualizationConfigs) {
61 this.isSearchTarget = false;
62 this.visualizationConfigs = visualizationConfigs;
65 if (this.visualizationConfigs.isVisualizationDebugEnabled()) {
66 nodeDebug = new NodeDebug();
68 this.numInboundNeighbors = 0;
69 this.numOutboundNeighbors = 0;
71 this.selfLinkResponseTimeInMs = 0;
73 this.atMaxDepth = false;
74 this.selfLinkResolved = false;
75 this.processingErrorOccurred = false;
76 this.hasNeighbors = false;
77 this.neighborsProcessed = false;
78 this.nodeDepth = ActiveInventoryNode.DEFAULT_INIT_NODE_DEPTH;
79 this.processingState = NodeProcessingState.INIT;
83 public boolean isAtMaxDepth() {
87 public void setAtMaxDepth(boolean atMaxDepth) {
88 this.atMaxDepth = atMaxDepth;
91 public boolean isSelfLinkResolved() {
92 return selfLinkResolved;
97 public NodeProcessingState getProcessingState() {
98 return processingState;
101 public void setProcessingState(NodeProcessingState processingState) {
102 this.processingState = processingState;
105 public void setSelfLinkResolved(boolean selfLinkResolved) {
106 this.selfLinkResolved = selfLinkResolved;
109 public boolean isProcessingErrorOccurred() {
110 return processingErrorOccurred;
113 public void setProcessingErrorOccurred(boolean processingErrorOccurred) {
114 this.processingErrorOccurred = processingErrorOccurred;
117 public boolean isHasNeighbors() {
121 public void setHasNeighbors(boolean hasNeighbors) {
122 this.hasNeighbors = hasNeighbors;
125 public boolean isNeighborsProcessed() {
126 return neighborsProcessed;
129 public void setNeighborsProcessed(boolean neighborsProcessed) {
130 this.neighborsProcessed = neighborsProcessed;
133 public int getNodeDepth() {
137 public void setNodeDepth(int nodeDepth) {
138 this.nodeDepth = nodeDepth;
141 public void setNodeDebug(NodeDebug nodeDebug) {
142 this.nodeDebug = nodeDebug;
145 public String getClassName() {
149 public long getNumInboundNeighbors() {
150 return numInboundNeighbors;
153 public void setNumInboundNeighbors(long numInboundNeighbors) {
154 this.numInboundNeighbors = numInboundNeighbors;
157 public long getNumOutboundNeighbors() {
158 return numOutboundNeighbors;
161 public void setNumOutboundNeighbors(long numOutboundNeighbors) {
162 this.numOutboundNeighbors = numOutboundNeighbors;
165 public NodeDebug getNodeDebug() {
169 public long getSelfLinkResponseTimeInMs() {
170 return selfLinkResponseTimeInMs;
173 public boolean isNodeIssue() {
177 public boolean isNodeValidated() {
178 return nodeValidated;
181 public boolean isSearchTarget() {
182 return isSearchTarget;
185 public void setClassName(String className) {
186 this.className = className;
189 public void setNodeIssue(boolean nodeIssue) {
190 this.nodeIssue = nodeIssue;
193 public void setNodeValidated(boolean nodeValidated) {
194 this.nodeValidated = nodeValidated;
197 public void setSearchTarget(boolean isSearchTarget) {
198 this.isSearchTarget = isSearchTarget;
201 public void setSelfLinkResponseTimeInMs(long selfLinkResponseTimeInMs) {
202 this.selfLinkResponseTimeInMs = selfLinkResponseTimeInMs;