Example #1
0
 public void processObservation(
     OmObservation observation,
     TimePeriod timePeriod,
     TimeInstant resultTime,
     FeatureCollection featureCollection,
     AbstractEReportingHeader eReportingHeader,
     int counter) {
   if (observation.isSetPhenomenonTime()) {
     // generate gml:id
     observation.setGmlId(getObservationId(counter));
     // add xlink:href to eReportingHeader.content
     eReportingHeader.addContent(
         (AbstractFeature)
             new OmObservation()
                 .setIdentifier(
                     new CodeWithAuthority(getObservationXlink(observation.getGmlId()))));
     timePeriod.extendToContain(observation.getPhenomenonTime());
     observation.setResultTime(resultTime);
     featureCollection.addMember(observation);
   }
 }