protected List<String> addChildObservableProperties(List<String> observedProperties) { Set<String> allObservedProperties = Sets.newHashSet(observedProperties); if (isIncludeChildObservableProperties()) { for (String observedProperty : observedProperties) { if (getCache().isCompositePhenomenon(observedProperty)) { allObservedProperties.addAll(getCache().getObservablePropertiesForCompositePhenomenon(observedProperty)); } } } return Lists.newArrayList(allObservedProperties); }
protected void checkObservedProperty(String observedProperty, String parameterName, boolean insertion) throws OwsExceptionReport { if (observedProperty == null || observedProperty.isEmpty()) { throw new MissingParameterValueException(parameterName); } if (insertion) { if (!getCache().hasObservableProperty(observedProperty)) { throw new InvalidParameterValueException(parameterName, observedProperty); } } else if (isIncludeChildObservableProperties()) { if (getCache().isCompositePhenomenon(observedProperty) || !(getCache().isCompositePhenomenonComponent(observedProperty) || getCache().hasObservableProperty(observedProperty))) { throw new InvalidParameterValueException(parameterName, observedProperty); } } else if (!getCache().getPublishedObservableProperties().contains(observedProperty)) { throw new InvalidParameterValueException(parameterName, observedProperty); } }
protected void checkForCompositeObservableProperty(AbstractPhenomenon observableProperty, Set<String> offerings, Enum<?> parameterName) throws InvalidParameterValueException { String observablePropertyIdentifier = observableProperty.getIdentifier(); if (hasObservations(observablePropertyIdentifier, offerings) && observableProperty.isComposite() != getCache().isCompositePhenomenon(observablePropertyIdentifier) && checkComponentsIfInserted(((OmCompositePhenomenon) observableProperty).getPhenomenonComponents())) { throw new InvalidParameterValueException(parameterName, observablePropertyIdentifier); } }
protected void checkForCompositeObservableProperty(AbstractPhenomenon observableProperty, Set<String> offerings, Enum<?> parameterName) throws InvalidParameterValueException { String observablePropertyIdentifier = observableProperty.getIdentifier(); if (hasObservations(observablePropertyIdentifier, offerings) && observableProperty.isComposite() != getCache().isCompositePhenomenon(observablePropertyIdentifier) && checkComponentsIfInserted(((OmCompositePhenomenon) observableProperty).getPhenomenonComponents())) { throw new InvalidParameterValueException(parameterName, observablePropertyIdentifier); } }