for (Node timePeriodNode : timePeriods) {
Instant begining = new DefaultInstant((Position) timePeriodNode.getChild("beginPosition").getValue());
Instant ending = new DefaultInstant((Position) timePeriodNode.getChild("endPosition").getValue());
//Period timePeriod = new DefaultPeriod(begining, ending);
TimePeriodType timePeriod = Wcs10Factory.eINSTANCE.createTimePeriodType();
TimePositionType beginPosition = Gml4wcsFactory.eINSTANCE.createTimePositionType();
TimePositionType endPosition = Gml4wcsFactory.eINSTANCE.createTimePositionType();
beginPosition.setValue(begining.getPosition().getDate());
endPosition.setValue(ending.getPosition().getDate());
timePeriod.setBeginPosition(beginPosition);
timePeriod.setEndPosition(endPosition);
results.getTimePeriod().add(timePeriod);
}
return results;