public void Visit(ConstraintNode constraintNode) { //XMLPrinterVisitor xml = new XMLPrinterVisitor(Console.Out); //constraintNode.Accept(xml); if(constraintNode.isNormalized()) { newConstraintNodes.Add(constraintNode); } else { if(constraintNode.on.type == AssignmentNode.AssignmentType.EqualTo && !constraintNode.bn.varNode.sb) { String json = jss.Serialize(constraintNode); ConstraintNode copy = jss.Deserialize<ConstraintNode>(json); constraintNode.on.type = AssignmentNode.AssignmentType.GreaterThanOrEqualTo; copy.on.type = AssignmentNode.AssignmentType.GreaterThanOrEqualTo; copy.makeNegative(); newConstraintNodes.Add(copy); } if(constraintNode.on.type == AssignmentNode.AssignmentType.NotEqualTo) { String json = jss.Serialize(constraintNode); ConstraintNode copy = jss.Deserialize<ConstraintNode>(json); constraintNode.on.type = AssignmentNode.AssignmentType.GreaterThan; copy.on.type = AssignmentNode.AssignmentType.GreaterThan; copy.makeNegative(); newConstraintNodes.Add(copy); } if(constraintNode.on.type == AssignmentNode.AssignmentType.LessThanOrEqualTo) { constraintNode.on.type = AssignmentNode.AssignmentType.GreaterThanOrEqualTo; constraintNode.makeNegative(); } if(constraintNode.on.type == AssignmentNode.AssignmentType.LessThan) { constraintNode.on.type = AssignmentNode.AssignmentType.GreaterThan; constraintNode.makeNegative(); } newConstraintNodes.Add(constraintNode); } }
public void Visit(ConstraintNode constraintNode) { if(rm == null) { rm = dm.createRow(tm); if(rm == null) { throw new Exception("Error Creating Row: "); } } string dataField = jss.Serialize(constraintNode); ConstraintModel cm = dm.createConstraint(rm, dataField); if(cm == null) { throw new Exception("Error Creating Constraint: " + dataField); } }
public void addConstraint(ConstraintNode con) { constraintNodes.Add(con); }
public void Visit(ConstraintNode constraintNode) { PrintLine("<constraint>"); indent(); constraintNode.en.Accept(this); constraintNode.on.Accept(this); constraintNode.bn.Accept(this); unindent(); PrintLine("</constraint>"); }
public void Visit(ConstraintNode constraintNode) { throw new NotImplementedException (); }
public void Visit(ConstraintNode constraintNode) { constraintNode.en.Accept(this); constraintNode.on.Accept(this); constraintNode.bn.Accept(this); }