mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/osgi/MetatypeMessageService.java
private void addAttributesForKey(final GetAttributeDefinitionResponseData.Builder response, final String key, 
            final AttributeDefinition[] attributes, final int filter)
    {
        for (AttributeDefinition attrib : attributes)
        {
            //get the attribute definition type
            final AttributeDefinitionType attributeDef = convertToAttribDefType(attrib, filter);
            if (key == null || key.isEmpty())
            {
                //if there is not a key set add all definitions
                response.addAttributeDefinition(attributeDef);
            }
            else if (attrib.getID().equals(key))
            {
                //only one definition was being looked for
                response.addAttributeDefinition(attributeDef);
            }
        }
    }
/**
     * Adds attributes to the attribute definition response based on the key provided.
     * 
     * @param response
     *      The response builder the attributes should be added to.
     * @param key
     *      The key that represents the attributes that should be added. If the key is null all attributes in the array
     *      will be added to the response.
     * @param attributes
     *      The array of attributes to be iterated over.
     * @param filter
     *      The filter used to determine whether the attribute definitions are required or not. Valid values are 
     *      {@link ObjectClassDefinition#REQUIRED}, and {@link ObjectClassDefinition#OPTIONAL}.
     */
Adds attributes to the attribute definition response based on the key provided.

@param response
The response builder the attributes should be added to.
@param key
The key that represents the attributes that should be added. If the key is null all attributes in the array
will be added to the response.
@param attributes
The array of attributes to be iterated over.
@param filter
The filter used to determine whether the attribute definitions are required or not.
Adds attributes to the attribute definition response based on the key provided . @param response The response builder the attributes should be added to . @param key The key that represents the attributes that should be added . If the key is null all attributes in the array will be added to the response . @param attributes The array of attributes to be iterated over . @param filter The filter used to determine whether the attribute definitions are required or not .
private void addAttributesForKey(final GetAttributeDefinitionResponseData.Builder response, final String key, 
            final AttributeDefinition[] attributes, final int filter)
    {
        for (AttributeDefinition attrib : attributes)
        {
            final AttributeDefinitionType attributeDef = convertToAttribDefType(attrib, filter);
            if (key == null || key.isEmpty())
            {
                response.addAttributeDefinition(attributeDef);
            }
            else if (attrib.getID().equals(key))
            {
                response.addAttributeDefinition(attributeDef);
            }
        }
    }
private void addAttributesForKey ( final GetAttributeDefinitionResponseData . Builder response , final String key , final AttributeDefinition [ ] attributes , final int filter ) { for ( AttributeDefinition attrib : attributes ) { final AttributeDefinitionType attributeDef = convertToAttribDefType ( attrib , filter ) ; if ( key == null || key . isEmpty ( ) ) { response . addAttributeDefinition ( attributeDef ) ; } else if ( attrib . getID ( ) . equals ( key ) ) { response . addAttributeDefinition ( attributeDef ) ; } } }
Adds attributes to the attribute definition response based on the key provided.
Adds attributes to the attribute definition response based on the key provided .
//get the attribute definition type //if there is not a key set add all definitions //only one definition was being looked for