/** * Factory method; creates a CDATASection having this Document as * its OwnerDoc. * * @param data The initial contents of the CDATA * * @throws DOMException(NOT_SUPPORTED_ERR) for HTML documents. (HTML * not yet implemented.) */ public CDATASection createCDATASection(String data) throws DOMException { return new CDATASectionImpl(this, data); }
/** * Transforms a <code>command</code> into a XML DOM element. * * @param document the DOM document. * @return the <code>command</code> DOM element. */ protected Element toDOMElement( CoreDocumentImpl document ) { ElementImpl element = new ElementImpl( document, "command" ); element.setAttribute( "name", this.getName() ); element.setAttribute( "active", new Boolean( this.isActive() ).toString() ); element.setAttribute( "blocker", new Boolean( this.isBlocker() ).toString() ); element.setAttribute( "agent", this.getAgent() ); CDATASectionImpl content = new CDATASectionImpl( document, this.getCommand() ); element.appendChild( content ); return element; }
/** * Transforms the <code>UpdateMessage</code> POJO to a DOM element. * * @param document the DOM document. * @return the DOM element. */ protected Element toDOMElement( CoreDocumentImpl document ) { ElementImpl element = new ElementImpl( document, "updatemessage" ); element.setAttribute( "priority", this.getPriority() ); CDATASectionImpl message = new CDATASectionImpl( document, this.getMessage() ); element.appendChild( message ); return element; }
/** * Transform the <code>FreeField</code> POJO to a DOM element. * * @param document the DOM document. * @return the DOM element. */ protected Element toDOMElement( CoreDocumentImpl document ) { ElementImpl element = new ElementImpl( document, "freefield" ); element.setAttribute( "name", this.getName() ); CDATASectionImpl content = new CDATASectionImpl( document, this.getContent() ); element.appendChild( content ); return element; }
CDATASectionImpl startupcommandContent = new CDATASectionImpl( document, this.getStartupcommand() ); startupcommand.appendChild( startupcommandContent ); element.appendChild( startupcommand ); CDATASectionImpl shutdowncommandContent = new CDATASectionImpl( document, this.getShutdowncommand() ); shutdowncommand.appendChild( shutdowncommandContent ); element.appendChild( shutdowncommand );
/** * Transforms the <code>Event</code> POJO to a DOM element. * * @param document the DOM document. * @return the DOM element. */ protected Element toDOMElement( CoreDocumentImpl document ) { ElementImpl element = new ElementImpl( document, "event" ); element.setAttribute( "date", this.getDate() ); element.setAttribute( "severity", this.getSeverity() ); element.setAttribute( "author", this.getAuthor() ); CDATASectionImpl content = new CDATASectionImpl( document, this.getContent() ); element.appendChild( content ); return element; }
CDATASectionImpl notesContent = new CDATASectionImpl( document, this.getNotes() ); notes.appendChild( notesContent ); element.appendChild( notes ); CDATASectionImpl weblinksContent = new CDATASectionImpl( document, this.getWeblinks() ); weblinks.appendChild( weblinksContent ); element.appendChild( weblinks );