Package org.jdom.output

Examples of org.jdom.output.Format


   */
  public String createConfigXml(NewsletterConfig config) throws ApsSystemException {
    Element root = this.createConfigElement(config);
    Document doc = new Document(root);
    XMLOutputter out = new XMLOutputter();
    Format format = Format.getPrettyFormat();
    format.setIndent("\t");
    out.setFormat(format);
    String xml = out.outputString(doc);
    return xml;
  }
View Full Code Here


   */
  public String createConfigXml(MailConfig config) throws ApsSystemException {
    Element root = this.createConfigElement(config);
    Document doc = new Document(root);
    XMLOutputter out = new XMLOutputter();
    Format format = Format.getPrettyFormat();
    format.setIndent("\t");
    out.setFormat(format);
    return out.outputString(doc);
  }
View Full Code Here

   * @return vcard mapping in XML format
   */ 
  @Override
  public String getXMLDocument(){
    XMLOutputter out = new XMLOutputter();
    Format format = Format.getPrettyFormat();
    format.setIndent("\t");
    out.setFormat(format);
    String xml = out.outputString(_doc);
    return xml;
  }
View Full Code Here

 
  public String createConfigXml(CalendarConfig config) {
    Element root = this.createConfigElement(config);
    Document doc = new Document(root);
    XMLOutputter out = new XMLOutputter();
    Format format = Format.getPrettyFormat();
    format.setIndent("\t");
    out.setFormat(format);
    return out.outputString(doc);
  }
View Full Code Here

 
  public String createConfigXml(Map<String, Workflow> config) throws ApsSystemException {
    Element root = this.createConfigElement(config);
    Document doc = new Document(root);
    XMLOutputter out = new XMLOutputter();
    Format format = Format.getPrettyFormat();
    format.setIndent("\t");
    out.setFormat(format);
    return out.outputString(doc);
  }
View Full Code Here

     */
    public OutboundVariable convertOutbound(Object data, OutboundContext outctx) throws ConversionException
    {
        try
        {
            Format outformat = Format.getRawFormat();
            outformat.setEncoding("UTF-8");

            // Setup the destination
            String script;

            // Using XSLT to convert to a stream. Setup the source
View Full Code Here

    public void write( Model project, Document document, OutputStream stream )
        throws java.io.IOException
    {
        updateModel( project, "project", new Counter( 0 ), document.getRootElement() );
        XMLOutputter outputter = new XMLOutputter();
        Format format = Format.getPrettyFormat();
        format.setIndent( "    " ).setLineSeparator( System.getProperty( "line.separator" ) );
        outputter.setFormat( format );
        outputter.output( document, stream );
    } // -- void write(Model, Document, OutputStream)
View Full Code Here

     * @param document
     */
    public void write( Model project, Document document, OutputStreamWriter writer )
        throws java.io.IOException
    {
        Format format = Format.getRawFormat();
        format.setEncoding( writer.getEncoding() ).setLineSeparator( System.getProperty( "line.separator" ) );
        write( project, document, writer, format );
    } // -- void write(Model, Document, OutputStreamWriter)
View Full Code Here

            case (400) :
            {
                log.warn("DataCite was unable to understand the XML we send.");
                log.warn("DataCite Metadata API returned a http status code "
                        +"400: " + resp.getContent());
                Format format = Format.getCompactFormat();
                format.setEncoding("UTF-8");
                XMLOutputter xout = new XMLOutputter(format);
                log.info("We send the following XML:\n" + xout.outputString(root));
                throw new DOIIdentifierException("Unable to reserve DOI " + doi
                        + ". Please inform your administrator or take a look "
                        +" into the log files.", DOIIdentifierException.BAD_REQUEST);
View Full Code Here

    }
   
    protected DataCiteResponse sendMetadataPostRequest(String doi, Element metadataRoot)
            throws DOIIdentifierException
    {
        Format format = Format.getCompactFormat();
        format.setEncoding("UTF-8");
        XMLOutputter xout = new XMLOutputter(format);
        return sendMetadataPostRequest(doi, xout.outputString(new Document(metadataRoot)));
    }
View Full Code Here

TOP

Related Classes of org.jdom.output.Format

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.