mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/advanced/configuration/SystemMetaTypeMgrImpl.java
private void cleanupAttributes(final MetaTypeModel model, final List<AttributeDefinitionType> attributeList)
    {
        final List<Integer> indexList = new ArrayList<Integer>();
        for (AttributeModel localAttribute: model.getAttributes())
        {
            boolean exists = false;
            for (AttributeDefinitionType remoteAttribute: attributeList)
            {
                if (remoteAttribute.getId().equals(localAttribute.getId()))
                {
                    exists = true;
                    break;
                }
            }
            
            if (!exists)
            {
                indexList.add(model.getAttributes().indexOf(localAttribute));
            }
        }
        
        for (Integer index: indexList)
        {
            model.getAttributes().remove(index.intValue());
        }
    }
/**
     * Method that checks the model for any attributes that no longer exist and removes them. Compares the local list of
     * attributes stored in the model against the list of the attributes received from the remote system.
     * 
     * @param model
     *      {@link MetaTypeModel} containing the local list of attributes to be checked.
     * @param attributeList
     *      The list of {@link AttributeDefinitionType} that represents the attributes on the remote system.
     */
Method that checks the model for any attributes that no longer exist and removes them. Compares the local list of
attributes stored in the model against the list of the attributes received from the remote system.

@param model
MetaTypeModel containing the local list of attributes to be checked.
@param attributeList
The list of  AttributeDefinitionType that represents the attributes on the remote system.
Method that checks the model for any attributes that no longer exist and removes them . Compares the local list of attributes stored in the model against the list of the attributes received from the remote system . @param model MetaTypeModel containing the local list of attributes to be checked . @param attributeList The list of AttributeDefinitionType that represents the attributes on the remote system .
private void cleanupAttributes(final MetaTypeModel model, final List<AttributeDefinitionType> attributeList)
    {
        final List<Integer> indexList = new ArrayList<Integer>();
        for (AttributeModel localAttribute: model.getAttributes())
        {
            boolean exists = false;
            for (AttributeDefinitionType remoteAttribute: attributeList)
            {
                if (remoteAttribute.getId().equals(localAttribute.getId()))
                {
                    exists = true;
                    break;
                }
            }
            if (!exists)
            {
                indexList.add(model.getAttributes().indexOf(localAttribute));
            }
        }
        for (Integer index: indexList)
        {
            model.getAttributes().remove(index.intValue());
        }
    }
private void cleanupAttributes ( final MetaTypeModel model , final List < AttributeDefinitionType > attributeList ) { final List < Integer > indexList = new ArrayList < Integer > ( ) ; for ( AttributeModel localAttribute : model . getAttributes ( ) ) { boolean exists = false ; for ( AttributeDefinitionType remoteAttribute : attributeList ) { if ( remoteAttribute . getId ( ) . equals ( localAttribute . getId ( ) ) ) { exists = true ; break ; } } if ( ! exists ) { indexList . add ( model . getAttributes ( ) . indexOf ( localAttribute ) ) ; } } for ( Integer index : indexList ) { model . getAttributes ( ) . remove ( index . intValue ( ) ) ; } }
Method that checks the model for any attributes that no longer exist and removes them.
Method that checks the model for any attributes that no longer exist and removes them .