Package org.apache.hivemind.parse

Examples of org.apache.hivemind.parse.ElementParseInfo


        String elementName = key.substring(9, lastDotx);
        String attributeName = key.substring(lastDotx + 1);

        boolean required = value.equalsIgnoreCase("true");

        ElementParseInfo epi = getElementParseInfo(elementName);

        epi.addAttribute(attributeName, required);
    }
View Full Code Here


    private void validateAttributes()
    {
        Iterator i = _attributes.keySet().iterator();

        ElementParseInfo epi = getElementParseInfo(_elementName);

        // First, check that each attribute is in the set of expected attributes.

        while (i.hasNext())
        {
            String name = (String) i.next();

            if (!epi.isKnown(name))
                throw new DocumentParseException(
                    ScriptMessages.unexpectedAttributeInElement(name, _elementName),
                    getLocation(),
                    null);
        }

        // Now check that all required attributes have been specified.

        i = epi.getRequiredNames();
        while (i.hasNext())
        {
            String name = (String) i.next();

            if (!_attributes.containsKey(name))
View Full Code Here

    }

    private ElementParseInfo getElementParseInfo(String elementName)
    {
        ElementParseInfo result = (ElementParseInfo) _elementParseInfo.get(elementName);

        if (result == null)
        {
            result = new ElementParseInfo();
            _elementParseInfo.put(elementName, result);
        }

        return result;
    }
View Full Code Here

        String elementName = key.substring(9, lastDotx);
        String attributeName = key.substring(lastDotx + 1);

        boolean required = value.equalsIgnoreCase("true");

        ElementParseInfo epi = getElementParseInfo(elementName);

        epi.addAttribute(attributeName, required);
    }
View Full Code Here

    private void validateAttributes()
    {
        Iterator i = _attributes.keySet().iterator();

        ElementParseInfo epi = getElementParseInfo(_elementName);

        // First, check that each attribute is in the set of expected attributes.

        while (i.hasNext())
        {
            String name = (String) i.next();

            if (!epi.isKnown(name))
                throw new DocumentParseException(
                    ScriptMessages.unexpectedAttributeInElement(name, _elementName),
                    getLocation(),
                    null);
        }

        // Now check that all required attributes have been specified.

        i = epi.getRequiredNames();
        while (i.hasNext())
        {
            String name = (String) i.next();

            if (!_attributes.containsKey(name))
View Full Code Here

    }

    private ElementParseInfo getElementParseInfo(String elementName)
    {
        ElementParseInfo result = (ElementParseInfo) _elementParseInfo.get(elementName);

        if (result == null)
        {
            result = new ElementParseInfo();
            _elementParseInfo.put(elementName, result);
        }

        return result;
    }
View Full Code Here

        __CLOVER_368_0.S[8079]++;String elementName = key.substring(9, lastDotx);
        __CLOVER_368_0.S[8080]++;String attributeName = key.substring(lastDotx + 1);

        __CLOVER_368_0.S[8081]++;boolean required = value.equalsIgnoreCase("true");

        __CLOVER_368_0.S[8082]++;ElementParseInfo epi = getElementParseInfo(elementName);

        __CLOVER_368_0.S[8083]++;epi.addAttribute(attributeName, required);
    } finally { }}
View Full Code Here

    private void validateAttributes()
    {try { __CLOVER_368_0.M[1871]++;
        __CLOVER_368_0.S[8232]++;Iterator i = _attributes.keySet().iterator();

        __CLOVER_368_0.S[8233]++;ElementParseInfo epi = getElementParseInfo(_elementName);

        // First, check that each attribute is in the set of expected attributes.

        __CLOVER_368_0.S[8234]++;while ((((i.hasNext()) && (++__CLOVER_368_0.CT[1396] != 0)) || (++__CLOVER_368_0.CF[1396] == 0))){
        {
            __CLOVER_368_0.S[8235]++;String name = (String) i.next();

            __CLOVER_368_0.S[8236]++;if ((((!epi.isKnown(name)) && (++__CLOVER_368_0.CT[1397] != 0)) || (++__CLOVER_368_0.CF[1397] == 0))){
                __CLOVER_368_0.S[8237]++;throw new DocumentParseException(
                    ScriptMessages.unexpectedAttributeInElement(name, _elementName),
                    getLocation(),
                    null);}
        }}

        // Now check that all required attributes have been specified.

        __CLOVER_368_0.S[8238]++;i = epi.getRequiredNames();
        __CLOVER_368_0.S[8239]++;while ((((i.hasNext()) && (++__CLOVER_368_0.CT[1398] != 0)) || (++__CLOVER_368_0.CF[1398] == 0))){
        {
            __CLOVER_368_0.S[8240]++;String name = (String) i.next();

            __CLOVER_368_0.S[8241]++;if ((((!_attributes.containsKey(name)) && (++__CLOVER_368_0.CT[1399] != 0)) || (++__CLOVER_368_0.CF[1399] == 0))){
View Full Code Here

    } finally { }}

    private ElementParseInfo getElementParseInfo(String elementName)
    {try { __CLOVER_368_0.M[1872]++;
        __CLOVER_368_0.S[8243]++;ElementParseInfo result = (ElementParseInfo) _elementParseInfo.get(elementName);

        __CLOVER_368_0.S[8244]++;if ((((result == null) && (++__CLOVER_368_0.CT[1400] != 0)) || (++__CLOVER_368_0.CF[1400] == 0))){
        {
            __CLOVER_368_0.S[8245]++;result = new ElementParseInfo();
            __CLOVER_368_0.S[8246]++;_elementParseInfo.put(elementName, result);
        }}

        __CLOVER_368_0.S[8247]++;return result;
    } finally { }}
View Full Code Here

TOP

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

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.