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

    https://github.com/apache/incubator-rya/pull/127#discussion_r92821234
  
    --- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/RdfCloudTripleStoreConfigurationBuilder.java
 ---
    @@ -0,0 +1,158 @@
    +/*
    + * 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.rya.api;
    +
    +import com.google.common.base.Preconditions;
    +
    +/**
    + * This is a base class meant to be extended by Rya configuration 
builders. Any
    + * class extending this class inherits setter methods that should be 
common to
    + * all Rya implementations.
    + * 
    + * @param <B>
    + *            the configuration builder returned by each of the setter 
methods
    + * @param <C>
    + *            the configuration object returned by the builder when build 
is
    + *            called
    + */
    +public abstract class RdfCloudTripleStoreConfigurationBuilder<B extends 
RdfCloudTripleStoreConfigurationBuilder<B, C>, C extends 
RdfCloudTripleStoreConfiguration> {
    +
    +    private String prefix = "rya_";
    +    private String auths;
    +    private String visibilities;
    +    private boolean useInference = false;
    +    private boolean displayPlan = false;
    +
    +    /**
    +     * Auxiliary method to return specified Builder in a type safe way
    +     * 
    +     * @return specified builder
    +     */
    +    protected abstract B confBuilder();
    +
    +    /**
    +     * Auxiliary method to return type of configuration object constructed 
by
    +     * builder in a type safe way
    +     * 
    +     * @return specified configuration
    +     */
    +    protected abstract C createConf();
    +
    +    /**
    +     * Set whether to use backwards chaining inferencing during query
    +     * evaluation. The default value is false.
    +     * 
    +     * @param useInference
    +     *            - turn inferencing on and off in Rya
    +     * @return B - concrete builder class
    +     */
    +    public B useInference(boolean useInference) {
    +        this.useInference = useInference;
    +        return confBuilder();
    +    }
    +
    +    /**
    +     * 
    +     * Sets the authorization for querying the underlying data store.
    +     * 
    +     * @param auths
    +     *            - authorizations for querying underlying datastore
    +     * @return B - concrete builder class
    +     */
    +    public B auths(String auths) {
    +        Preconditions.checkNotNull(auths, "User auths cannot be null.");
    +        this.auths = auths;
    +        return confBuilder();
    +    }
    +
    +    /**
    +     * Set the column visibities for ingested triples. If no value is set,
    +     * triples won't have a visibility.
    +     * 
    +     * @param visibilities
    +     *            - visibilities assigned to any triples inserted into Rya
    +     * @return B - concrete builder class
    +     */
    +    public B visibilities(String visibilites) {
    +        Preconditions.checkNotNull(visibilites, "Visibilities cannot be 
null.");
    +        this.visibilities = visibilites;
    +        return confBuilder();
    +    }
    +
    +    /**
    +     *
    +     * Sets the prefix for the Rya instance to connect to. This parameter 
is
    +     * required and the default value is "rya_"
    +     * 
    +     * @param prefix
    +     *            - the prefix for the Rya instance
    +     * @return B - concrete builder class
    +     */
    +    public B setRyaPrefix(String prefix) {
    --- End diff --
    
    You should use a consistent method naming paradigm within your class. I 
think this is the only setter that says "set" on the start. Either have all of 
them say set, or none of them. This might also be a good opportunity to change 
"rya prefix" to "rya instance name" since the prefix is Accumulo specific.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to