Package org.andromda.core.configuration

Examples of org.andromda.core.configuration.Namespace


            "/" + packagePath + "/merge-mappings.xml");
        assertNotNull(mergeMappingsUri);
        mergeMappings.setName(NamespaceProperties.MERGE_MAPPINGS_URI);
        mergeMappings.setValue(mergeMappingsUri.toString());
        final String namespaceName = "test-namespace";
        final Namespace namespace = new Namespace();
        namespace.setName(namespaceName);
        namespace.addProperty(mergeMappings);
        Namespaces.instance().addNamespace(namespace);
        final VelocityTemplateEngine engine = new VelocityTemplateEngine();
        engine.initialize(namespaceName);
        StringWriter writer = new StringWriter();
        String path = packagePath + "/merge-test.vsl";
View Full Code Here


                // - pre-load the models
                messages = this.loadIfNecessary(models);
                for (final Iterator iterator = namespaces.iterator(); iterator.hasNext();)
                {
                    final Namespace namespace = (Namespace)iterator.next();
                    final Cartridge cartridge = (Cartridge)cartridgesByNamespace.get(namespace.getName());
                    if (cartridge != null)
                    {
                        cartridgeName = cartridge.getNamespace();
                        if (this.shouldProcess(cartridgeName))
                        {
View Full Code Here

            Profile.instance().get("STRING_TYPE"));
    }
   
    public void testOverride()
    {
        Namespace namespace = new Namespace();
        namespace.setName(Namespaces.DEFAULT);
        Namespaces.instance().addNamespace(namespace);
        URL profileOverrideResource = ProfileTest.class.getResource("/META-INF/profile/andromda-profile-override.xml");
        assertNotNull(profileOverrideResource);
        Property property = new Property();
        property.setName(NamespaceProperties.PROFILE_MAPPINGS_URI);
        property.setValue(profileOverrideResource.toString());
        namespace.addProperty(property);
        Profile.instance().refresh();
        assertEquals(
            "New Entity",
            Profile.instance().get("ENTITY"));
        assertEquals(
View Full Code Here

        super(name);
    }

    public void testAddAndFindNamespaceProperty()
    {
        Namespace namespace = new Namespace();
        namespace.setName(TEST_NAMESPACE);
        Property outletLocation = new Property();
        outletLocation.setName(TEST_OUTLET);
        outletLocation.setValue(TEST_LOCATION);
        namespace.addProperty(outletLocation);
        Namespaces.instance().addNamespace(namespace);

        assertEquals(
            outletLocation,
            Namespaces.instance().getProperty(TEST_NAMESPACE, TEST_OUTLET));
View Full Code Here

TOP

Related Classes of org.andromda.core.configuration.Namespace

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.