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