Search in sources :

Example 1 with ProjectionNode

use of com.bigdata.rdf.sparql.ast.ProjectionNode in project wikidata-query-rdf by wikimedia.

the class EmptyLabelServiceOptimizer method getProjectionNode.

@SuppressFBWarnings(value = "OCP_OVERLY_CONCRETE_PARAMETER", justification = "We only process ServiceNode's so that's the appropriate type")
private ProjectionNode getProjectionNode(ServiceNode service) {
    IGroupNode<IGroupMemberNode> parent = service.getParent();
    while (parent != null) {
        ProjectionNode projection = (ProjectionNode) parent.annotations().get(LABEL_SERVICE_PROJECTION);
        if (projection != null) {
            return projection;
        }
        parent = parent.getParent();
    }
    return null;
}
Also used : IGroupMemberNode(com.bigdata.rdf.sparql.ast.IGroupMemberNode) ProjectionNode(com.bigdata.rdf.sparql.ast.ProjectionNode) SuppressFBWarnings(edu.umd.cs.findbugs.annotations.SuppressFBWarnings)

Aggregations

IGroupMemberNode (com.bigdata.rdf.sparql.ast.IGroupMemberNode)1 ProjectionNode (com.bigdata.rdf.sparql.ast.ProjectionNode)1 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1