Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 341AC9E02 for ; Fri, 19 Dec 2014 14:45:36 +0000 (UTC) Received: (qmail 42247 invoked by uid 500); 19 Dec 2014 14:45:36 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 42172 invoked by uid 500); 19 Dec 2014 14:45:36 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 42155 invoked by uid 99); 19 Dec 2014 14:45:36 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Dec 2014 14:45:35 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id DBF1FAC0958; Fri, 19 Dec 2014 14:45:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1646745 - in /commons/sandbox/rdf/trunk: ./ src/changes/ src/main/java/org/apache/commons/rdf/ Date: Fri, 19 Dec 2014 14:45:35 -0000 To: commits@commons.apache.org From: reto@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141219144535.DBF1FAC0958@hades.apache.org> Author: reto Date: Fri Dec 19 14:45:35 2014 New Revision: 1646745 URL: http://svn.apache.org/r1646745 Log: COMMONSSITE-80: moved back some more changed from local git repository as no public git repository avaialble yet where I could push Added: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNode.java Removed: commons/sandbox/rdf/trunk/src/changes/ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BNode.java commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/InvalidLiteralTypeException.java commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/PlainLiteral.java commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TypedLiteral.java Modified: commons/sandbox/rdf/trunk/NOTICE.txt commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Literal.java Modified: commons/sandbox/rdf/trunk/NOTICE.txt URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/NOTICE.txt?rev=1646745&r1=1646744&r2=1646745&view=diff ============================================================================== --- commons/sandbox/rdf/trunk/NOTICE.txt (original) +++ commons/sandbox/rdf/trunk/NOTICE.txt Fri Dec 19 14:45:35 2014 @@ -1,4 +1,4 @@ -Apache Commons Net +Apache Commons RDF Copyright 2001-2014 The Apache Software Foundation This product includes software developed at Added: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNode.java URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNode.java?rev=1646745&view=auto ============================================================================== --- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNode.java (added) +++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNode.java Fri Dec 19 14:45:35 2014 @@ -0,0 +1,41 @@ +/* + * 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.commons.rdf; + +/** + * A Blank Node represents a resource, + * but does not indicate a URI for the resource. Blank nodes act like + * existentially qualified variables in first order logic. + * + * An RDF-1.1 + * Blank Node, as defined by RDF-1.1 Concepts + * and Abstract Syntax, a W3C Recommendation published on 25 February 2014.
+ * + * Note that: Blank nodes are disjoint from IRIs and literals. Otherwise, + * the set of possible blank nodes is arbitrary. RDF makes no reference to any + * internal structure of blank nodes. + * + * + * @see RDF-1.1 + * Blank Node + */ +public class BlankNode implements BlankNodeOrIri { + +} Modified: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Literal.java URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Literal.java?rev=1646745&r1=1646744&r2=1646745&view=diff ============================================================================== --- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Literal.java (original) +++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Literal.java Fri Dec 19 14:45:35 2014 @@ -18,7 +18,6 @@ */ package org.apache.commons.rdf; -import org.apache.commons.rdf.RdfTerm; /** * Represents a literal value that can be a node in an RDF Graph. @@ -32,8 +31,62 @@ import org.apache.commons.rdf.RdfTerm; public interface Literal extends RdfTerm { /** + * The lexical form of this literal, represented by a Unicode string. + * + * @return The lexical form of this literal. + * @see RDF-1.1 + * Literal lexical form + */ + String getLexicalForm(); + + /** + * The IRI identifying the datatype that determines how the lexical form + * maps to a literal value. + * + * @return The datatype IRI for this literal. + * @see RDF-1.1 + * Literal datatype IRI + */ + Iri getDataType(); + + /** + * If and only if the datatype IRI is http://www.w3.org/1999/02/22-rdf-syntax-ns#langString, the language + * tag for this Literal is a language tag as defined by BCP47.
+ * If the datatype IRI is not http://www.w3.org/1999/02/22-rdf-syntax-ns#langString, this method + * must null. + * + * @return The language tag of the literal or null if no language tag is defined + * @see RDF-1.1 + * Literal language tag + */ + public Language getLanguage(); + + /** + * Returns true if obj is an instance of + * literal that is term-equal with this, false otherwise + * + * Two literals are term-equal (the same RDF literal) if and only if the + * two lexical forms, the two datatype IRIs, and the two language tags (if + * any) compare equal, character by character. + * + * @return true if obj equals this, false otherwise. + */ + public boolean equals(Object obj); + + /** + * Returns the hash code of the lexical form plus the hash code of the + * language, plush the hash code of the datatype * - * @return the text of this literal + * @return hash code */ - public String getLexicalForm(); + public int hashCode(); }