}
}     if ( trigger instanceof BelievabilityAction ) { logDetail( "Action trigger. Starting delay timer for: " + _asset_id );     startPublishDelayTimer(); return; }
    void handleBeliefTrigger( BeliefUpdateTrigger trigger )            throws BelievabilityException    {        // Method implementation comments go here ...        logDetail( "Handling trigger: " + trigger.toString() );        // First step is to add the trigger (no matter what type of        // trigger this is, we add it).        //        if ( ! add( trigger ))        {            logDebug( "Trigger discarded for "                      + _asset_id + " (happened in the past?)" );            return;        }        // Now we run through the possible conditions under which we        // may want to compute a new belief state, predominantly based        // upon the type of trigger we are seeing..        // On actions, we always update the belief and publish it.        //        // Also, if the trigger here is because a timer went off        // indicating it has been too long since we have published,        // then we publish now. We will also need to start a new timer        // for the next period.        //        if (( trigger instanceof BelievabilityAction )            || ( trigger instanceof PublishIntervalTimeTrigger ))        {            if ( trigger instanceof BelievabilityAction )                logDetail( "Action trigger. Updating and publishing: "                           + _asset_id );            else                logDetail( "Publish time-out. Updating and publishing: "                           + _asset_id );            updateBeliefState( );            publishLatestBelief( );            return;        }        // If we have seen a diagnosis from all sensors, then we        // should not wait until the end of the max sensor latency        // period. Note that if there is only one sensor, this wil        // return true on the first diagnosis addition and thus cause        // an immediate belief computation.        //        // Also, if we the trigger is signalling the end of the sensor        // latency period, then we need to update the belief state and        // check to see if we should publish it.        //        else if (( trigger instanceof SensorLatencyTimeTrigger )                 || seenAllSensors() )        {            if ( trigger instanceof SensorLatencyTimeTrigger )                 logDetail( "Latency timer. Updating belief: "                           + _asset_id );            else                logDetail( "Seen all sensors. Updating belief: "                           + _asset_id );                        updateBeliefState( );                        if ( utilityHasChangedEnough())            {                publishLatestBelief();            }            else            {                logDetail( "Utility has not changed enough to publish: "                           + _asset_id );            }            return;        } // if SensorLatencyTimeTrigger or seenAllSensors()        // If this is the first sensor we are seeing (and there are        // more than one for this asset), then we need to start a        // timer to wait for the maximum latency time before actuall        // generating a new belie state.        //        else if ( trigger instanceof BelievabilityDiagnosis )        {            if ( _current_triggers.size() == 1 )            {                logDetail( "First, diagnosis, deferring belief update for: "                           + _asset_id );                                startSensorLatencyTimer();                return;            }            else            {                logDetail( "Deferring belief update (diagnosis) for: "                           + _asset_id );                return;            }        } // if BelievabilityDiagnosis        else        {            logDebug( "unknown trigger for: "                      + _asset_id );       }           } // method handleBeliefTrigger