Example #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;
     }
   }
 }
Example #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);
 }
Example #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));
   }
 }
Example #4
0
 /**
  * Makes an XML text representation.
  *
  * @param buffer
  */
 public void makeTextElement(PrintWriter buffer) {
   int size;
   buffer.print("<legal");
   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("\"");
   }
   size = this.content_.size();
   for (int i = 0; i < size; i++) {
     IFtContentMixMixed value = (IFtContentMixMixed) this.content_.get(i);
     value.makeTextAttribute(buffer);
   }
   buffer.print(">");
   size = this.content_.size();
   for (int i = 0; i < size; i++) {
     IFtContentMixMixed value = (IFtContentMixMixed) this.content_.get(i);
     value.makeTextElement(buffer);
   }
   buffer.print("</legal>");
 }
Example #5
0
 /**
  * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
  *
  * @param parent
  */
 public void makeElement(Node parent) {
   Document doc;
   if (parent instanceof Document) {
     doc = (Document) parent;
   } else {
     doc = parent.getOwnerDocument();
   }
   Element element = doc.createElement("fixme");
   int size;
   if (this.author_ != null) {
     URelaxer.setAttributePropertyByString(element, "author", this.author_);
   }
   if (this.id_ != null) {
     URelaxer.setAttributePropertyByString(element, "id", this.id_);
   }
   if (this.xmlLang_ != null) {
     URelaxer.setAttributePropertyByString(element, "xml:lang", this.xmlLang_);
   }
   size = this.content_.size();
   for (int i = 0; i < size; i++) {
     IFdContentMixMixed value = (IFdContentMixMixed) this.content_.get(i);
     value.makeElement(element);
   }
   parent.appendChild(element);
 }
 /** @param element */
 private void init(Element element) {
   IBinaryTreeAutomatonFactory factory = BinaryTreeAutomatonFactory.getFactory();
   RStack stack = new RStack(element);
   rNSContext_.declareNamespace(element);
   target_ = URelaxer.getAttributePropertyAsInt(element, "target");
   right_ = URelaxer.getAttributePropertyAsInt(element, "right");
 }
Example #7
0
 /**
  * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
  *
  * @param parent
  */
 public void makeElement(Node parent) {
   Document doc;
   if (parent instanceof Document) {
     doc = (Document) parent;
   } else {
     doc = parent.getOwnerDocument();
   }
   Element element = doc.createElement("table");
   int size;
   if (this.id_ != null) {
     URelaxer.setAttributePropertyByString(element, "id", this.id_);
   }
   if (this.xmlLang_ != null) {
     URelaxer.setAttributePropertyByString(element, "xml:lang", this.xmlLang_);
   }
   if (this.caption_ != null) {
     this.caption_.makeElement(element);
   }
   size = this.tr_.size();
   for (int i = 0; i < size; i++) {
     FcTr value = (FcTr) this.tr_.get(i);
     value.makeElement(element);
   }
   parent.appendChild(element);
 }
Example #8
0
 /**
  * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
  *
  * @param parent
  */
 public void makeElement(Node parent) {
   Document doc;
   if (parent instanceof Document) {
     doc = (Document) parent;
   } else {
     doc = parent.getOwnerDocument();
   }
   Element element = doc.createElement("center");
   int size;
   URelaxer.setElementPropertyByString(element, "ra", ra);
   URelaxer.setElementPropertyByString(element, "decl", decl);
   parent.appendChild(element);
 }
Example #9
0
 /** @param element */
 private void init(Element element) {
   RStack stack = new RStack(element);
   id_ = URelaxer.getAttributePropertyAsString(element, "id");
   xmlLang_ = URelaxer.getAttributePropertyAsString(element, "xml:lang");
   person_.clear();
   while (true) {
     if (FtPerson.isMatch(stack)) {
       addPerson(new FtPerson(stack));
     } else {
       break;
     }
   }
 }
Example #10
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);
 }
 /**
  * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
  *
  * @param parent
  */
 public void makeElement(Node parent) {
   Document doc;
   if (parent instanceof Document) {
     doc = (Document) parent;
   } else {
     doc = parent.getOwnerDocument();
   }
   Element element =
       doc.createElementNS(
           "http://www.iso_relax.org/xmlns/miaou/binaryTreeAutomaton", "textTransition");
   rNSContext_.setupNamespace(element);
   int size;
   URelaxer.setAttributePropertyByInt(element, "target", this.target_);
   URelaxer.setAttributePropertyByInt(element, "right", this.right_);
   parent.appendChild(element);
 }
  public String makeNSMapping(String uri) {
    String prefix = (String) prefixByUri_.get(uri);

    if (prefix == null) {
      return ("");
    }

    return (URelaxer.getNSMapping(prefix, uri));
  }
  /**
   * Makes a XML text representation.
   *
   * @param buffer
   */
  public void makeTextElement(PrintWriter buffer) {
    int size;
    String prefix = rNSContext_.getPrefixByUri("http://www.asahi-net.or.jp/~cs8k-cyu/bulletml");
    buffer.print("<");
    URelaxer.makeQName(prefix, "direction", buffer);
    rNSContext_.makeNSMappings(buffer);

    if (type_ != null) {
      buffer.print(" ");
      buffer.print("type");
      buffer.print("=\"");
      buffer.print(URelaxer.escapeAttrQuot(getType()));
      buffer.print("\"");
    }

    buffer.print(">");
    buffer.print("</");
    URelaxer.makeQName(prefix, "direction", buffer);
    buffer.print(">");
  }
Example #14
0
 /**
  * Makes an XML text representation.
  *
  * @param buffer
  */
 public void makeTextElement(PrintWriter buffer) {
   int size;
   buffer.print("<authors");
   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(">");
   size = this.person_.size();
   for (int i = 0; i < size; i++) {
     FtPerson value = (FtPerson) this.person_.get(i);
     value.makeTextElement(buffer);
   }
   buffer.print("</authors>");
 }
 /**
  * Makes a XML text representation.
  *
  * @param buffer
  */
 public void makeTextElement(PrintWriter buffer) {
   int size;
   String prefix =
       rNSContext_.getPrefixByUri("http://www.iso_relax.org/xmlns/miaou/binaryTreeAutomaton");
   buffer.print("<");
   URelaxer.makeQName(prefix, "nonExistentAttributeTransition", buffer);
   rNSContext_.makeNSMappings(buffer);
   buffer.print(" ");
   buffer.print("target");
   buffer.print("=\"");
   buffer.print(URelaxer.getString(getTarget()));
   buffer.print("\"");
   buffer.print(" ");
   buffer.print("nameClass");
   buffer.print("=\"");
   buffer.print(URelaxer.getString(getNameClass()));
   buffer.print("\"");
   if (exceptNameClass_ != null) {
     buffer.print(" ");
     buffer.print("exceptNameClass");
     buffer.print("=\"");
     buffer.print(URelaxer.getString(getExceptNameClass()));
     buffer.print("\"");
   }
   buffer.print(" ");
   buffer.print("right");
   buffer.print("=\"");
   buffer.print(URelaxer.getString(getRight()));
   buffer.print("\"");
   buffer.print(">");
   buffer.print("</");
   URelaxer.makeQName(prefix, "nonExistentAttributeTransition", buffer);
   buffer.print(">");
 }
Example #16
0
 /**
  * Makes an XML text representation.
  *
  * @param buffer
  * @exception IOException
  */
 public void makeTextElement(Writer buffer) throws IOException {
   int size;
   buffer.write("<fixme");
   if (author_ != null) {
     buffer.write(" author=\"");
     buffer.write(URelaxer.escapeAttrQuot(URelaxer.getString(getAuthor())));
     buffer.write("\"");
   }
   if (id_ != null) {
     buffer.write(" id=\"");
     buffer.write(URelaxer.escapeAttrQuot(URelaxer.getString(getId())));
     buffer.write("\"");
   }
   if (xmlLang_ != null) {
     buffer.write(" xml:lang=\"");
     buffer.write(URelaxer.escapeAttrQuot(URelaxer.getString(getXmlLang())));
     buffer.write("\"");
   }
   size = this.content_.size();
   for (int i = 0; i < size; i++) {
     IFdContentMixMixed value = (IFdContentMixMixed) this.content_.get(i);
     value.makeTextAttribute(buffer);
   }
   buffer.write(">");
   size = this.content_.size();
   for (int i = 0; i < size; i++) {
     IFdContentMixMixed value = (IFdContentMixMixed) this.content_.get(i);
     value.makeTextElement(buffer);
   }
   buffer.write("</fixme>");
 }
 /**
  * Makes a XML text representation.
  *
  * @param buffer
  */
 public void makeTextElement(PrintWriter buffer) {
   int size;
   String prefix =
       rNSContext_.getPrefixByUri("http://www.iso_relax.org/xmlns/miaou/binaryTreeAutomaton");
   buffer.print("<");
   URelaxer.makeQName(prefix, "textTransition", buffer);
   rNSContext_.makeNSMappings(buffer);
   buffer.print(" ");
   buffer.print("target");
   buffer.print("=\"");
   buffer.print(URelaxer.getString(getTarget()));
   buffer.print("\"");
   buffer.print(" ");
   buffer.print("right");
   buffer.print("=\"");
   buffer.print(URelaxer.getString(getRight()));
   buffer.print("\"");
   buffer.print(">");
   buffer.print("</");
   URelaxer.makeQName(prefix, "textTransition", buffer);
   buffer.print(">");
 }
  /**
   * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
   *
   * @param parent
   */
  public void makeElement(Node parent) {
    Document doc;

    if (parent instanceof Document) {
      doc = (Document) parent;
    } else {
      doc = parent.getOwnerDocument();
    }

    Element element =
        doc.createElementNS("http://www.asahi-net.or.jp/~cs8k-cyu/bulletml", "direction");
    rNSContext_.setupNamespace(element);
    URelaxer.setElementPropertyByString(element, this.content_);

    int size;

    if (this.type_ != null) {
      URelaxer.setAttributePropertyByString(element, "type", this.type_);
    }

    parent.appendChild(element);
  }
Example #19
0
 /**
  * Creates a DOM representation of the object. Result is appended to the Node <code>parent</code>.
  *
  * @param parent
  */
 public void makeElement(Node parent) {
   Document doc;
   if (parent instanceof Document) {
     doc = (Document) parent;
   } else {
     doc = parent.getOwnerDocument();
   }
   Element element = doc.createElement("header");
   int size;
   if (this.id_ != null) {
     URelaxer.setAttributePropertyByString(element, "id", this.id_);
   }
   if (this.xmlLang_ != null) {
     URelaxer.setAttributePropertyByString(element, "xml:lang", this.xmlLang_);
   }
   this.title_.makeElement(element);
   if (this.subtitle_ != null) {
     this.subtitle_.makeElement(element);
   }
   if (this.version_ != null) {
     this.version_.makeElement(element);
   }
   if (this.type_ != null) {
     this.type_.makeElement(element);
   }
   if (this.authors_ != null) {
     this.authors_.makeElement(element);
   }
   size = this.notice_.size();
   for (int i = 0; i < size; i++) {
     FtNotice value = (FtNotice) this.notice_.get(i);
     value.makeElement(element);
   }
   if (this.abstract_ != null) {
     this.abstract_.makeElement(element);
   }
   parent.appendChild(element);
 }
Example #20
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>");
 }
Example #21
0
 /**
  * Makes an XML text representation.
  *
  * @param buffer
  */
 public void makeTextElement(PrintWriter buffer) {
   int size;
   buffer.print("<table");
   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(">");
   if (caption_ != null) {
     caption_.makeTextElement(buffer);
   }
   size = this.tr_.size();
   for (int i = 0; i < size; i++) {
     FcTr value = (FcTr) this.tr_.get(i);
     value.makeTextElement(buffer);
   }
   buffer.print("</table>");
 }
Example #22
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);
 }
Example #23
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);
 }
Example #24
0
 /**
  * Gets the property value as String.
  *
  * @return String
  */
 public String getAuthorAsString() {
   return (URelaxer.getString(getAuthor()));
 }
Example #25
0
 /**
  * Gets the property value as String.
  *
  * @return String
  */
 public String getXmlLangAsString() {
   return (URelaxer.getString(getXmlLang()));
 }
Example #26
0
 /**
  * Gets the property value as String.
  *
  * @return String
  */
 public String getIdAsString() {
   return (URelaxer.getString(getId()));
 }
 /**
  * Gets the property value as String.
  *
  * @return String
  */
 public String getTargetAsString() {
   return (URelaxer.getString(getTarget()));
 }
 /** @param element */
 private void init(Element element) {
   RStack stack = new RStack(element);
   rNSContext_.declareNamespace(element);
   content_ = URelaxer.getElementPropertyAsString(element);
   type_ = URelaxer.getAttributePropertyAsString(element, "type");
 }
 /**
  * Gets the property value as String.
  *
  * @return String
  */
 public String getRightAsString() {
   return (URelaxer.getString(getRight()));
 }
 /**
  * Gets the property value as String.
  *
  * @return String
  */
 public String getExceptNameClassAsString() {
   return (URelaxer.getString(getExceptNameClass()));
 }