Esempio n. 1
0
 /**
  * Get the temporal filter with valueReference phenomenonTime from extensions
  *
  * @param extensions To get filter from
  * @return Temporal filter with valueReference phenomenonTime
  */
 private TemporalFilter getPhenomenonTimeFilter(SwesExtensions extensions) {
   for (SwesExtension<?> extension : extensions.getExtensions()) {
     if (extension.getValue() instanceof TemporalFilter) {
       TemporalFilter filter = (TemporalFilter) extension.getValue();
       if (TemporalRestrictions.PHENOMENON_TIME_VALUE_REFERENCE.equals(
           filter.getValueReference())) {
         return filter;
       }
     }
   }
   return null;
 }
Esempio n. 2
0
 /**
  * Check if extensions contains a temporal filter with valueReference phenomenonTime
  *
  * @param extensions Extensions to check
  * @return <code>true</code>, if extensions contains a temporal filter with valueReference
  *     phenomenonTime
  */
 private boolean hasPhenomenonTimeFilter(SwesExtensions extensions) {
   boolean hasFilter = false;
   for (SwesExtension<?> extension : extensions.getExtensions()) {
     if (extension.getValue() instanceof TemporalFilter) {
       TemporalFilter filter = (TemporalFilter) extension.getValue();
       if (TemporalRestrictions.PHENOMENON_TIME_VALUE_REFERENCE.equals(
           filter.getValueReference())) {
         hasFilter = true;
       }
     }
   }
   return hasFilter;
 }
Esempio n. 3
0
 public ReportObligationType getFlow(SwesExtensions extensions)
     throws InvalidParameterValueException {
   if (hasFlowExtension(extensions)) {
     SwesExtension<?> extension = extensions.getExtension(AqdConstants.EXTENSION_FLOW);
     if (extension.getValue() instanceof SweText) {
       try {
         return ReportObligationType.from(((SweText) extension.getValue()).getValue());
       } catch (IllegalArgumentException iae) {
         throw new InvalidParameterValueException(
             AqdConstants.EXTENSION_FLOW, ((SweText) extension.getValue()).getValue());
       }
     }
   }
   return ReportObligationType.E2A;
 }