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.config;
23 import java.util.ArrayList;
24 import java.util.Arrays;
26 import org.onap.aai.sparky.config.SparkyResourceLoader;
29 * The Class VisualizationConfig.
31 public class VisualizationConfigs {
33 private int maxSelfLinkTraversalDepth;
35 private boolean visualizationDebugEnabled;
37 private String aaiEntityNodeDescriptors;
39 private String generalNodeClassName;
41 private String searchNodeClassName;
43 private String selectedSearchedNodeClassName;
45 private int numOfThreadsToFetchNodeIntegrity;
47 private boolean makeAllNeighborsBidirectional;
49 private ArrayList<String> shallowEntities;
51 private SparkyResourceLoader resourceLoader;
54 * Instantiates a new visualization config.
56 public VisualizationConfigs() {}
58 public ArrayList<String> getShallowEntities() {
59 return shallowEntities;
62 public void setShallowEntities(ArrayList<String> shallowEntities) {
63 this.shallowEntities = shallowEntities;
66 public void setDelimitedShallowEntities(String delimitedShallowEntites) {
68 if (delimitedShallowEntites == null) {
69 this.shallowEntities = new ArrayList<>();
74 this.shallowEntities =
75 new ArrayList<String>(Arrays.asList(delimitedShallowEntites.split(",")));
76 } catch (Exception exc) {
77 this.shallowEntities = new ArrayList<>();
83 * Make all neighbors bidirectional.
85 * @return true, if successful
87 public boolean makeAllNeighborsBidirectional() {
88 return makeAllNeighborsBidirectional;
91 public void setMakeAllNeighborsBidirectional(boolean makeAllNeighborsBidirectional) {
92 this.makeAllNeighborsBidirectional = makeAllNeighborsBidirectional;
95 public String getSelectedSearchedNodeClassName() {
96 return selectedSearchedNodeClassName;
99 public void setSelectedSearchedNodeClassName(String selectedSearchedNodeClassName) {
100 this.selectedSearchedNodeClassName = selectedSearchedNodeClassName;
103 public String getGeneralNodeClassName() {
104 return generalNodeClassName;
107 public void setGeneralNodeClassName(String generalNodeClassName) {
108 this.generalNodeClassName = generalNodeClassName;
111 public String getSearchNodeClassName() {
112 return searchNodeClassName;
115 public void setSearchNodeClassName(String searchNodeClassName) {
116 this.searchNodeClassName = searchNodeClassName;
119 public String getAaiEntityNodeDescriptors() {
120 return aaiEntityNodeDescriptors;
123 public void setAaiEntityNodeDescriptors(String aaiEntityNodeDescriptors) {
124 this.aaiEntityNodeDescriptors = aaiEntityNodeDescriptors;
127 public boolean isVisualizationDebugEnabled() {
128 return visualizationDebugEnabled;
131 public void setVisualizationDebugEnabled(boolean visualizationDebugEnabled) {
132 this.visualizationDebugEnabled = visualizationDebugEnabled;
135 public void setMaxSelfLinkTraversalDepth(int maxSelfLinkTraversalDepth) {
136 this.maxSelfLinkTraversalDepth = maxSelfLinkTraversalDepth;
139 public int getMaxSelfLinkTraversalDepth() {
140 return maxSelfLinkTraversalDepth;
143 public int getNumOfThreadsToFetchNodeIntegrity() {
144 return numOfThreadsToFetchNodeIntegrity;
147 public void setNumOfThreadsToFetchNodeIntegrity(int numOfThreadsToFetchNodeIntegrity) {
148 this.numOfThreadsToFetchNodeIntegrity = numOfThreadsToFetchNodeIntegrity;
151 public SparkyResourceLoader getResourceLoader() {
152 return resourceLoader;
155 public void setResourceLoader(SparkyResourceLoader resourceLoader) {
156 this.resourceLoader = resourceLoader;
160 public String toString() {
161 return "VisualizationConfigs [maxSelfLinkTraversalDepth=" + maxSelfLinkTraversalDepth
162 + ", visualizationDebugEnabled=" + visualizationDebugEnabled + ", "
163 + (aaiEntityNodeDescriptors != null
164 ? "aaiEntityNodeDescriptors=" + aaiEntityNodeDescriptors + ", " : "")
165 + (generalNodeClassName != null ? "generalNodeClassName=" + generalNodeClassName + ", "
167 + (searchNodeClassName != null ? "searchNodeClassName=" + searchNodeClassName + ", " : "")
168 + (selectedSearchedNodeClassName != null
169 ? "selectedSearchedNodeClassName=" + selectedSearchedNodeClassName + ", " : "")
170 + "numOfThreadsToFetchNodeIntegrity=" + numOfThreadsToFetchNodeIntegrity
171 + ", makeAllNeighborsBidirectional=" + makeAllNeighborsBidirectional + ", "
172 + (shallowEntities != null ? "shallowEntities=" + shallowEntities + ", " : "")
173 + (resourceLoader != null ? "resourceLoader=" + resourceLoader : "") + "]";