private Set<String> getParentOfferings(ProcedureEntity hProcedure) { Set<String> parentOfferings = new HashSet<>(); if (hProcedure.hasParents()) { for (ProcedureEntity proc : hProcedure.getParents()) { parentOfferings.addAll(getCache().getOfferingsForProcedure(proc.getIdentifier())); } } return parentOfferings; }
private Set<String> getAllParentOfferings(ProcedureEntity hProcedure) { Set<String> parentOfferings = new HashSet<>(); if (hProcedure.hasParents()) { for (ProcedureEntity proc : hProcedure.getParents()) { parentOfferings.addAll(getCache().getOfferingsForProcedure(proc.getIdentifier())); parentOfferings.addAll(getParentOfferings(hProcedure)); } } return parentOfferings; }
private void addOfferings(Set<String> keywords) { if (procedureSettings().isEnrichWithOfferings()) { for (String offering : getCache() .getOfferingsForProcedure(getIdentifier())) { if (getCache().getPublishedOfferings().contains(offering)) { keywords.add(offering); } } } }
private OmObservationConstellation getObservationConstellation(SosProcedureDescription<?> procedure, OmObservableProperty obsProp, AbstractFeature feature) { OmObservationConstellation obsConst = new OmObservationConstellation(procedure, obsProp, null, feature, null); /* get the offerings to find the templates */ if (obsConst.getOfferings() == null) { obsConst.setOfferings(Sets.newHashSet(getCache().getOfferingsForProcedure( obsConst.getProcedure().getIdentifier()))); } return obsConst; }
private OmObservationConstellation getObservationConstellation(SosProcedureDescription<?> procedure, OmObservableProperty obsProp, AbstractFeature feature) { OmObservationConstellation obsConst = new OmObservationConstellation(procedure, obsProp, null, feature, null); /* get the offerings to find the templates */ if (obsConst.getOfferings() == null) { obsConst.setOfferings(Sets.newHashSet(getCache().getOfferingsForProcedure( obsConst.getProcedure().getIdentifier()))); } return obsConst; }
/** * Get featureOfInterests for procedure and version * * @return Collection with featureOfInterests * * @throws OwsExceptionReport If an error occurs */ private Collection<String> getFeatureOfInterestIDs() throws OwsExceptionReport { Set<String> features = Sets.newHashSet(); // add cache map for proc/fois and get fois for proc for (String offering : getCache().getOfferingsForProcedure(getIdentifier())) { // don't include features for offerings which this procedure is a // hidden child of if (!getCache().getHiddenChildProceduresForOffering(offering).contains(getIdentifier())) { features.addAll(getCache().getFeaturesOfInterestForOffering(offering)); } } return SosHelper.getFeatureIDs(features, getVersion()); }
@VisibleForTesting public Collection<SosOffering> getSosOfferings() throws CodedException { Collection<String> identifiers = getCache().getOfferingsForProcedure(getIdentifier()); Collection<SosOffering> offerings = Lists.newArrayListWithCapacity(identifiers.size()); for (String offering : identifiers) { SosOffering sosOffering = new SosOffering(offering, false); // add offering name I18NHelper.addOfferingNames(getCache(), sosOffering, getLocale(), getLocale(), getProcedureCreationContext().isShowAllLanguageValues()); // add offering description I18NHelper.addOfferingDescription(sosOffering, getLocale(), getLocale(), getCache()); // add to list offerings.add(sosOffering); } return offerings; }