@Override protected SparqlQueryBuilder adapt(SparqlQueryBuilder builder) { return builder .addResultVariable(CONCEPT.getName()) .addResultVariable(LABEL.getName()) .addResultVariable(sourceLabel, sourceActive); }
@Override protected Element createBody() { ElementUnion labels = SparqlElementFactory.createConceptLabelUnion(CONCEPT.createVar(), LABEL.createVar()); Triple scheme = SparqlElementFactory.createSchemeTriple(CONCEPT, IN_SCHEME); Triple source = SparqlElementFactory.createSourceTriple(IN_SCHEME, sourceLabel); ElementFilter filter = createFilter(LABEL, IN_SCHEME); return createGroup() .add(labels) .add(scheme) .addOptional(source, sourceActive) .add(filter) .build(); }