continue; }
} else {
  protected void handleChangedServiceContractRelays(Collection changedRelays) {    if (myLoggingService.isDebugEnabled()) {      myLoggingService.debug(getAgentIdentifier() +                             " handleChangedServiceContractRelays " +changedRelays.size());    }    for (Iterator iterator = changedRelays.iterator();	   iterator.hasNext();) {      ServiceContractRelay relay = (ServiceContractRelay)iterator.next();      ServiceContract contract = relay.getServiceContract();      Role role = contract.getServiceRole();      //if the role is now completely covered, discard the history      if (checkProviderCompletelyCovered(role)) {        if (myLoggingService.isDebugEnabled()) {          myLoggingService.debug(getAgentIdentifier() +                                 ": handleChangedServiceContractRelays() " +				 "completely covered for " + role);        }        myServiceRequestHistories.remove(role);	continue;      }      //only take action if you are the client agent      // (not if you are the provider)      //if your service contract got revoked, or your requested      //service time interval was not satistied, do a new service query      if (myLoggingService.isDebugEnabled()) {        myLoggingService.debug(getAgentIdentifier() +                               " revoked " + 			       contract.isRevoked() +                               " !satisfied " + 			       !timeIntervalRequestedCompletelySatisfied(relay) +                               " client " + 			       relay.getClient().equals(getSelfOrg()));      }      if ((relay.getClient().equals(getSelfOrg())) &&	  ((contract.isRevoked() ||           !timeIntervalRequestedCompletelySatisfied(relay)))) {        if (myLoggingService.isDebugEnabled()) {          myLoggingService.debug(getAgentIdentifier() +                                 " queryServices because a service contract was revoked or did not satisfy the request for " +                                 role);        }	TimeSpan requestedTimeInterval = 	  SDFactory.getTimeSpanFromPreferences(relay.getServiceRequest().getServicePreferences());		ServiceRequestHistory srh = 	  augmentServiceRequestHistory(relay, requestedTimeInterval);	if (myLoggingService.isDebugEnabled()) {          myLoggingService.debug(getAgentIdentifier() +                                 " do another queryServices for " +                                 role);        }	TimeSpan providedTimeInterval = 	  SDFactory.getTimeSpanFromPreferences(contract.getServicePreferences());	Collection uncoveredTimeIntervals = 	  TimeInterval.removeInterval(providedTimeInterval, requestedTimeInterval);	String minimumEchelon = getMinimumEchelon(role);	for (Iterator uncoveredIterator = uncoveredTimeIntervals.iterator();	     uncoveredIterator.hasNext();) {		  TimeSpan uncoveredInterval = 	    (TimeSpan) uncoveredIterator.next();	  Collection opconIntervals = 	    getOPCONSchedule().intersectingSet(uncoveredInterval);	  if (opconIntervals.isEmpty()) { 	    myLoggingService.error(getAgentIdentifier() + 				   " handleChangedServiceContractRelays: " +				   " no OPCON lineage on blackboard for " + 				   new Date(uncoveredInterval.getStartTime()) + 				   " to " +				   new Date(uncoveredInterval.getEndTime()) +				   ". Unable to generate MMRoleQuery for " + role);	    continue;	  } else if (!continuousCoverage(uncoveredInterval, 					 new TimeSpanSet(opconIntervals))) { 	    myLoggingService.error(getAgentIdentifier() + 				   " handleChangedServiceContractRelays: " +				   " gap in OPCON coverage at some point in " + 				   new Date(uncoveredInterval.getStartTime()) + 				   " to " +				   new Date(uncoveredInterval.getEndTime()) +				   ".");	  }	  for (Iterator opconIterator = opconIntervals.iterator();	       opconIterator.hasNext();) {	    TimeSpan opconInterval = (TimeSpan) opconIterator.next();	    Lineage commandLineage = getCommandLineage(opconInterval);		    if (commandLineage != null) {	      ArrayList arrayList = new ArrayList(1);	      arrayList.add(TimeSpans.getSpan(opconInterval.getStartTime(),					      opconInterval.getEndTime()));	      	      LineageEchelonScorer serviceScorer = 		new ALLineageEchelonScorer(commandLineage,					   getMinimumEchelon(role),					   role,					   getAgentIdentifier().toString(),					   srh, 					   arrayList);	      queryServices(role, serviceScorer, opconInterval);	    } else {	      // Should be impossible	      myLoggingService.error(getAgentIdentifier() + 				     " handleChangedServiceContractRelays: " +				     " no OPCON lineage on blackboard for " + 				     new Date(opconInterval.getStartTime()) + 				     " to " +				     new Date(opconInterval.getEndTime()) +				     " Unable to generate MMRoleQuery for " + role);	    }	  }	  //publishRemove(relay);	}      } else if ((relay.getClient().equals(getSelfOrg())) &&		 (timeIntervalRequestedCompletelySatisfied(relay))) {	if (myLoggingService.isDebugEnabled()) {	  myLoggingService.debug(getAgentIdentifier() +				 " handleChangedServiceContractRelays timeIntervalRequestedCompletelySatisfied " +				 role);	}      } else if (!timeIntervalRequestedCompletelySatisfied(relay) &&		 relay.getClient().equals(getSelfOrg())) {	if (myLoggingService.isDebugEnabled()) {            myLoggingService.debug(getAgentIdentifier() +                                   " handleChangedServiceContractRelays not timeIntervalRequestedCompletelySatisfied " +                                   role);	}      }    }  }