Examples of MXSerializer


Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

    }

    final FileContentLocator fileContentLocator = new FileContentLocator("text/xml");
    try {
      try (OutputStream buffer = fileContentLocator.getOutputStream();) {
        final MXSerializer mx = new MXSerializer();
        mx.setProperty("http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  ");
        mx.setProperty("http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n");
        final String encoding = "UTF-8";
        mx.setOutput(buffer, encoding);
        mx.startDocument(encoding, null);
        mirrorsByRepositoryDom.writeToSerializer(null, mx);
        mx.flush();
      }

      final DefaultStorageFileItem result =
          new DefaultStorageFileItem(this, new ResourceStoreRequest(PRIVATE_MIRRORS_PATH),
              true /* isReadable */, false /* isWritable */, fileContentLocator);
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @param model
     */
    public void write(Writer writer, Model model)
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( model.getModelEncoding(), null );
        writeModel( model, "project", serializer );
        serializer.endDocument();
    } //-- void write(Writer, Model)
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write(Writer writer, LifecycleConfiguration lifecycleConfiguration)
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( lifecycleConfiguration.getModelEncoding(), null );
        writeLifecycleConfiguration( lifecycleConfiguration, "lifecycles", serializer );
        serializer.endDocument();
    } //-- void write(Writer, LifecycleConfiguration)
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( Writer writer, Settings settings )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( settings.getModelEncoding(), null );
        writeSettings( settings, "settings", serializer );
        serializer.endDocument();
    } //-- void write( Writer, Settings )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( OutputStream stream, Settings settings )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( stream, settings.getModelEncoding() );
        serializer.startDocument( settings.getModelEncoding(), null );
        writeSettings( settings, "settings", serializer );
        serializer.endDocument();
    } //-- void write( OutputStream, Settings )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( Writer writer, PluginRegistry pluginRegistry )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( pluginRegistry.getModelEncoding(), null );
        writePluginRegistry( pluginRegistry, "pluginRegistry", serializer );
        serializer.endDocument();
    } //-- void write( Writer, PluginRegistry )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( Writer writer, Metadata metadata )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( metadata.getModelEncoding(), null );
        writeMetadata( metadata, "metadata", serializer );
        serializer.endDocument();
    } //-- void write( Writer, Metadata )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( OutputStream stream, Metadata metadata )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( stream, metadata.getModelEncoding() );
        serializer.startDocument( metadata.getModelEncoding(), null );
        writeMetadata( metadata, "metadata", serializer );
        serializer.endDocument();
    } //-- void write( OutputStream, Metadata )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @param model
     */
    public void write(Writer writer, Model model)
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( model.getModelEncoding(), null );
        writeModel( model, "project", serializer );
        serializer.endDocument();
    } //-- void write(Writer, Model)
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( Writer writer, LifecycleConfiguration lifecycleConfiguration )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( lifecycleConfiguration.getModelEncoding(), null );
        writeLifecycleConfiguration( lifecycleConfiguration, "lifecycles", serializer );
        serializer.endDocument();
    } //-- void write( Writer, LifecycleConfiguration )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.