Package com.volantis.mcs.migrate.api.framework

Examples of com.volantis.mcs.migrate.api.framework.XSLStreamMigratorBuilder


        builder.setRegexpPathRecogniser(".*mthm");
        builder.addRegexpContentRecogniser(v30,
                PolicySchemas.MARLIN_LPDM_V3_0.getLocationURL());
        builder.addRegexpContentRecogniser(v35,
                PolicySchemas.MARLIN_LPDM_2005_09.getLocationURL());
        XSLStreamMigratorBuilder xslBuilder =
                builder.createXSLStreamMigratorBuilder();
        xslBuilder.setXSL("../../config/lpdm/xsl/lpdm-v30-to-200509.xsl");
        builder.addStep(v30, v35, xslBuilder.getCompletedMigrator());
        builder.endType();

        /*ResourceMigrator migrator = */builder.getCompletedResourceMigrator();

    }
View Full Code Here


        builder.addRegexpContentRecogniser(repository200602,
                PolicySchemas.MARLIN_LPDM_2006_02.getNamespaceURL() + "|" +
                PolicySchemas.MARLIN_RPDM_2006_02.getNamespaceURL());

        XSLStreamMigratorBuilder xslBuilder;

        // --------------------------------------------------------------------
        // Step: LPDM 3.0 -> 2005/09
        // --------------------------------------------------------------------
        xslBuilder = builder.createXSLStreamMigratorBuilder();
        xslBuilder.setXSL(
                "/com/volantis/mcs/migrate/impl/config/lpdm/xsl/lpdm-v30-to-200509.xsl");

        xslBuilder.setStrictMode(strictMode);
        // Add the 3.0 LPDM schemas for input validation.
        xslBuilder.addInputSchema(PolicySchemas.MARLIN_LPDM_V3_0);

        // Add the 2005/09 LPDM schemas for output validation.
        xslBuilder.addOutputSchemata(PolicySchemas.REPOSITORY_2005_09);
        builder.addStep(lpdm30, repository200509, xslBuilder.getCompletedMigrator());

        // --------------------------------------------------------------------
        // Step: RPDM 2.7-3.0 -> 2005/09
        // --------------------------------------------------------------------
        xslBuilder = builder.createXSLStreamMigratorBuilder();
        xslBuilder.setXSL(
                "/com/volantis/mcs/migrate/impl/config/lpdm/xsl/rpdm-v30-to-200509.xsl");

        // Input DTDs are handled via the repository resolver.
        // TODO: handle rpdm DTDs explicitly.
        xslBuilder.addEntityResolver(createRepositoryEntityResolver());
        // Turn of strict mode because previous version of MCS allowed
        // garbage to de entered.
        xslBuilder.setStrictMode(false);

        // Add the 2005/12 RPDM schemas for output validation.
        xslBuilder.addOutputSchemata(PolicySchemas.REPOSITORY_2005_09);
        builder.addStep(rpdm27to30, repository200509, xslBuilder.getCompletedMigrator());

        // --------------------------------------------------------------------
        // Step: 2005/09 -> 2005/12
        // --------------------------------------------------------------------
        xslBuilder = builder.createXSLStreamMigratorBuilder();
        xslBuilder.setXSL(
                "/com/volantis/mcs/migrate/impl/config/lpdm/xsl/rpdm-200509-to-200512.xsl");

        xslBuilder.setStrictMode(strictMode);

        // Add schema for 2005/09
        xslBuilder.addInputSchemata(PolicySchemas.REPOSITORY_2005_09);
        // Add schema for 2005/12
        xslBuilder.addOutputSchemata(PolicySchemas.REPOSITORY_2005_12);
        builder.addStep(repository200509, repository200512,
                xslBuilder.getCompletedMigrator());

        // --------------------------------------------------------------------
        // Step: 2005/12 -> 2006/02
        // --------------------------------------------------------------------
        xslBuilder = builder.createXSLStreamMigratorBuilder();
        xslBuilder.setXSL(
                "/com/volantis/mcs/migrate/impl/config/lpdm/xsl/rpdm-200512-to-200602.xsl");
        xslBuilder.setStrictMode(strictMode);

        // Add schema for 2005/12
        xslBuilder.addInputSchemata(PolicySchemas.REPOSITORY_2005_12);

        // Add schema for 2006/02
        xslBuilder.addOutputSchemata(PolicySchemas.REPOSITORY_2006_02);
        builder.addStep(repository200512, repository200602,
                xslBuilder.getCompletedMigrator());

        builder.endType();

        return builder.getCompletedResourceMigrator();
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.migrate.api.framework.XSLStreamMigratorBuilder

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.