Github user rvesse commented on a diff in the pull request:

    https://github.com/apache/jena/pull/465#discussion_r213249005
  
    --- Diff: 
jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetGraphFilteredView.java
 ---
    @@ -0,0 +1,159 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.jena.sparql.core;
    +
    +import java.util.Collection;
    +import java.util.HashSet;
    +import java.util.Iterator;
    +import java.util.function.Predicate;
    +
    +import org.apache.jena.atlas.iterator.Iter;
    +import org.apache.jena.atlas.logging.Log;
    +import org.apache.jena.graph.Graph;
    +import org.apache.jena.graph.Node;
    +import org.apache.jena.sparql.graph.GraphReadOnly;
    +import org.apache.jena.sparql.graph.GraphUnionRead;
    +
    +/**
    + * A read-only {@link DatasetGraph} that applies a filter testing all 
triples and quads
    + * returned by accessing the data. Only quads where the filter tests for 
"true" are exposed. 
    + */
    +public class DatasetGraphFilteredView extends DatasetGraphReadOnly 
implements DatasetGraphWrapperView {
    +  /* 
    +  Write operations
    +    add(Quad)
    +    delete(Quad)
    +    add(Node, Node, Node, Node)
    +    delete(Node, Node, Node, Node)
    +    deleteAny(Node, Node, Node, Node)
    +    clear()
    +    
    +  Read operations  
    +    listGraphNodes()
    +    isEmpty()
    +    find()
    +    find(Quad)
    +    find(Node, Node, Node, Node)
    +    findNG(Node, Node, Node, Node)
    +    contains(Quad)
    +    contains(Node, Node, Node, Node)
    +    size()
    +    toString()
    +    
    +  Graph operations
    +    listGraphNodes()
    +    getGraph(Node)
    +    getDefaultGraph()
    +    containsGraph(Node)
    +  */
    +
    +    private final Predicate<Quad> quadFilter;
    +    private final Collection<Node> visibleGraphs;
    +
    +    public DatasetGraphFilteredView(DatasetGraph dsg, Predicate<Quad> 
filter, Collection<Node> visibleGraphs) {
    +        super(dsg);
    +        this.quadFilter = filter;
    +        if ( visibleGraphs.contains(Quad.defaultGraphIRI) || 
visibleGraphs.contains(Quad.defaultGraphNodeGenerated) ) {
    +            Log.warn(DatasetGraphFilteredView.class, "default graph Node 
in visibleGraphs colelction - fix up applied");
    --- End diff --
    
    Typo -> `colelction`


---

Reply via email to