mil.dod.th.ose.remote/src/mil/dod/th/ose/remote/observation/ObservationMessageService.java
private Message removeObservation(final TerraHarvestMessage message, final ObservationStoreNamespace obsMessage, 
        final RemoteChannel channel) throws InvalidProtocolBufferException 
    {
        final RemoveObservationRequestData request = RemoveObservationRequestData.parseFrom(obsMessage.getData());
            
        //pull out the type of interaction
        final Query requestQuery = Query.parseFrom(request.getObsQuery().toByteString());
        
        final ObservationQuery obsQuery = createObservationQuery(requestQuery);
        
        final long obsRemoved = obsQuery.remove();
        
        final RemoveObservationResponseData response = 
                RemoveObservationResponseData.newBuilder().setNumberOfObsRemoved(obsRemoved).build();
        
        m_MessageFactory.createObservationStoreResponseMessage(message,
              ObservationStoreMessageType.RemoveObservationResponse, response).queue(channel);
    
        return request;
    }
/**
     * Handle the request to remove observations by an {@link Query} type. 
     * @param message
     *     message that contains the request parameters to use to query the observation store
     * @param obsMessage
     *     message containing the observation store namespace message
     * @param channel
     *     the channel from which the message originated from
     * @return
     *     the parsed data message
     * @throws InvalidProtocolBufferException 
     *     throw in the event that the namespace specific message could not be parsed.
     */
Handle the request to remove observations by an  Query type.
Handle the request to remove observations by an Query type .
private Message removeObservation(final TerraHarvestMessage message, final ObservationStoreNamespace obsMessage, 
        final RemoteChannel channel) throws InvalidProtocolBufferException 
    {
        final RemoveObservationRequestData request = RemoveObservationRequestData.parseFrom(obsMessage.getData());
        final Query requestQuery = Query.parseFrom(request.getObsQuery().toByteString());
        final ObservationQuery obsQuery = createObservationQuery(requestQuery);
        final long obsRemoved = obsQuery.remove();
        final RemoveObservationResponseData response = 
                RemoveObservationResponseData.newBuilder().setNumberOfObsRemoved(obsRemoved).build();
        m_MessageFactory.createObservationStoreResponseMessage(message,
              ObservationStoreMessageType.RemoveObservationResponse, response).queue(channel);
        return request;
    }
private Message removeObservation ( final TerraHarvestMessage message , final ObservationStoreNamespace obsMessage , final RemoteChannel channel ) throws InvalidProtocolBufferException { final RemoveObservationRequestData request = RemoveObservationRequestData . parseFrom ( obsMessage . getData ( ) ) ; final Query requestQuery = Query . parseFrom ( request . getObsQuery ( ) . toByteString ( ) ) ; final ObservationQuery obsQuery = createObservationQuery ( requestQuery ) ; final long obsRemoved = obsQuery . remove ( ) ; final RemoveObservationResponseData response = RemoveObservationResponseData . newBuilder ( ) . setNumberOfObsRemoved ( obsRemoved ) . build ( ) ; m_MessageFactory . createObservationStoreResponseMessage ( message , ObservationStoreMessageType . RemoveObservationResponse , response ) . queue ( channel ) ; return request ; }
Handle the request to remove observations by an {@link Query} type.
Handle the request to remove observations by an { @link Query } type .
//pull out the type of interaction