protected Collection<String> getProceduresForOffering(String offering, String version) throws OwsExceptionReport { Collection<String> procedures =new HashSet<>(getCache().getProceduresForOffering(offering)); if (version.equals(Sos1Constants.SERVICEVERSION)) { procedures.addAll(getCache().getHiddenChildProceduresForOffering(offering)); } return procedures.stream() .filter(getCache().getPublishedProcedures()::contains) .collect(toSet()); }
/** * checks if the passed offeringId is supported * * @param offeringIds * the offeringId to be checked * * * @throws OwsExceptionReport * if the passed offeringId is not supported */ private void checkOfferingId(final List<String> offeringIds) throws OwsExceptionReport { if (offeringIds != null) { final Set<String> offerings = getCache().getOfferings(); final CompositeOwsException exceptions = new CompositeOwsException(); for (final String offeringId : offeringIds) { if (offeringId == null || offeringId.isEmpty()) { exceptions.add(new MissingOfferingParameterException()); } else if (offeringId.contains(SosConstants.SEPARATOR_4_OFFERINGS)) { final String[] offArray = offeringId.split(SosConstants.SEPARATOR_4_OFFERINGS); if (!offerings.contains(offArray[0]) || !getCache().getProceduresForOffering(offArray[0]).contains(offArray[1])) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } else if (!offerings.contains(offeringId)) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } exceptions.throwIfNotEmpty(); } }
/** * checks if the passed offeringId is supported * * @param offeringIds * the offeringId to be checked * * * @throws OwsExceptionReport * if the passed offeringId is not supported */ private void checkOfferingId(final List<String> offeringIds) throws OwsExceptionReport { if (offeringIds != null) { final Set<String> offerings = getCache().getOfferings(); final CompositeOwsException exceptions = new CompositeOwsException(); for (final String offeringId : offeringIds) { if (offeringId == null || offeringId.isEmpty()) { exceptions.add(new MissingOfferingParameterException()); } else if (offeringId.contains(SosConstants.SEPARATOR_4_OFFERINGS)) { final String[] offArray = offeringId.split(SosConstants.SEPARATOR_4_OFFERINGS); if (!offerings.contains(offArray[0]) || !getCache().getProceduresForOffering(offArray[0]).contains(offArray[1])) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } else if (!offerings.contains(offeringId)) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } exceptions.throwIfNotEmpty(); } }
/** * checks if the passed offeringId is supported * * @param offeringIds * the offeringId to be checked * * * @throws OwsExceptionReport * if the passed offeringId is not supported */ private void checkOfferingId(final List<String> offeringIds) throws OwsExceptionReport { if (offeringIds != null) { Set<String> offerings = getCache().getOfferings(); CompositeOwsException exceptions = new CompositeOwsException(); offeringIds.forEach((offeringId) -> { if (offeringId == null || offeringId.isEmpty()) { exceptions.add(new MissingOfferingParameterException()); } else if (offeringId.contains(SosConstants.SEPARATOR_4_OFFERINGS)) { final String[] offArray = offeringId.split(SosConstants.SEPARATOR_4_OFFERINGS); if (!offerings.contains(offArray[0]) || !getCache().getProceduresForOffering(offArray[0]).contains(offArray[1])) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } else if (!offerings.contains(offeringId)) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } }); exceptions.throwIfNotEmpty(); } }
/** * checks if the passed offeringId is supported * * @param offeringIds * the offeringId to be checked * * * @throws OwsExceptionReport * if the passed offeringId is not supported */ private void checkOfferingId(final List<String> offeringIds) throws OwsExceptionReport { if (offeringIds != null) { Set<String> offerings = getCache().getOfferings(); CompositeOwsException exceptions = new CompositeOwsException(); offeringIds.forEach((offeringId) -> { if (offeringId == null || offeringId.isEmpty()) { exceptions.add(new MissingOfferingParameterException()); } else if (offeringId.contains(SosConstants.SEPARATOR_4_OFFERINGS)) { final String[] offArray = offeringId.split(SosConstants.SEPARATOR_4_OFFERINGS); if (!offerings.contains(offArray[0]) || !getCache().getProceduresForOffering(offArray[0]).contains(offArray[1])) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } else if (!offerings.contains(offeringId)) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } }); exceptions.throwIfNotEmpty(); } }
/** * checks if the passed offeringId is supported * * @param offeringIds * the offeringId to be checked * * * @throws OwsExceptionReport * if the passed offeringId is not supported */ private void checkOfferingId(final Set<String> offeringIds) throws OwsExceptionReport { if (offeringIds != null) { final Set<String> offerings = getCache().getOfferings(); final CompositeOwsException exceptions = new CompositeOwsException(); for (final String offeringId : offeringIds) { if (offeringId == null || offeringId.isEmpty()) { exceptions.add(new MissingOfferingParameterException()); } else if (offeringId.contains(SosConstants.SEPARATOR_4_OFFERINGS)) { final String[] offArray = offeringId.split(SosConstants.SEPARATOR_4_OFFERINGS); if (!offerings.contains(offArray[0]) || !getCache().getProceduresForOffering(offArray[0]).contains(offArray[1])) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } else if (!offerings.contains(offeringId)) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } exceptions.throwIfNotEmpty(); } }
/** * checks if the passed offeringId is supported * * @param offeringIds * the offeringId to be checked * * * @throws OwsExceptionReport * if the passed offeringId is not supported */ private void checkOfferingId(final Set<String> offeringIds) throws OwsExceptionReport { if (offeringIds != null) { final Set<String> offerings = getCache().getOfferings(); final CompositeOwsException exceptions = new CompositeOwsException(); for (final String offeringId : offeringIds) { if (offeringId == null || offeringId.isEmpty()) { exceptions.add(new MissingOfferingParameterException()); } else if (offeringId.contains(SosConstants.SEPARATOR_4_OFFERINGS)) { final String[] offArray = offeringId.split(SosConstants.SEPARATOR_4_OFFERINGS); if (!offerings.contains(offArray[0]) || !getCache().getProceduresForOffering(offArray[0]).contains(offArray[1])) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } else if (!offerings.contains(offeringId)) { exceptions.add(new InvalidOfferingParameterException(offeringId)); } } exceptions.throwIfNotEmpty(); } }