mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/advanced/configuration/SystemMetaTypeMgrImpl.java
private void tryAddAttribute(final MetaTypeModel model, final AttributeModel attribute)
    {  
        final List<AttributeModel> attributeList = model.getAttributes();
        for (int i = 0; i < attributeList.size(); i++)
        {
            if (attributeList.get(i).getId().equals(attribute.getId()))
            {
                //Replacing definition if it already exists with updated definition.
                attributeList.set(i, attribute);
                return;
            }
        }
        
        //Adding definition if it does not exist.
        model.getAttributes().add(attribute);
    }
/**
     * Method tries to add an attribute model to the specified meta type model. If the attribute already exists then
     * it is replaced with the new model.
     * 
     * @param model
     *          Meta type model to try to add an attribute to.
     * @param attribute
     *          The attribute to be added.
     */
Method tries to add an attribute model to the specified meta type model. If the attribute already exists then
it is replaced with the new model.

@param model
Meta type model to try to add an attribute to.
@param attribute
The attribute to be added.
Method tries to add an attribute model to the specified meta type model . If the attribute already exists then it is replaced with the new model . @param model Meta type model to try to add an attribute to . @param attribute The attribute to be added .
private void tryAddAttribute(final MetaTypeModel model, final AttributeModel attribute)
    {  
        final List<AttributeModel> attributeList = model.getAttributes();
        for (int i = 0; i < attributeList.size(); i++)
        {
            if (attributeList.get(i).getId().equals(attribute.getId()))
            {
                attributeList.set(i, attribute);
                return;
            }
        }
        model.getAttributes().add(attribute);
    }
private void tryAddAttribute ( final MetaTypeModel model , final AttributeModel attribute ) { final List < AttributeModel > attributeList = model . getAttributes ( ) ; for ( int i = 0 ; i < attributeList . size ( ) ; i ++ ) { if ( attributeList . get ( i ) . getId ( ) . equals ( attribute . getId ( ) ) ) { attributeList . set ( i , attribute ) ; return ; } } model . getAttributes ( ) . add ( attribute ) ; }
Method tries to add an attribute model to the specified meta type model.
Method tries to add an attribute model to the specified meta type model .
//Replacing definition if it already exists with updated definition. //Adding definition if it does not exist.