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

    https://github.com/apache/incubator-rya/pull/291#discussion_r182596490
  
    --- Diff: 
common/rya.api/src/main/java/org/apache/rya/api/domain/VarNameUtils.java ---
    @@ -0,0 +1,202 @@
    +/*
    + * 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.domain;
    +
    +import org.apache.commons.lang.StringUtils;
    +import org.eclipse.rdf4j.model.Value;
    +import org.eclipse.rdf4j.model.ValueFactory;
    +import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
    +import org.eclipse.rdf4j.query.algebra.Var;
    +import org.eclipse.rdf4j.query.algebra.helpers.TupleExprs;
    +
    +/**
    + * Utility methods and constants for RDF {@link Var} names.
    + */
    +public final class VarNameUtils {
    +    private static final ValueFactory VF = 
SimpleValueFactory.getInstance();
    +
    +    /**
    +     * Prepended to the start of constant var names.
    +     */
    +    public static final String CONSTANT_PREFIX = "_const_";
    +    private static final String LEGACY_CONSTANT_PREFIX = "-const-";
    +
    +    /**
    +     * Prepended to the start of anonymous var names.
    +     */
    +    public static final String ANONYMOUS_PREFIX = "_anon_";
    +    private static final String LEGACY_ANONYMOUS_PREFIX = "-anon-";
    +
    +    /**
    +     * Private constructor to prevent instantiation.
    +     */
    +    private VarNameUtils() {
    +    }
    +
    +    /**
    +     * Prepends the constant prefix to the specified value.
    +     * @param value the value to add the constant prefix to.
    +     * @return the value with the constant prefix attached before it.
    +     */
    +    public static String prependConstant(final String value) {
    --- End diff --
    
    Params and return type are @ Nullable


---

Reply via email to