Package org.apache.hivemind.schema

Examples of org.apache.hivemind.schema.ElementModel


        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) l.get(0);
        Schema schema = cpd.getContributionsSchema();

        l = schema.getElementModel();

        ElementModel em = (ElementModel) l.get(0);

        List rl = em.getRules();

        assertEquals(4, rl.size());

        CreateObjectRule rule1 = (CreateObjectRule) rl.get(0);
        assertEquals("package.Foo1", rule1.getClassName());
View Full Code Here


        assertNotNull(schema.getLocation());
        l = schema.getElementModel();

        assertEquals(1, l.size());

        ElementModel em = (ElementModel) l.get(0);

        assertEquals("myParameter", em.getElementName());
    }
View Full Code Here

        List l = s.getElementModel();

        assertEquals(1, l.size());

        ElementModel em = (ElementModel) l.get(0);

        assertEquals("foo", em.getElementName());
    }
View Full Code Here

        List l = s.getElementModel();

        assertEquals(1, l.size());

        ElementModel em = (ElementModel) l.get(0);

        assertEquals("foo", em.getElementName());
    }
View Full Code Here

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

        ElementModel em = (ElementModel) l.get(0);

        List rules = em.getRules();

        SetPropertyRule rule = (SetPropertyRule) rules.get(0);

        assertEquals("foo", rule.getPropertyName());
        assertEquals("bar", rule.getValue());
View Full Code Here

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

        ElementModel em = (ElementModel) l.get(0);

        List rules = em.getRules();

        PushAttributeRule rule = (PushAttributeRule) rules.get(0);

        assertEquals("foo", rule.getAttributeName());
    }
View Full Code Here

        assertNotNull(schema.getLocation());

        l = schema.getElementModel();
        assertEquals(2, l.size());

        ElementModel em = (ElementModel) l.get(0);

        assertEquals("foo1", em.getElementName());
        assertEquals(0, em.getElementModel().size());

        List al = em.getAttributeModels();
        assertEquals(2, al.size());

        AttributeModel am = (AttributeModel) al.get(0);
        assertEquals("bar", am.getName());
        assertEquals(true, am.isRequired());

        am = (AttributeModel) al.get(1);
        assertEquals("biff", am.getName());

        em = (ElementModel) l.get(1);

        assertEquals("foo2", em.getElementName());
        assertEquals(2, em.getAttributeModels().size());

        l = em.getElementModel();

        assertEquals(1, l.size());

        em = (ElementModel) l.get(0);

        assertEquals(1, em.getAttributeModels().size());
    }
View Full Code Here

        schema.appendChild(_document.createTextNode(s.getAnnotation()));

        for (Iterator j = s.getElementModel().iterator(); j.hasNext();)
        {
            ElementModel em = (ElementModel) j.next();

            Element element = getElementElement(em);

            schema.appendChild(element);
        }
View Full Code Here

            element.appendChild(attribute);
        }

        for (Iterator i = em.getElementModel().iterator(); i.hasNext();)
        {
            ElementModel nestedEm = (ElementModel) i.next();

            Element nestedElement = getElementElement(nestedEm);

            element.appendChild(nestedElement);
        }
View Full Code Here

        assertNotNull(schema.getLocation());

        l = schema.getElementModel();
        assertEquals(2, l.size());

        ElementModel em = (ElementModel) l.get(0);

        assertEquals("foo1", em.getElementName());
        assertEquals(0, em.getElementModel().size());

        List al = em.getAttributeModels();
        assertEquals(2, al.size());

        AttributeModel am = (AttributeModel) al.get(0);
        assertEquals("bar", am.getName());
        assertEquals(true, am.isRequired());

        am = (AttributeModel) al.get(1);
        assertEquals("biff", am.getName());
        assertEquals("glob", am.getDefault());

        em = (ElementModel) l.get(1);

        assertEquals("foo2", em.getElementName());
        assertEquals(2, em.getAttributeModels().size());

        l = em.getElementModel();

        assertEquals(1, l.size());

        em = (ElementModel) l.get(0);

        assertEquals(1, em.getAttributeModels().size());
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.schema.ElementModel

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.