Package org.apache.hivemind.schema

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


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

            _canElementsBeMapped = schema.canInstancesBeKeyed();
        }
    }
View Full Code Here

        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

        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

            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

        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

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

            _canElementsBeMapped = schema.canInstancesBeKeyed();
        }
    }
View Full Code Here

        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

        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

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.