Update the license for 2017-2018 license
[aai/aai-common.git] / aai-core / src / main / java / org / onap / aai / serialization / db / EdgeRule.java
index 309dbff..2a0a046 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * org.onap.aai
  * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 AT&T Intellectual Property. 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.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
 package org.onap.aai.serialization.db;
 
 import org.apache.tinkerpop.gremlin.structure.Direction;
 
-import java.util.HashMap;
+import java.util.EnumMap;
 import java.util.Map;
 
 public class EdgeRule {
@@ -32,14 +30,33 @@ public class EdgeRule {
        private MultiplicityRule multiplicityRule = null;
        private Direction direction = null;
        private Map<EdgeProperty, String> edgeProperties = null;
-       
+       private boolean isDefaultEdge = false;
+       private String from;
+       private String to;
+
        /**
         * Instantiates a new edge rule.
         */
        public EdgeRule() {
-               edgeProperties = new HashMap<>();
+               edgeProperties = new EnumMap<>(EdgeProperty.class);
        }
-       
+
+       public String getFrom() {
+               return from;
+       }
+
+       public void setFrom(String from) {
+               this.from = from;
+       }
+
+       public String getTo() {
+               return to;
+       }
+
+       public void setTo(String to) {
+               this.to = to;
+       }
+
        /**
         * Gets the label.
         *
@@ -206,6 +223,18 @@ public class EdgeRule {
        private String getProp(EdgeProperty key) {
                return this.edgeProperties.get(key);
        }
-       
-       
+
+       public boolean isDefault() {
+               return isDefaultEdge;
+       }
+
+       public void setIsDefault(boolean isDefault) {
+               this.isDefaultEdge = isDefault;
+       }
+
+       public void setIsDefault(String isDefault) {
+               this.isDefaultEdge = "true".equals(isDefault);
+       }
+
+
 }