001 package nl.cwi.sen1.modulemanager.model; 002 003 import aterm.ATerm; 004 005 public class AttributeUpdateRule { 006 private ATerm namespace; 007 008 private ATerm key; 009 010 private ATerm formula; 011 012 private ATerm predicateValue; 013 014 public AttributeUpdateRule(ATerm namespace, ATerm key, ATerm formula, 015 ATerm predicateValue) { 016 this.namespace = namespace; 017 this.key = key; 018 this.predicateValue = predicateValue; 019 this.formula = formula; 020 } 021 022 public ATerm getKey() { 023 return key; 024 } 025 026 public ATerm getNamespace() { 027 return namespace; 028 } 029 030 public ATerm getPredicateValue() { 031 return predicateValue; 032 } 033 034 public ATerm getFormula() { 035 return formula; 036 } 037 038 public boolean equals(Object o) { 039 AttributeUpdateRule attr = (AttributeUpdateRule) o; 040 return attr.namespace.isEqual(namespace) && attr.key.isEqual(key) 041 && attr.predicateValue.isEqual(predicateValue) 042 && attr.formula.isEqual(formula); 043 } 044 045 public String toString() { 046 return "attr[" + namespace + ", " + key + ", rule:" + formula 047 + ", new:" + predicateValue + "]"; 048 } 049 }