/** * 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(">"); }
/** @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"); }
/** * 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.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); }