mil.dod.th.ose.jaxb.proto.converter/src/mil/dod/th/ose/jaxbprotoconverter/xsd/XsdParser.java
private int handleFieldType(final XsdType type, final Element element, final String name, final int index) 
            throws JaxbProtoConvertException
    {
        int currentIndex = index;
        final Integer overriddenId = getIndexOverride(element.getChildNodes());
        if (overriddenId == null)
        {
            while (type.getOverriddenIds().contains(currentIndex))
            {
                currentIndex++;
            }
            type.getFieldsMap().put(name, new XsdField(type, currentIndex, false));
            currentIndex++;
        }
        else
        {
            if (type.getOverriddenIds().contains(overriddenId))
            {
                throw new JaxbProtoConvertException(
                        String.format("Duplicate overridden ID found in: %s", type.getXsdFile()));
            }
            type.getFieldsMap().put(name, new XsdField(type, overriddenId, true));
            type.getOverriddenIds().add(overriddenId);
        }
        return currentIndex;
    }
/**
     * Handles xs tag that represents a field within a complex type.
     * 
     * @param type
     *      The complex type the field belongs to.
     * @param element
     *      The element that represents the field.
     * @param name
     *      The name of the field.
     * @param index
     *      The index of the field.
     * @return
     *      The incremented index after adding a field to the complex type.
     * @throws JaxbProtoConvertException
     *      Thrown if there is an issue handling the field.
     */
Handles xs tag that represents a field within a complex type.

@param type
The complex type the field belongs to.
@param element
The element that represents the field.
@param name
The name of the field.
@param index
The index of the field.
@return
The incremented index after adding a field to the complex type.
@throws JaxbProtoConvertException
Thrown if there is an issue handling the field.
Handles xs tag that represents a field within a complex type . @param type The complex type the field belongs to . @param element The element that represents the field . @param name The name of the field . @param index The index of the field . @return The incremented index after adding a field to the complex type . @throws JaxbProtoConvertException Thrown if there is an issue handling the field .
private int handleFieldType(final XsdType type, final Element element, final String name, final int index) 
            throws JaxbProtoConvertException
    {
        int currentIndex = index;
        final Integer overriddenId = getIndexOverride(element.getChildNodes());
        if (overriddenId == null)
        {
            while (type.getOverriddenIds().contains(currentIndex))
            {
                currentIndex++;
            }
            type.getFieldsMap().put(name, new XsdField(type, currentIndex, false));
            currentIndex++;
        }
        else
        {
            if (type.getOverriddenIds().contains(overriddenId))
            {
                throw new JaxbProtoConvertException(
                        String.format("Duplicate overridden ID found in: %s", type.getXsdFile()));
            }
            type.getFieldsMap().put(name, new XsdField(type, overriddenId, true));
            type.getOverriddenIds().add(overriddenId);
        }
        return currentIndex;
    }
private int handleFieldType ( final XsdType type , final Element element , final String name , final int index ) throws JaxbProtoConvertException { int currentIndex = index ; final Integer overriddenId = getIndexOverride ( element . getChildNodes ( ) ) ; if ( overriddenId == null ) { while ( type . getOverriddenIds ( ) . contains ( currentIndex ) ) { currentIndex ++ ; } type . getFieldsMap ( ) . put ( name , new XsdField ( type , currentIndex , false ) ) ; currentIndex ++ ; } else { if ( type . getOverriddenIds ( ) . contains ( overriddenId ) ) { throw new JaxbProtoConvertException ( String . format ( "Duplicate overridden ID found in: %s" , type . getXsdFile ( ) ) ) ; } type . getFieldsMap ( ) . put ( name , new XsdField ( type , overriddenId , true ) ) ; type . getOverriddenIds ( ) . add ( overriddenId ) ; } return currentIndex ; }
Handles xs tag that represents a field within a complex type.
Handles xs tag that represents a field within a complex type .