Initial commit for AAI-UI(sparky-backend)
[aai/sparky-be.git] / src / main / java / org / openecomp / sparky / viewandinspect / entity / GraphMeta.java
diff --git a/src/main/java/org/openecomp/sparky/viewandinspect/entity/GraphMeta.java b/src/main/java/org/openecomp/sparky/viewandinspect/entity/GraphMeta.java
new file mode 100644 (file)
index 0000000..1409501
--- /dev/null
@@ -0,0 +1,148 @@
+/**
+ * ============LICENSE_START===================================================
+ * SPARKY (AAI UI service)
+ * ============================================================================
+ * Copyright © 2017 AT&T Intellectual Property.
+ * Copyright © 2017 Amdocs
+ * All rights reserved.
+ * ============================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=====================================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ */
+
+package org.openecomp.sparky.viewandinspect.entity;
+
+import org.openecomp.sparky.viewandinspect.EntityTypeAggregation;
+
+/**
+ * The Class GraphMeta.
+ */
+public class GraphMeta {
+
+  private com.fasterxml.jackson.databind.JsonNode aaiEntityNodeDescriptors;
+
+  private int numNodes;
+
+  private int numLinks;
+
+  private long renderTimeInMs;
+
+  private int numLinksResolvedSuccessfullyFromCache;
+
+  private int numLinksResolvedSuccessfullyFromServer;
+
+  private int numLinkResolveFailed;
+
+  private EntityTypeAggregation entitySummary;
+
+  /**
+   * Instantiates a new graph meta.
+   */
+  public GraphMeta() {
+    entitySummary = new EntityTypeAggregation();
+  }
+
+  public EntityTypeAggregation getEntitySummary() {
+    return entitySummary;
+  }
+
+  public void setEntitySummary(EntityTypeAggregation entitySummary) {
+    this.entitySummary = entitySummary;
+  }
+
+  public com.fasterxml.jackson.databind.JsonNode getAaiEntityNodeDescriptors() {
+    return aaiEntityNodeDescriptors;
+  }
+
+  public void setAaiEntityNodeDescriptors(
+      com.fasterxml.jackson.databind.JsonNode aaiEntityNodeDefinitions) {
+    this.aaiEntityNodeDescriptors = aaiEntityNodeDefinitions;
+  }
+
+  public int getNumLinksResolvedSuccessfullyFromCache() {
+    return numLinksResolvedSuccessfullyFromCache;
+  }
+
+  public void setNumLinksResolvedSuccessfullyFromCache(int numLinksResolvedSuccessfullyFromCache) {
+    this.numLinksResolvedSuccessfullyFromCache = numLinksResolvedSuccessfullyFromCache;
+  }
+
+  public int getNumLinksResolvedSuccessfullyFromServer() {
+    return numLinksResolvedSuccessfullyFromServer;
+  }
+
+  public void setNumLinksResolvedSuccessfullyFromServer(
+      int numLinksResolvedSuccessfullyFromServer) {
+    this.numLinksResolvedSuccessfullyFromServer = numLinksResolvedSuccessfullyFromServer;
+  }
+
+  public int getNumLinkResolveFailed() {
+    return numLinkResolveFailed;
+  }
+
+  public void setNumLinkResolveFailed(int numLinkResolveFailed) {
+    this.numLinkResolveFailed = numLinkResolveFailed;
+  }
+
+  public int getNumNodes() {
+    return numNodes;
+  }
+
+  public void setNumNodes(int numNodes) {
+    this.numNodes = numNodes;
+  }
+
+  public int getNumLinks() {
+    return numLinks;
+  }
+
+  public void setNumLinks(int numLinks) {
+    this.numLinks = numLinks;
+  }
+
+  public long getRenderTimeInMs() {
+    return renderTimeInMs;
+  }
+
+  public void setRenderTimeInMs(long renderTimeInMs) {
+    this.renderTimeInMs = renderTimeInMs;
+  }
+
+  /**
+   * Peg counter.
+   *
+   * @param counterName the counter name
+   */
+  public void pegCounter(String counterName) {
+    entitySummary.pegCounter(counterName);
+  }
+
+  /* (non-Javadoc)
+   * @see java.lang.Object#toString()
+   */
+  @Override
+  public String toString() {
+    return "GraphMeta ["
+        + (aaiEntityNodeDescriptors != null
+            ? "aaiEntityNodeDescriptors=" + aaiEntityNodeDescriptors + ", " : "")
+        + "numNodes=" + numNodes + ", numLinks=" + numLinks + ", renderTimeInMs=" + renderTimeInMs
+        + ", numLinksResolvedSuccessfullyFromCache=" + numLinksResolvedSuccessfullyFromCache
+        + ", numLinksResolvedSuccessfullyFromServer=" + numLinksResolvedSuccessfullyFromServer
+        + ", numLinkResolveFailed=" + numLinkResolveFailed + ", "
+        + (entitySummary != null ? "entitySummary=" + entitySummary : "") + "]";
+  }
+
+}