Package org.apache.hivemind.schema

Examples of org.apache.hivemind.schema.ElementModel


        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


        ConfigurationPointDescriptor cpd = (ConfigurationPointDescriptor) l.get(0);
        Schema schema = md.getSchema(cpd.getContributionsSchemaId());

        l = schema.getElementModel();

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

        List rl = em.getRules();

        assertEquals(5, rl.size());

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

        String schemaId = spd.getParametersSchemaId();

        assertEquals("Parameters", schemaId);

        ElementModel em = (ElementModel) md.getSchema(schemaId).getElementModel().get(0);

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

                .getConfigurationPoints().get(0);
        Schema nestedSchema = cpd.getContributionsSchema();

        assertNotNull(nestedSchema);

        ElementModel em = (ElementModel) nestedSchema.getElementModel().get(0);

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

        ServicePointDescriptor spd = (ServicePointDescriptor) md.getServicePoints().get(0);
        Schema nestedSchema = spd.getParametersSchema();

        assertNotNull(nestedSchema);

        ElementModel em = (ElementModel) nestedSchema.getElementModel().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

            List l = _schema.getElementModel();
            int count = l.size();
            for (int i = 0; i < count; i++)
            {
                ElementModel model = (ElementModel) l.get(i);
                _elementMap.put(model.getElementName(), new SchemaElement(this, model));
            }
        }
    }
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.