Package org.apache.hivemind.parse

Examples of org.apache.hivemind.parse.ModuleDescriptor


        assertEquals("PointWithDescription", cpd.getId());
    }

    public void testEmbeddedConfigSchema() throws Exception
    {
        ModuleDescriptor md = parse("EmbeddedConfigSchema.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);
        Schema s = cpd.getContributionsSchema();

        List l = s.getElementModel();
View Full Code Here


        assertEquals("foo", em.getElementName());
    }

    public void testEmbeddedParametersSchema() throws Exception
    {
        ModuleDescriptor md = parse("EmbeddedParametersSchema.xml");

        List points = md.getServicePoints();
        ServicePointDescriptor spd = (ServicePointDescriptor) points.get(0);
        Schema s = spd.getParametersSchema();

        List l = s.getElementModel();
View Full Code Here

        assertEquals("foo", em.getElementName());
    }

    public void testSetPropertyRule() throws Exception
    {
        ModuleDescriptor md = parse("SetPropertyRule.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);
        Schema s = cpd.getContributionsSchema();
        List l = s.getElementModel();

        ElementModel em = (ElementModel) l.get(0);
View Full Code Here

        assertEquals("bar", rule.getValue());
    }

    public void testPushAttributeRule() throws Exception
    {
        ModuleDescriptor md = parse("PushAttributeRule.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);
        Schema s = cpd.getContributionsSchema();
        List l = s.getElementModel();

        ElementModel em = (ElementModel) l.get(0);
View Full Code Here

    }

    /** @since 1.1 */
    public void testPrivateServicePoint() throws Exception
    {
        ModuleDescriptor md = parse("PrivateServicePoint.xml");

        List points = md.getServicePoints();
        ServicePointDescriptor spd = (ServicePointDescriptor) points.get(0);

        assertEquals(Visibility.PRIVATE, spd.getVisibility());
    }
View Full Code Here

    }

    /** @since 1.1 */
    public void testPrivateConfigurationPoint() throws Exception
    {
        ModuleDescriptor md = parse("PrivateConfigurationPoint.xml");

        List points = md.getConfigurationPoints();
        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) points.get(0);

        assertEquals(Visibility.PRIVATE, cpd.getVisibility());
    }
View Full Code Here

        Resource location = getResource("PrivateSchema.xml");
        DefaultErrorHandler eh = new DefaultErrorHandler();

        XmlResourceProcessor p = new XmlResourceProcessor(_resolver, eh);

        ModuleDescriptor md = p.processResource(location);

        SchemaImpl s = (SchemaImpl) md.getSchema("PrivateSchema");

        assertEquals(Visibility.PRIVATE, s.getVisibility());
    }
View Full Code Here

    /** @since 1.1 */

    public void testContributionIf() throws Exception
    {
        ModuleDescriptor md = parse("ContributionIf.xml");

        List l = md.getContributions();
        ContributionDescriptor cd = (ContributionDescriptor) l.get(0);

        assertEquals("class foo.bar.Blat", cd.getConditionalExpression());
    }
View Full Code Here

    /** @since 1.1 */

    public void testImplementationIf() throws Exception
    {
        ModuleDescriptor md = parse("ImplementationIf.xml");

        List l = md.getImplementations();
        ImplementationDescriptor id = (ImplementationDescriptor) l.get(0);

        assertEquals("class foo.bar.Blat", id.getConditionalExpression());
    }
View Full Code Here

    /** @since 1.1 */

    public void testModuleWithPackage() throws Exception
    {
        ModuleDescriptor md = parse("ModuleWithPackage.xml");

        assertEquals("my.package", md.getPackageName());
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.parse.ModuleDescriptor

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.