TimeInterval requested = getPreferenceTimeInterval(relay.getServiceRequest().getServicePreferences()); TimeInterval provided = getPreferenceTimeInterval(relay.getServiceContract().getServicePreferences());
TimeSpan requested = SDFactory.getTimeSpanFromPreferences(relay.getServiceRequest().getServicePreferences()); TimeSpan provided = SDFactory.getTimeSpanFromPreferences(relay.getServiceContract().getServicePreferences());
  private boolean timeIntervalRequestedCompletelySatisfied(ServiceContractRelay relay) {    if (relay.getServiceContract() == null) {      return false;    }    TimeInterval requested =       getPreferenceTimeInterval(relay.getServiceRequest().getServicePreferences());    TimeInterval provided =       getPreferenceTimeInterval(relay.getServiceContract().getServicePreferences());    if ((requested == null) ||	(provided == null)) {      return false;    } else {    return ((requested.getStartTime() >= provided.getStartTime()) && 	    (requested.getEndTime() <= provided.getEndTime()));    }  }