You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by re...@apache.org on 2014/12/19 15:45:35 UTC

svn commit: r1646745 - in /commons/sandbox/rdf/trunk: ./ src/changes/ src/main/java/org/apache/commons/rdf/

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 <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node" >RDF-1.1
+ * Blank Node</a>, as defined by <a href=
+ * "http://www.w3.org/TR/rdf11-concepts/#section-blank-nodes" >RDF-1.1 Concepts
+ * and Abstract Syntax</a>, a W3C Recommendation published on 25 February 2014.<br>
+ *
+ * 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 <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node">RDF-1.1
+ * Blank Node</a>
+ */
+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 <a
+     * href="http://www.unicode.org/versions/latest/">Unicode string</a>.
+     *
+     * @return The lexical form of this literal.
+     * @see <a
+     * href="http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form">RDF-1.1
+     * Literal lexical form</a>
+     */
+    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 <a
+     * href="http://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri">RDF-1.1
+     * Literal datatype IRI</a>
+     */
+    Iri getDataType();
+    
+    /**
+     * If and only if the datatype IRI is <a
+     * href="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
+     * >http://www.w3.org/1999/02/22-rdf-syntax-ns#langString</a>, the language
+     * tag for this Literal is a language tag as defined by <a
+     * href="http://tools.ietf.org/html/bcp47">BCP47</a>.<br>
+     * If the datatype IRI is not <a
+     * href="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
+     * >http://www.w3.org/1999/02/22-rdf-syntax-ns#langString</a>, this method
+     * must null.
+     *
+     * @return The language tag of the literal or null if no language tag is defined
+     * @see <a
+     * href="http://www.w3.org/TR/rdf11-concepts/#dfn-language-tag">RDF-1.1
+     * Literal language tag</a>
+     */
+    public Language getLanguage();
+    
+    /** 
+     * Returns true if <code>obj</code> is an instance of 
+     * <code>literal</code> 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();
 }