Ejemplo n.º 1
1
 /**
  * Tests if a Element <code>element</code> is valid for the <code>FdFixme</code>.
  *
  * @param element
  * @return boolean
  */
 public static boolean isMatch(Element element) {
   if (!URelaxer.isTargetElement(element, "fixme")) {
     return (false);
   }
   RStack target = new RStack(element);
   boolean $match$ = false;
   Element child;
   if (!URelaxer.hasAttributeHungry(target, "author")) {
     return (false);
   }
   $match$ = true;
   if (RString.isMatch(target)) {
     $match$ = true;
   }
   while (true) {
     if (FdImg.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdIcon.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdLink.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdJump.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdFork.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdAcronym.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdStrong.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdEm.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdCode.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdSub.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdSup.isMatchHungry(target)) {
       $match$ = true;
     } else if (FdBr.isMatchHungry(target)) {
       $match$ = true;
     } else {
       break;
     }
   }
   if (!target.isEmptyElement()) {
     return (false);
   }
   return (true);
 }
 /**
  * Tests if a Element <code>element</code> is valid for the <code>NonExistentAttributeTransition
  * </code>.
  *
  * @param element
  * @return boolean
  */
 public static boolean isMatch(Element element) {
   if (!URelaxer2.isTargetElement(
       element,
       "http://www.iso_relax.org/xmlns/miaou/binaryTreeAutomaton",
       "nonExistentAttributeTransition")) {
     return (false);
   }
   RStack target = new RStack(element);
   boolean $match$ = false;
   Element child;
   if (!target.hasAttributeHungry("target")) {
     return (false);
   }
   $match$ = true;
   if (!target.hasAttributeHungry("nameClass")) {
     return (false);
   }
   $match$ = true;
   if (!target.hasAttributeHungry("right")) {
     return (false);
   }
   $match$ = true;
   if (!target.isEmptyElement()) {
     return (false);
   }
   return (true);
 }
Ejemplo n.º 3
0
 /**
  * Tests if a Element <code>element</code> is valid for the <code>FtHeader</code>.
  *
  * @param element
  * @return boolean
  */
 public static boolean isMatch(Element element) {
   if (!URelaxer.isTargetElement(element, "header")) {
     return (false);
   }
   RStack target = new RStack(element);
   boolean $match$ = false;
   Element child;
   if (!FtTitle.isMatchHungry(target)) {
     return (false);
   }
   $match$ = true;
   if (FtSubtitle.isMatchHungry(target)) {}
   if (FtVersion.isMatchHungry(target)) {}
   if (FtType.isMatchHungry(target)) {}
   if (FtAuthors.isMatchHungry(target)) {}
   while (true) {
     if (!FtNotice.isMatchHungry(target)) {
       break;
     }
     $match$ = true;
   }
   if (FtAbstract.isMatchHungry(target)) {}
   if (!target.isEmptyElement()) {
     return (false);
   }
   return (true);
 }
 /**
  * Tests if elements contained in a Stack <code>stack</code> is valid for the <code>TextTransition
  * </code>. This method consumes the stack contents during matching operation. This mehtod is
  * supposed to be used internally by the Relaxer system.
  *
  * @param stack
  * @return boolean
  */
 public static boolean isMatchHungry(RStack stack) {
   Element element = stack.peekElement();
   if (element == null) {
     return (false);
   }
   if (isMatch(element)) {
     stack.popElement();
     return (true);
   } else {
     return (false);
   }
 }
  /**
   * Tests if a Element <code>element</code> is valid for the <code>Direction</code>.
   *
   * @param element
   * @return boolean
   */
  public static boolean isMatch(Element element) {
    if (!URelaxer2.isTargetElement(
        element, "http://www.asahi-net.or.jp/~cs8k-cyu/bulletml", "direction")) {
      return (false);
    }

    RStack target = new RStack(element);
    Element child;

    if (!target.isEmptyElement()) {
      return (false);
    }

    return (true);
  }
 /**
  * Tests if elements contained in a Stack <code>stack</code> is valid for the <code>TextTransition
  * </code>. This mehtod is supposed to be used internally by the Relaxer system.
  *
  * @param stack
  * @return boolean
  */
 public static boolean isMatch(RStack stack) {
   Element element = stack.peekElement();
   if (element == null) {
     return (false);
   }
   return (isMatch(element));
 }
Ejemplo n.º 7
0
 /**
  * Tests if a Element <code>element</code> is valid for the <code>FtLegal</code>.
  *
  * @param element
  * @return boolean
  */
 public static boolean isMatch(Element element) {
   if (!URelaxer.isTargetElement(element, "legal")) {
     return (false);
   }
   RStack target = new RStack(element);
   boolean $match$ = false;
   Element child;
   if (RString.isMatch(target)) {
     $match$ = true;
   }
   while (true) {
     if (FtImg.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtLink.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtJump.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtAcronym.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtStrong.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtCode.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtSub.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtSup.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtEm.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtBr.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtIcon.isMatchHungry(target)) {
       $match$ = true;
     } else if (FtFork.isMatchHungry(target)) {
       $match$ = true;
     } else {
       break;
     }
   }
   if (!target.isEmptyElement()) {
     return (false);
   }
   return (true);
 }
Ejemplo n.º 8
0
 /**
  * Tests if a Element <code>element</code> is valid for the <code>FtAuthors</code>.
  *
  * @param element
  * @return boolean
  */
 public static boolean isMatch(Element element) {
   if (!URelaxer.isTargetElement(element, "authors")) {
     return (false);
   }
   RStack target = new RStack(element);
   boolean $match$ = false;
   Element child;
   if (!FtPerson.isMatchHungry(target)) {
     return (false);
   }
   $match$ = true;
   while (true) {
     if (!FtPerson.isMatchHungry(target)) {
       break;
     }
     $match$ = true;
   }
   if (!target.isEmptyElement()) {
     return (false);
   }
   return (true);
 }
 /**
  * Initializes the <code>TextTransition</code> by the Stack <code>stack</code> that contains
  * Elements. This constructor is supposed to be used internally by the Relaxer system.
  *
  * @param stack
  */
 public void setup(RStack stack) {
   init(stack.popElement());
 }