private static void addChilds(ProcedureEntity procedure, Collection<String> procedures) { if (procedure.hasChildren()) { for (ProcedureEntity child : procedure.getChildren()) { procedures.add(child.getIdentifier()); } } }
/** * Add a collection of child procedures to a procedure * * @return Set with child procedure descriptions * @throws OwsExceptionReport * If an error occurs * @throws ConverterException * If creation of child procedure description fails */ protected Set<AbstractSensorML> getChildProcedures() throws OwsExceptionReport { if (!getProcedure().hasChildren()) { return Sets.newHashSet(); } Set<AbstractSensorML> childProcedures = Sets.newHashSet(); for (ProcedureEntity child : getProcedure().getChildren()) { SosProcedureDescription<?> childDescription = getConverter().createSosProcedureDescription(child, getProcedureDescriptionFormat(), getVersion(), getLocale(), getSession()); if (childDescription.getProcedureDescription() instanceof AbstractSensorML) { childProcedures.add((AbstractSensorML) childDescription.getProcedureDescription()); } } return childProcedures; }
@Override protected ProcedureOutput createExpanded(ProcedureEntity entity, DbQuery query, Session session) { ProcedureOutput result = createCondensed(entity, query, session); ServiceOutput service = (query.getHrefBase() != null) ? getCondensedExtendedService(getServiceEntity(entity), query.withoutFieldsFilter()) : getCondensedService(getServiceEntity(entity), query.withoutFieldsFilter()); result.setValue(ProcedureOutput.SERVICE, service, query.getParameters(), result::setService); result.setParents(createCondensed(entity.getParents(), query, session)); result.setChildren(createCondensed(entity.getChildren(), query, session)); return result; }
for (ProcedureEntity child : getProcedure().getChildren()) { if (child != null) {
for (ProcedureEntity child : getProcedure().getChildren()) {