Unfortunately, Andy, e.g. the Javadocs for DatasetGraph::delete and ::deleteAny 
are just

    /** Delete a quad */
    public void delete(Node g, Node s, Node p, Node o) ;
    
    /** Delete any quads matching the pattern */
    public void deleteAny(Node g, Node s, Node p, Node o) ;

So maybe part of this clears up with just a few more comments. I'll try to get 
a PR in for that.

The semantics for matching still seem a bit odd. E.g. in Node_ANY I find

@Override
public boolean matches( Node other )
{ return other != null; }

which is obviously not unworkable (we all use it every day) but does seem to 
distinguish between null and Node_ANY. The Javadocs for match() are:

    /**
        Answer true iff this node accepts the other one as a match.
        The default is an equality test; it is over-ridden in subclasses to
        provide the appropriate semantics for literals, ANY, and variables.
        
        @param other a node to test for matching
        @return true iff this node accepts the other as a match
    */

which doesn't discuss null.

ajs6f

> On May 9, 2018, at 8:23 AM, Andy Seaborne <a...@apache.org> wrote:
> 
> 
> 
> On 08/05/18 16:55, ajs6f wrote:
> 
>> Do we have a global policy about where null is accepted as a wildcard? I 
>> know it works in at least some places...
> 
> > I know it works in at least some places...
> 
> Some operations are matches (Graph.find, Graph.contains, Graph.remove; 
> DatasetGraph similarly) and the javadoc should be clear on this.
> 
> Others such as add/delete are for concrete items - no wildcards.
> 
>    Andy
> 

Reply via email to