Ejemplo 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;
 }
Ejemplo 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;
 }