Convert Sparky to Spring-Boot
[aai/sparky-be.git] / sparkybe-onap-service / src / main / java / org / onap / aai / sparky / viewandinspect / entity / GraphMeta.java
1 /**
2  * ============LICENSE_START===================================================
3  * SPARKY (AAI UI service)
4  * ============================================================================
5  * Copyright © 2017 AT&T Intellectual Property.
6  * Copyright © 2017 Amdocs
7  * All rights reserved.
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
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
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=====================================================
21  *
22  * ECOMP and OpenECOMP are trademarks
23  * and service marks of AT&T Intellectual Property.
24  */
25 package org.onap.aai.sparky.viewandinspect.entity;
26
27 import org.onap.aai.sparky.viewandinspect.EntityTypeAggregation;
28
29 /**
30  * The Class GraphMeta.
31  */
32 public class GraphMeta {
33
34   private com.fasterxml.jackson.databind.JsonNode aaiEntityNodeDescriptors;
35
36   private int numNodes;
37
38   private int numLinks;
39
40   private long renderTimeInMs;
41
42   private int numLinksResolvedSuccessfullyFromCache;
43
44   private int numLinksResolvedSuccessfullyFromServer;
45
46   private int numLinkResolveFailed;
47
48   private EntityTypeAggregation entitySummary;
49
50   /**
51    * Instantiates a new graph meta.
52    */
53   public GraphMeta() {
54     entitySummary = new EntityTypeAggregation();
55   }
56
57   public EntityTypeAggregation getEntitySummary() {
58     return entitySummary;
59   }
60
61   public void setEntitySummary(EntityTypeAggregation entitySummary) {
62     this.entitySummary = entitySummary;
63   }
64
65   public com.fasterxml.jackson.databind.JsonNode getAaiEntityNodeDescriptors() {
66     return aaiEntityNodeDescriptors;
67   }
68
69   public void setAaiEntityNodeDescriptors(
70       com.fasterxml.jackson.databind.JsonNode aaiEntityNodeDefinitions) {
71     this.aaiEntityNodeDescriptors = aaiEntityNodeDefinitions;
72   }
73
74   public int getNumLinksResolvedSuccessfullyFromCache() {
75     return numLinksResolvedSuccessfullyFromCache;
76   }
77
78   public void setNumLinksResolvedSuccessfullyFromCache(int numLinksResolvedSuccessfullyFromCache) {
79     this.numLinksResolvedSuccessfullyFromCache = numLinksResolvedSuccessfullyFromCache;
80   }
81
82   public int getNumLinksResolvedSuccessfullyFromServer() {
83     return numLinksResolvedSuccessfullyFromServer;
84   }
85
86   public void setNumLinksResolvedSuccessfullyFromServer(
87       int numLinksResolvedSuccessfullyFromServer) {
88     this.numLinksResolvedSuccessfullyFromServer = numLinksResolvedSuccessfullyFromServer;
89   }
90
91   public int getNumLinkResolveFailed() {
92     return numLinkResolveFailed;
93   }
94
95   public void setNumLinkResolveFailed(int numLinkResolveFailed) {
96     this.numLinkResolveFailed = numLinkResolveFailed;
97   }
98
99   public int getNumNodes() {
100     return numNodes;
101   }
102
103   public void setNumNodes(int numNodes) {
104     this.numNodes = numNodes;
105   }
106
107   public int getNumLinks() {
108     return numLinks;
109   }
110
111   public void setNumLinks(int numLinks) {
112     this.numLinks = numLinks;
113   }
114
115   public long getRenderTimeInMs() {
116     return renderTimeInMs;
117   }
118
119   public void setRenderTimeInMs(long renderTimeInMs) {
120     this.renderTimeInMs = renderTimeInMs;
121   }
122
123   /**
124    * Peg counter.
125    *
126    * @param counterName the counter name
127    */
128   public void pegCounter(String counterName) {
129     entitySummary.pegCounter(counterName);
130   }
131
132   /* (non-Javadoc)
133    * @see java.lang.Object#toString()
134    */
135   @Override
136   public String toString() {
137     return "GraphMeta ["
138         + (aaiEntityNodeDescriptors != null
139             ? "aaiEntityNodeDescriptors=" + aaiEntityNodeDescriptors + ", " : "")
140         + "numNodes=" + numNodes + ", numLinks=" + numLinks + ", renderTimeInMs=" + renderTimeInMs
141         + ", numLinksResolvedSuccessfullyFromCache=" + numLinksResolvedSuccessfullyFromCache
142         + ", numLinksResolvedSuccessfullyFromServer=" + numLinksResolvedSuccessfullyFromServer
143         + ", numLinkResolveFailed=" + numLinkResolveFailed + ", "
144         + (entitySummary != null ? "entitySummary=" + entitySummary : "") + "]";
145   }
146
147 }