private SweTime parseTime(Time time) throws DecodingException { SweTime sosTime = new SweTime(); if (time.isSetValue()) { sosTime.setValue(DateTimeHelper.parseIsoString2DateTime(time.getValue().toString())); } if (time.getUom() != null) { sosTime.setUom(time.getUom().getHref()); } return sosTime; }
DateTime dateTime = new DateTime(time.getValue()); newEvent.put(MapEposEvent.START_KEY, dateTime.getMillis()); newEvent.put(MapEposEvent.END_KEY, dateTime.getMillis());
private SweAbstractSimpleType<DateTime> parseTime(final Time time) throws OwsExceptionReport { final SweTime sosTime = new SweTime(); if (time.isSetValue()) { sosTime.setValue(DateTimeHelper.parseIsoString2DateTime(time.getValue().toString())); } if (time.getUom() != null) { sosTime.setUom(time.getUom().getHref()); } if (time.isSetConstraint()) { sosTime.setConstraint(parseConstraint(time.getConstraint())); } return sosTime; }