[ 
https://issues.apache.org/jira/browse/RYA-53?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15235341#comment-15235341
 ] 

ASF GitHub Bot commented on RYA-53:
-----------------------------------

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

    https://github.com/apache/incubator-rya/pull/36#discussion_r59229603
  
    --- Diff: 
extras/indexing/src/main/java/mvm/rya/indexing/external/BindingSetDecorator.java
 ---
    @@ -0,0 +1,90 @@
    +/*
    + * 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 mvm.rya.indexing.external;
    +
    +import java.util.Iterator;
    +import java.util.Set;
    +
    +import org.openrdf.model.Value;
    +import org.openrdf.query.Binding;
    +import org.openrdf.query.BindingSet;
    +
    +/**
    + * Abstracts out the decoration of a {@link BindingSet}.
    + */
    +public abstract class BindingSetDecorator implements BindingSet {
    +    private static final long serialVersionUID = 1L;
    +    protected final BindingSet set;
    +    private volatile int hashCode;
    +
    +    public BindingSetDecorator(final BindingSet set) {
    +        this.set = set;
    +    }
    +
    +    @Override
    +    public Iterator<Binding> iterator() {
    +        return set.iterator();
    +    }
    +
    +    @Override
    +    public Set<String> getBindingNames() {
    +        return set.getBindingNames();
    +    }
    +
    +    @Override
    +    public Binding getBinding(final String bindingName) {
    +        return set.getBinding(bindingName);
    +    }
    +
    +    @Override
    +    public boolean hasBinding(final String bindingName) {
    +        return set.hasBinding(bindingName);
    +    }
    +
    +    @Override
    +    public Value getValue(final String bindingName) {
    +        return set.getValue(bindingName);
    +    }
    +
    +    @Override
    +    public int size() {
    +        return set.size();
    +    }
    +
    +    @Override
    +    public int hashCode() {
    +        int result = hashCode;
    +        if(result == 0) {
    +            result = 31 * result + size();
    --- End diff --
    
    I was initially going through the fields, it didn't occur to me at the time 
that it was a changing value


> Add Visibility to Rya PCJs
> --------------------------
>
>                 Key: RYA-53
>                 URL: https://issues.apache.org/jira/browse/RYA-53
>             Project: Rya
>          Issue Type: New Feature
>            Reporter: Andrew Smith
>
> Update the PCJ api to support visibility attached to binding sets



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to