Esempio n. 1
13
 /** @param element */
 private void init(Element element) {
   RStack stack = new RStack(element);
   author_ = URelaxer.getAttributePropertyAsString(element, "author");
   id_ = URelaxer.getAttributePropertyAsString(element, "id");
   xmlLang_ = URelaxer.getAttributePropertyAsString(element, "xml:lang");
   this.content_.clear();
   while (true) {
     if (RString.isMatch(stack)) {
       addContent(new RString(stack));
     } else if (FdImg.isMatch(stack)) {
       addContent(new FdImg(stack));
     } else if (FdIcon.isMatch(stack)) {
       addContent(new FdIcon(stack));
     } else if (FdLink.isMatch(stack)) {
       addContent(new FdLink(stack));
     } else if (FdJump.isMatch(stack)) {
       addContent(new FdJump(stack));
     } else if (FdFork.isMatch(stack)) {
       addContent(new FdFork(stack));
     } else if (FdAcronym.isMatch(stack)) {
       addContent(new FdAcronym(stack));
     } else if (FdStrong.isMatch(stack)) {
       addContent(new FdStrong(stack));
     } else if (FdEm.isMatch(stack)) {
       addContent(new FdEm(stack));
     } else if (FdCode.isMatch(stack)) {
       addContent(new FdCode(stack));
     } else if (FdSub.isMatch(stack)) {
       addContent(new FdSub(stack));
     } else if (FdSup.isMatch(stack)) {
       addContent(new FdSup(stack));
     } else if (FdBr.isMatch(stack)) {
       addContent(new FdBr(stack));
     } else {
       break;
     }
   }
 }
Esempio n. 2
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);
 }