Package validation.util

Examples of validation.util.ChildIterator


  }

  /* <!ELEMENT IDSExprLogicalNot (%ExprLogical;)> */
  static private LogicalExpression logicalNot(Node n,TermSystem p)
  throws AnalyzeException, ConstraintException {
    ChildIterator child = new ChildIterator(n);
    Node next = child.next();
    LogicalExpression first = parse(next,p);
    return new NotExpression(first);
  }
View Full Code Here


  // <!ELEMENT IDSExprLogicalOr (%ExprLogical;,(%ExprLogical;)+)>
  //   <!ELEMENT IDSExprLogicalAnd (%ExprLogical;,(%ExprLogical;)+)>
  static private LogicalExpression logicalOperator(Node n,TermSystem p)
  throws AnalyzeException, ConstraintException {
    String operator = ((Element) n).getTagName();
    ChildIterator child = new ChildIterator(n);
    Node next = child.next();
    LogicalExpression first = parse(next,p);
    if (!child.hasMoreChild()) exception(1);
    LogicalExpression second = logicalOperatorAux(child,p, operator);
    LogicalExpression result = null;
    if (isOr(operator))result = new OrExpression(first,second);
    else if (isAnd(operator)) result = new AndExpression(first,second);
    return result;
View Full Code Here

  // <!ELEMENT IDSExprSup (%Compare;)>
  // <!ELEMENT IDSExprInf (%Compare;)>
  static private LogicalExpression logicalRelation(Node n,TermSystem p) throws AnalyzeException,
  ConstraintException {
    String op = ((Element) n).getTagName();
    ChildIterator child = new ChildIterator(n);
    if (!child.hasMoreChild()) exception(2);
    Node next = child.next();
    Expression first = IntExprVisitor.parse(next,p);
    if (!child.hasMoreChild()) exception(2);
    next = child.next();
    Expression second = IntExprVisitor.parse(next,p);
    return relation(p,op,first,second);
  }
View Full Code Here

 
 

  static private LogicalExpression logicalImplies(Node n,TermSystem p) throws AnalyzeException,
  ConstraintException {
    ChildIterator child = new ChildIterator(n);
    if (!child.hasMoreChild()) exception(1);
    Node next = child.next();
    LogicalExpression first = parse(next,p);
    if (!child.hasMoreChild()) exception(3);
    next = child.next();
    LogicalExpression second = parse(next,p);
    return new ImpliesExpression(first,second);
  }
View Full Code Here

   * @throws ConstraintException
   */
  private LogicalExpression parse()
  throws AnalyzeException,ConstraintException,ValidationException {
    // starting node of validation
    ChildIterator child = new ChildIterator(document);
    Node next = child.next();
   
    if (!isTerm(next)) exception(1);
    child= new ChildIterator(next);
    next = child.next();
 
    return LogicalExprVisitor.parse(next, constSyst);
  }
View Full Code Here

  // <!ELEMENT IDSExprMinus (%ExprInt;,(%ExprInt;)+)>
  // <!ELEMENT IDSExprTimes (%ExprInt;,(%ExprInt;)+)>
  static private Expression intOperator(Node n,TermSystem p)
  throws AnalyzeException, ConstraintException {
    String operator = ((Element) n).getTagName();
    ChildIterator child = new ChildIterator(n);
    Node next = child.next();
    Expression first = parse(next,p);
    if (!child.hasMoreChild()) exception(1);
    Expression second = intOperatorAux(child,p, operator);
    Expression expr = null;
    if (isPlus(operator)) expr = new PlusExpression(first,second);
    else if (isMinus(operator)) expr = new MinusExpression(first,second);
    else if (isTimes(operator)) expr = new TimeExpression(first,second);
View Full Code Here

TOP

Related Classes of validation.util.ChildIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.