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.VisualizationConfig;
26 import org.onap.aai.sparky.viewandinspect.enumeration.NodeProcessingState;
31 public class NodeMeta {
33 private String className;
35 private boolean isEnrichableNode;
36 private boolean isSearchTarget;
38 private NodeDebug nodeDebug;
39 private boolean nodeIssue;
40 private boolean nodeValidated;
41 private long selfLinkResponseTimeInMs;
42 private long numInboundNeighbors;
43 private long numOutboundNeighbors;
45 private boolean atMaxDepth;
46 private boolean selfLinkResolved;
47 private boolean processingErrorOccurred;
48 private boolean neighborsProcessed;
49 private int nodeDepth;
50 private boolean hasNeighbors;
52 private NodeProcessingState processingState;
55 * Instantiates a new node meta.
58 this.isSearchTarget = false;
59 this.isEnrichableNode = false;
61 if (VisualizationConfig.getConfig().isVisualizationDebugEnabled()) {
62 nodeDebug = new NodeDebug();
64 this.numInboundNeighbors = 0;
65 this.numOutboundNeighbors = 0;
67 this.selfLinkResponseTimeInMs = 0;
69 this.atMaxDepth = false;
70 this.selfLinkResolved = false;
71 this.processingErrorOccurred = false;
72 this.hasNeighbors = false;
73 this.neighborsProcessed = false;
74 this.nodeDepth = ActiveInventoryNode.DEFAULT_INIT_NODE_DEPTH;
75 this.processingState = NodeProcessingState.INIT;
79 public boolean isAtMaxDepth() {
83 public void setAtMaxDepth(boolean atMaxDepth) {
84 this.atMaxDepth = atMaxDepth;
87 public boolean isSelfLinkResolved() {
88 return selfLinkResolved;
93 public NodeProcessingState getProcessingState() {
94 return processingState;
97 public void setProcessingState(NodeProcessingState processingState) {
98 this.processingState = processingState;
101 public void setSelfLinkResolved(boolean selfLinkResolved) {
102 this.selfLinkResolved = selfLinkResolved;
105 public boolean isProcessingErrorOccurred() {
106 return processingErrorOccurred;
109 public void setProcessingErrorOccurred(boolean processingErrorOccurred) {
110 this.processingErrorOccurred = processingErrorOccurred;
113 public boolean isHasNeighbors() {
117 public void setHasNeighbors(boolean hasNeighbors) {
118 this.hasNeighbors = hasNeighbors;
121 public boolean isNeighborsProcessed() {
122 return neighborsProcessed;
125 public void setNeighborsProcessed(boolean neighborsProcessed) {
126 this.neighborsProcessed = neighborsProcessed;
129 public int getNodeDepth() {
133 public void setNodeDepth(int nodeDepth) {
134 this.nodeDepth = nodeDepth;
137 public void setNodeDebug(NodeDebug nodeDebug) {
138 this.nodeDebug = nodeDebug;
141 public String getClassName() {
145 public long getNumInboundNeighbors() {
146 return numInboundNeighbors;
149 public void setNumInboundNeighbors(long numInboundNeighbors) {
150 this.numInboundNeighbors = numInboundNeighbors;
153 public long getNumOutboundNeighbors() {
154 return numOutboundNeighbors;
157 public void setNumOutboundNeighbors(long numOutboundNeighbors) {
158 this.numOutboundNeighbors = numOutboundNeighbors;
161 public NodeDebug getNodeDebug() {
165 public long getSelfLinkResponseTimeInMs() {
166 return selfLinkResponseTimeInMs;
169 public boolean isEnrichableNode() {
170 return isEnrichableNode;
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 setEnrichableNode(boolean isEnrichableNode) {
190 this.isEnrichableNode = isEnrichableNode;
193 public void setNodeIssue(boolean nodeIssue) {
194 this.nodeIssue = nodeIssue;
197 public void setNodeValidated(boolean nodeValidated) {
198 this.nodeValidated = nodeValidated;
201 public void setSearchTarget(boolean isSearchTarget) {
202 this.isSearchTarget = isSearchTarget;
205 public void setSelfLinkResponseTimeInMs(long selfLinkResponseTimeInMs) {
206 this.selfLinkResponseTimeInMs = selfLinkResponseTimeInMs;