mil.dod.th.ose.jaxb.proto.converter/src/mil/dod/th/ose/jaxbprotoconverter/xsd/XsdParser.java
private boolean containsEnumElements(final NodeList nodes)
    {
        for (int i = 0; i < nodes.getLength(); i++)
        {
            final Node node = nodes.item(i);
            if (node.getNodeType() == Node.ELEMENT_NODE)
            {
                final Element element = (Element)node;
                final String nodeName = element.getNodeName();
                if ("xs:enumeration".equals(nodeName))
                {
                    return true;
                }
                final boolean childrenContainEnum = containsEnumElements(node.getChildNodes());
                if (childrenContainEnum)
                {
                    return true;
                }
            }
        }
        return false;
    }
/**
     * Method used to check if a list of nodes contains an XSD enumeration type.
     * 
     * @param nodes
     *      List of XML nodes to be checked.
     * @return
     *      True if an XSD enumeration type is found and false otherwise.
     */
Method used to check if a list of nodes contains an XSD enumeration type.

@param nodes
List of XML nodes to be checked.
@return
True if an XSD enumeration type is found and false otherwise.
Method used to check if a list of nodes contains an XSD enumeration type . @param nodes List of XML nodes to be checked . @return True if an XSD enumeration type is found and false otherwise .
private boolean containsEnumElements(final NodeList nodes)
    {
        for (int i = 0; i < nodes.getLength(); i++)
        {
            final Node node = nodes.item(i);
            if (node.getNodeType() == Node.ELEMENT_NODE)
            {
                final Element element = (Element)node;
                final String nodeName = element.getNodeName();
                if ("xs:enumeration".equals(nodeName))
                {
                    return true;
                }
                final boolean childrenContainEnum = containsEnumElements(node.getChildNodes());
                if (childrenContainEnum)
                {
                    return true;
                }
            }
        }
        return false;
    }
private boolean containsEnumElements ( final NodeList nodes ) { for ( int i = 0 ; i < nodes . getLength ( ) ; i ++ ) { final Node node = nodes . item ( i ) ; if ( node . getNodeType ( ) == Node . ELEMENT_NODE ) { final Element element = ( Element ) node ; final String nodeName = element . getNodeName ( ) ; if ( "xs:enumeration" . equals ( nodeName ) ) { return true ; } final boolean childrenContainEnum = containsEnumElements ( node . getChildNodes ( ) ) ; if ( childrenContainEnum ) { return true ; } } } return false ; }
Method used to check if a list of nodes contains an XSD enumeration type.
Method used to check if a list of nodes contains an XSD enumeration type .