commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1646333 - in /commons/sandbox/rdf/trunk: ./ src/main/java/org/apache/commons/rdf/ src/main/java/org/apache/commons/rdf/event/ src/site/resources/images/
Date Wed, 17 Dec 2014 20:36:53 GMT
Author: reto
Date: Wed Dec 17 20:36:53 2014
New Revision: 1646333

URL: http://svn.apache.org/r1646333
Log:
COMMONSSITE-80: renamed some classes to reflect new terms and standards of RDf 1.1, Took some
names and terms from https://github.com/commons-rdf/commons-rdf

Added:
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNodeOrIri.java
      - copied, changed from r1646331, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/NonLiteral.java
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Iri.java
      - copied, changed from r1646331, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/UriRef.java
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/RdfTerm.java
      - copied, changed from r1646331, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Resource.java
Removed:
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/NoConvertorException.java
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/NonLiteral.java
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Resource.java
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/UriRef.java
    commons/sandbox/rdf/trunk/src/site/resources/images/net-logo-white.png
Modified:
    commons/sandbox/rdf/trunk/NOTICE.txt
    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/Literal.java
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Triple.java
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TripleCollection.java
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TypedLiteral.java
    commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/FilterTriple.java

Modified: commons/sandbox/rdf/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/NOTICE.txt?rev=1646333&r1=1646332&r2=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/NOTICE.txt (original)
+++ commons/sandbox/rdf/trunk/NOTICE.txt Wed Dec 17 20:36:53 2014
@@ -3,3 +3,6 @@ Copyright 2001-2014 The Apache Software
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software developed at
+https://github.com/commons-rdf/commons-rdf.

Modified: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BNode.java
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BNode.java?rev=1646333&r1=1646332&r2=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BNode.java (original)
+++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BNode.java Wed Dec 17 20:36:53
2014
@@ -25,6 +25,6 @@ package org.apache.commons.rdf;
  *
  * @author reto
  */
-public class BNode implements NonLiteral {
+public class BNode implements BlankNodeOrIri {
 
 }

Copied: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNodeOrIri.java
(from r1646331, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/NonLiteral.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNodeOrIri.java?p2=commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNodeOrIri.java&p1=commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/NonLiteral.java&r1=1646331&r2=1646333&rev=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/NonLiteral.java (original)
+++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNodeOrIri.java Wed
Dec 17 20:36:53 2014
@@ -25,6 +25,6 @@ package org.apache.commons.rdf;
  *
  * @author reto
  */
-public interface NonLiteral extends Resource {
+public interface BlankNodeOrIri extends RdfTerm {
 
 }

Modified: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/InvalidLiteralTypeException.java
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/InvalidLiteralTypeException.java?rev=1646333&r1=1646332&r2=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/InvalidLiteralTypeException.java
(original)
+++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/InvalidLiteralTypeException.java
Wed Dec 17 20:36:53 2014
@@ -32,7 +32,7 @@ public class InvalidLiteralTypeException
      * @param javaType the <code>Class</code> to convert to
      * @param literalType the literalType which can't be converted
      */
-    public InvalidLiteralTypeException(Class<?> javaType, UriRef literalType) {
+    public InvalidLiteralTypeException(Class<?> javaType, Iri literalType) {
         super("Cannot create a "+javaType+" from a literal of type "+literalType);
     }
 }

Copied: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Iri.java (from r1646331,
commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/UriRef.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Iri.java?p2=commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Iri.java&p1=commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/UriRef.java&r1=1646331&r2=1646333&rev=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/UriRef.java (original)
+++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Iri.java Wed Dec 17 20:36:53
2014
@@ -31,11 +31,11 @@ import java.io.Serializable;
  * 
  * @author reto
  */
-public class UriRef implements NonLiteral, Serializable {
+public class Iri implements BlankNodeOrIri, Serializable {
 
     private String unicodeString;
 
-    public UriRef(String unicodeString) {
+    public Iri(String unicodeString) {
         this.unicodeString = unicodeString;
     }
 
@@ -56,11 +56,11 @@ public class UriRef implements NonLitera
     @Override
     public boolean equals(Object obj) {
 
-        if (!(obj instanceof UriRef)) {
+        if (!(obj instanceof Iri)) {
             return false;
         }
 
-        return unicodeString.equals(((UriRef) obj).getUnicodeString());
+        return unicodeString.equals(((Iri) obj).getUnicodeString());
     }
 
     /**

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=1646333&r1=1646332&r2=1646333&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 Wed Dec 17
20:36:53 2014
@@ -18,7 +18,7 @@
  */
 package org.apache.commons.rdf;
 
-import org.apache.commons.rdf.Resource;
+import org.apache.commons.rdf.RdfTerm;
 
 /**
  * Represents a literal value that can be a node in an RDF Graph. 
@@ -29,7 +29,7 @@ import org.apache.commons.rdf.Resource;
  *
  * @author reto
  */
-public interface Literal extends Resource {
+public interface Literal extends RdfTerm {
     
     /**
      * 

Copied: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/RdfTerm.java (from
r1646331, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Resource.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/RdfTerm.java?p2=commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/RdfTerm.java&p1=commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Resource.java&r1=1646331&r2=1646333&rev=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Resource.java (original)
+++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/RdfTerm.java Wed Dec 17
20:36:53 2014
@@ -19,12 +19,14 @@
 package org.apache.commons.rdf;
 
 /**
- * Some entity. It could be a web resource such as a web page, or it could 
- * be a concrete physical thing such as a tree or a car. It could be an 
- * abstract idea such as a football game. 
+ * An <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-term" >RDF-1.1
+ * Term</a>, as defined by <a href= "http://www.w3.org/TR/rdf11-concepts/"
+ * >RDF-1.1 Concepts and Abstract Syntax</a>, a W3C Recommendation published on
+ * 25 February 2014.<br>
  *
- * @author reto
+ * @see <a href= "http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-term" >RDF-1.1
+ * Term</a>
  */
-public interface Resource {
+public interface RdfTerm {
 
 }

Modified: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Triple.java
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Triple.java?rev=1646333&r1=1646332&r2=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Triple.java (original)
+++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Triple.java Wed Dec 17
20:36:53 2014
@@ -26,11 +26,11 @@ package org.apache.commons.rdf;
  */
 public interface Triple {
 
-    NonLiteral getSubject();
+    BlankNodeOrIri getSubject();
 
-    UriRef getPredicate();
+    Iri getPredicate();
 
-    Resource getObject();
+    RdfTerm getObject();
 
     /**
      * 

Modified: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TripleCollection.java
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TripleCollection.java?rev=1646333&r1=1646332&r2=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TripleCollection.java (original)
+++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TripleCollection.java Wed
Dec 17 20:36:53 2014
@@ -44,8 +44,8 @@ public interface TripleCollection extend
      * @param object
      * @return <code>Iterator</code>
      */
-    public Iterator<Triple> filter(NonLiteral subject, UriRef predicate, 
-            Resource object);
+    public Iterator<Triple> filter(BlankNodeOrIri subject, Iri predicate, 
+            RdfTerm object);
 
     /**
      * Adds the specified <code>GraphListener</code> to the graph. This listener

Modified: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TypedLiteral.java
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TypedLiteral.java?rev=1646333&r1=1646332&r2=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TypedLiteral.java (original)
+++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/TypedLiteral.java Wed Dec
17 20:36:53 2014
@@ -35,7 +35,7 @@ public interface TypedLiteral extends Li
      * 
      * @return UriRef
      */
-    public UriRef getDataType();
+    public Iri getDataType();
     
     /** 
      * Two TypedLiteral nodes are equal iff they have the same lexical form and

Modified: commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/FilterTriple.java
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/FilterTriple.java?rev=1646333&r1=1646332&r2=1646333&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/FilterTriple.java
(original)
+++ commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/FilterTriple.java
Wed Dec 17 20:36:53 2014
@@ -18,10 +18,10 @@
  */
 package org.apache.commons.rdf.event;
 
-import org.apache.commons.rdf.NonLiteral;
-import org.apache.commons.rdf.Resource;
+import org.apache.commons.rdf.BlankNodeOrIri;
+import org.apache.commons.rdf.RdfTerm;
 import org.apache.commons.rdf.Triple;
-import org.apache.commons.rdf.UriRef;
+import org.apache.commons.rdf.Iri;
 
 /**
  * The <code>FilterTriple</code> class provides a match()-method that tests
@@ -31,9 +31,9 @@ import org.apache.commons.rdf.UriRef;
  */
 public class FilterTriple {
 
-    private NonLiteral subject;
-    private UriRef predicate;
-    private Resource object;
+    private BlankNodeOrIri subject;
+    private Iri predicate;
+    private RdfTerm object;
     
     /**
      * Creates a new <code>FilterTriple</code>. The specified subject,
@@ -44,7 +44,7 @@ public class FilterTriple {
      * @param predicate  the predicate.
      * @param object  the object.
      */
-    public FilterTriple (NonLiteral subject, UriRef predicate, Resource object) {
+    public FilterTriple (BlankNodeOrIri subject, Iri predicate, RdfTerm object) {
         this.subject = subject;
         this.predicate = predicate;
         this.object = object;



Mime
View raw message