Esempio n. 1
0
 /**
  * Initializes the <code>FtAuthors</code> by the FtAuthors <code>source</code>.
  *
  * @param source
  */
 public void setup(FtAuthors source) {
   int size;
   setId(source.getId());
   setXmlLang(source.getXmlLang());
   this.person_.clear();
   size = source.person_.size();
   for (int i = 0; i < size; i++) {
     addPerson((FtPerson) source.getPerson(i).clone());
   }
 }
Esempio n. 2
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. 3
0
 /** @param element */
 private void init(Element element) {
   RStack stack = new RStack(element);
   id_ = URelaxer.getAttributePropertyAsString(element, "id");
   xmlLang_ = URelaxer.getAttributePropertyAsString(element, "xml:lang");
   setTitle(new FtTitle(stack));
   if (FtSubtitle.isMatch(stack)) {
     setSubtitle(new FtSubtitle(stack));
   }
   if (FtVersion.isMatch(stack)) {
     setVersion(new FtVersion(stack));
   }
   if (FtType.isMatch(stack)) {
     setType(new FtType(stack));
   }
   if (FtAuthors.isMatch(stack)) {
     setAuthors(new FtAuthors(stack));
   }
   notice_.clear();
   while (true) {
     if (FtNotice.isMatch(stack)) {
       addNotice(new FtNotice(stack));
     } else {
       break;
     }
   }
   if (FtAbstract.isMatch(stack)) {
     setAbstract(new FtAbstract(stack));
   }
 }
Esempio n. 4
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>");
 }