waterml/src/main/java/ucar/nc2/ogc/gml/NcTimePeriodType.java
public static TimePeriodType initTimePeriod(
            TimePeriodType timePeriod, StationTimeSeriesFeature stationFeat) throws IOException {
        // @gml:id
        String id = MarshallingUtil.createIdForType(TimePeriodType.class);
        timePeriod.setId(id);

        CollectionInfo info;
        try {
            info = new DsgCollectionHelper(stationFeat).calcBounds();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        CalendarDateRange cdr = info.getCalendarDateRange(stationFeat.getTimeUnit());
        if (cdr != null) {

            // gml:beginPosition
            NcTimePositionType.initBeginPosition(timePeriod.addNewBeginPosition(), cdr.getStart());

            // gml:endPosition
            NcTimePositionType.initEndPosition(timePeriod.addNewEndPosition(), cdr.getEnd());
        }

        return timePeriod;
    }
public static TimePeriodType initTimePeriod(
            TimePeriodType timePeriod, StationTimeSeriesFeature stationFeat) throws IOException {
        // @gml:id
        String id = MarshallingUtil.createIdForType(TimePeriodType.class);
        timePeriod.setId(id);

        CollectionInfo info;
        try {
            info = new DsgCollectionHelper(stationFeat).calcBounds();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        CalendarDateRange cdr = info.getCalendarDateRange(stationFeat.getTimeUnit());
        if (cdr != null) {

            // gml:beginPosition
            NcTimePositionType.initBeginPosition(timePeriod.addNewBeginPosition(), cdr.getStart());

            // gml:endPosition
            NcTimePositionType.initEndPosition(timePeriod.addNewEndPosition(), cdr.getEnd());
        }

        return timePeriod;
    }
public static TimePeriodType initTimePeriod ( TimePeriodType timePeriod , StationTimeSeriesFeature stationFeat ) throws IOException { // @gml:id String id = MarshallingUtil . createIdForType ( TimePeriodType . class ) ; timePeriod . setId ( id ) ; CollectionInfo info ; try { info = new DsgCollectionHelper ( stationFeat ) . calcBounds ( ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } CalendarDateRange cdr = info . getCalendarDateRange ( stationFeat . getTimeUnit ( ) ) ; if ( cdr != null ) { // gml:beginPosition NcTimePositionType . initBeginPosition ( timePeriod . addNewBeginPosition ( ) , cdr . getStart ( ) ) ; // gml:endPosition NcTimePositionType . initEndPosition ( timePeriod . addNewEndPosition ( ) , cdr . getEnd ( ) ) ; } return timePeriod ; }
wml2:Collection/wml2:observationMember/om:OM_Observation/om:phenomenonTime/gml:TimePeriod
wml2 : Collection / wml2 : observationMember / om : OM_Observation / om : phenomenonTime / gml : TimePeriod