Esempio n. 1
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);
 }
Esempio n. 2
0
 /**
  * Makes an XML text representation.
  *
  * @param buffer
  */
 public void makeTextElement(PrintWriter buffer) {
   int size;
   buffer.print("<header");
   if (id_ != null) {
     buffer.print(" id=\"");
     buffer.print(URelaxer.escapeAttrQuot(URelaxer.getString(getId())));
     buffer.print("\"");
   }
   if (xmlLang_ != null) {
     buffer.print(" xml:lang=\"");
     buffer.print(URelaxer.escapeAttrQuot(URelaxer.getString(getXmlLang())));
     buffer.print("\"");
   }
   buffer.print(">");
   title_.makeTextElement(buffer);
   if (subtitle_ != null) {
     subtitle_.makeTextElement(buffer);
   }
   if (version_ != null) {
     version_.makeTextElement(buffer);
   }
   if (type_ != null) {
     type_.makeTextElement(buffer);
   }
   if (authors_ != null) {
     authors_.makeTextElement(buffer);
   }
   size = this.notice_.size();
   for (int i = 0; i < size; i++) {
     FtNotice value = (FtNotice) this.notice_.get(i);
     value.makeTextElement(buffer);
   }
   if (abstract_ != null) {
     abstract_.makeTextElement(buffer);
   }
   buffer.print("</header>");
 }