You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by pujav65 <gi...@git.apache.org> on 2018/05/01 16:20:43 UTC

[GitHub] incubator-rya pull request #294: RYA-492 Added language support for Literals

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

    https://github.com/apache/incubator-rya/pull/294#discussion_r185262619
  
    --- Diff: common/rya.api/src/main/java/org/apache/rya/api/utils/LiteralLanguageUtils.java ---
    @@ -0,0 +1,37 @@
    +/*
    + * 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.utils;
    +
    +import org.eclipse.rdf4j.model.Literal;
    +
    +/**
    + * Utility methods and constants for {@link Literal} languages.
    + */
    +public final class LiteralLanguageUtils {
    +    /**
    +     * Undetermined language type. Should be avoided if possible.
    +     */
    +    public static final String UNDETERMINED_LANGUAGE = "und";
    --- End diff --
    
    Is that right?  You might want to follow the pattern that rdf4j does: 
    https://github.com/eclipse/rdf4j/blob/7904f29ce3aafad9b38d1139978b9d5ed77b7df3/model/src/main/java/org/eclipse/rdf4j/model/impl/AbstractValueFactory.java#L102
    Looks like they add a xmlstring as the language?


---