class DefaultRelationSelectionAsgStrategy implements AsgStrategy {

    @Override
    public void apply(AsgQuery query, AsgStrategyContext context) {
        Ontology.Accessor ont = new Ontology.Accessor(this.ontologyProvider.get(query.getOnt()).get());

        AsgQueryUtil.elements(query, RelPropGroup.class).forEach(relPropGroup -> {
                    if (Stream.ofAll(relPropGroup.geteBase().getProps())
                            .filter(rProp -> rProp.getProj() != null)
//                          .filter(rProp -> !(rProp instanceof CalculatedEProp))
                            .isEmpty()) {

                        Optional<AsgEBase<Rel>> relAsgEBase = AsgQueryUtil.ancestor(relPropGroup, Rel.class);
                        if (relAsgEBase.isPresent()) {
                            List<RelProp> projectionProps =
                                    Stream.ofAll(ont.$relation$(relAsgEBase.get().geteBase().getrType()).getProperties())
                                    .filter(pType -> !this.nonSelectablePTypes.contains(pType))
                                            .map(pType -> new RelProp(0, pType, new IdentityProjection(),0))
                                            .toJavaList();

                            if (relPropGroup.geteBase().getQuantType().equals(QuantType.all)) {
                                relPropGroup.geteBase().getProps().addAll(projectionProps);
                            } else if (relPropGroup.geteBase().getQuantType().equals(QuantType.some)) {
                                RelPropGroup clone = new RelPropGroup(
                                        0,
                                        QuantType.some,
                                        relPropGroup.geteBase().getProps(),
                                        relPropGroup.geteBase().getGroups());

                                relPropGroup.geteBase().getProps().clear();
                                relPropGroup.geteBase().getGroups().clear();
                                relPropGroup.geteBase().setQuantType(QuantType.all);
                                relPropGroup.geteBase().getGroups().add(clone);
                                relPropGroup.geteBase().getProps().addAll(projectionProps);
                            }
                        }
                    }
                }
        );
    }

    public  DefaultRelationSelectionAsgStrategy(OntologyProvider ontologyProvider);

}