Examples of MXSerializer


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

     * @throws java.io.IOException
     */
    public void write(Writer writer, BobberArchetype bobberArchetype)
        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( bobberArchetype.getModelEncoding(), null );
        writeBobberArchetype( bobberArchetype, "archetype", serializer );
        serializer.endDocument();
    } //-- void write(Writer, BobberArchetype)
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( Writer writer, ProfilesRoot profilesRoot )
        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( profilesRoot.getModelEncoding(), null );
        writeProfilesRoot( profilesRoot, "profilesXml", serializer );
        serializer.endDocument();
    } //-- void write( Writer, ProfilesRoot )
View Full Code Here

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

     * @throws java.io.IOException
     */
    public void write( Writer writer, SettingsSecurity settingsSecurity )
        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( settingsSecurity.getModelEncoding(), null );
        writeSettingsSecurity( settingsSecurity, "settingsSecurity", serializer );
        serializer.endDocument();
    } //-- void write( Writer, SettingsSecurity )
View Full Code Here

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

     * @throws java.io.IOException
     */
    public void write( Writer writer, PersistedToolchains persistedToolchains )
        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( persistedToolchains.getModelEncoding(), null );
        writePersistedToolchains( persistedToolchains, "toolchains", serializer );
        serializer.endDocument();
    } //-- void write( Writer, PersistedToolchains )
View Full Code Here

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

     * @throws java.io.IOException
     */
    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, ExpressionDocumentation expressionDocumentation )
        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( expressionDocumentation.getModelEncoding(), null );
        writeExpressionDocumentation( expressionDocumentation, "paramdoc", serializer );
        serializer.endDocument();
    } //-- void write( Writer, ExpressionDocumentation )
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( 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 IOException
  {
    // this is a special one: once cached (hence consumed), temp file get's deleted
    final FileContentLocator fileContentLocator = new FileContentLocator("text/xml");
    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);
      if (hack != null) {
        mx.processingInstruction(hack);
      }
      metadata.writeToSerializer(null, mx);
      mx.flush();
    }

    final ResourceStoreRequest request = new ResourceStoreRequest(path);
    request.getRequestContext().setParentContext(context);
    final DefaultStorageFileItem result =
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.