Examples of ElementModel


Examples of org.apache.hivemind.schema.ElementModel

        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

Examples of org.apache.hivemind.schema.ElementModel

        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();

        assertTrue(rules.get(0) instanceof PushContentRule);
    }
View Full Code Here

Examples of org.apache.hivemind.schema.ElementModel

            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));
            }

            // That is for backward compatibility only, key-attribute is deprecated
            _canElementsBeMapped = schema.canInstancesBeKeyed();
        }
View Full Code Here

Examples of org.apache.hivemind.schema.ElementModel

        List l = _model.getElementModel();
        int count = l.size();

        for (int i = 0; i < count; i++)
        {
            ElementModel nested = (ElementModel) l.get(i);

            SchemaElement nestedElement = new SchemaElement(_processor, nested);

            // TODO: Check for duplicates here, or at parse!

            _nestedElements.put(nested.getElementName(), nestedElement);
        }

    }
View Full Code Here

Examples of org.apache.hivemind.schema.ElementModel

            return false;

        boolean result = false;
        for (Iterator i = _elementModels.iterator(); i.hasNext();)
        {
            ElementModel model = (ElementModel) i.next();

            if (model.getKeyAttribute() != null)
                result = true;
           
            // check for unique attribute
            for (Iterator j = model.getAttributeModels().iterator(); j.hasNext();)
            {
                AttributeModel attributeModel = (AttributeModel) j.next();

                if (attributeModel.isUnique())
                    result = true;
View Full Code Here

Examples of org.apache.hivemind.schema.ElementModel

            return false;

        boolean result = false;
        for (Iterator i = _elementModels.iterator(); i.hasNext();)
        {
            ElementModel model = (ElementModel) i.next();

            // check for unique attribute
            for (Iterator j = model.getAttributeModels().iterator(); j.hasNext();)
            {
                AttributeModel attributeModel = (AttributeModel) j.next();

                if (attributeModel.isUnique())
                    result = true;
View Full Code Here

Examples of org.apache.hivemind.schema.ElementModel

        if (_elementModels == null)
            return;

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

            String key = em.getKeyAttribute();

            if (key == null)
                continue;

            AttributeModel keyAm = em.getAttributeModel(key);

            if (keyAm == null)
                throw new ApplicationRuntimeException("Key attribute \'" + key + "\' of element \'"
                        + em.getElementName() + "\' never declared.", em.getLocation(), null);
        }
    }
View Full Code Here

Examples of org.apache.hivemind.schema.ElementModel

        if (emptyModel)
            return false;

        for (Iterator i = _elementModels.iterator(); i.hasNext();)
        {
            ElementModel model = (ElementModel) i.next();

            if (model.getKeyAttribute() == null)
                return false;
        }

        return true;
    }
View Full Code Here

Examples of org.apache.hivemind.schema.ElementModel

        if (_elementModels == null)
            return;

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

            String key = em.getKeyAttribute();

            if (key == null)
                continue;

            AttributeModel keyAm = em.getAttributeModel(key);

            if (keyAm == null)
                throw new ApplicationRuntimeException("Key attribute \'" + key + "\' of element \'"
                        + em.getElementName() + "\' never declared.", em.getLocation(), null);
        }
    }
View Full Code Here

Examples of org.apache.hivemind.schema.ElementModel

        List l = _model.getElementModel();
        int count = l.size();

        for (int i = 0; i < count; i++)
        {
            ElementModel nested = (ElementModel) l.get(i);

            SchemaElement nestedElement = new SchemaElement(_processor, nested);

            // TODO: Check for duplicates here, or at parse!

            _nestedElements.put(nested.getElementName(), nestedElement);
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.