Github user ejwhite922 commented on a diff in the pull request: https://github.com/apache/incubator-rya/pull/291#discussion_r182854497 --- 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 { --- End diff -- Yea, this was the biggest obstacle to get our stuff working with RDF4J. They changed the tags used to mark constant and anonymous var names ("-const-" to "_const_" and "-anon-" to "_anon_"). And our code had tons of checks for the old tags using hard-coded strings everywhere. Now everything at least references this class so it won't be hard to see what calls its methods. I tried to mimic the old functionality with this but maybe we can eventually deprecate if there's another way (I didn't see one in RDF4J that handled Strings).
---