protected XMLGregorianCalendar parseTerminationTime(String value) {
   try {
     Duration d = datatypeFactory.newDuration(value);
     XMLGregorianCalendar c = getCurrentTime();
     c.add(d);
     return c;
   } catch (Exception e) {
     // Ignore
   }
   try {
     Duration d = datatypeFactory.newDurationDayTime(value);
     XMLGregorianCalendar c = getCurrentTime();
     c.add(d);
     return c;
   } catch (Exception e) {
     // Ignore
   }
   try {
     Duration d = datatypeFactory.newDurationYearMonth(value);
     XMLGregorianCalendar c = getCurrentTime();
     c.add(d);
     return c;
   } catch (Exception e) {
     // Ignore
   }
   try {
     return datatypeFactory.newXMLGregorianCalendar(value);
   } catch (Exception e) {
     // Ignore
   }
   return null;
 }
 public AbstractSubscription(String name) {
   super(name);
   try {
     this.datatypeFactory = DatatypeFactory.newInstance();
     notifyObserver = new NotifyObserver();
   } catch (DatatypeConfigurationException e) {
     throw new RuntimeException("Unable to initialize subscription", e);
   }
 }
 protected XMLGregorianCalendar getCurrentTime() {
   return datatypeFactory.newXMLGregorianCalendar(new GregorianCalendar());
 }