[ https://issues.apache.org/jira/browse/RYA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444472#comment-16444472 ]
ASF GitHub Bot commented on RYA-405: ------------------------------------ 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 > Migrate from Sesame to rdf4j libs > ---------------------------------- > > Key: RYA-405 > URL: https://issues.apache.org/jira/browse/RYA-405 > Project: Rya > Issue Type: Improvement > Affects Versions: 3.2.12 > Reporter: Jorge Machado > Assignee: Eric White > Priority: Major > Fix For: 4.0.0 > > > I have migrated all the project to the newer libs from rdf4j instead of using > the old ones. > Can someone take a look ? -- This message was sent by Atlassian JIRA (v7.6.3#76005)