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 2015/02/08 19:21:05 UTC

svn commit: r1658231 - in /commons/sandbox/rdf/trunk/api: ./ src/ src/main/ src/main/assembly/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/commons/ src/main/java/org/apache/commons/rdf/ src/main/java/org/apache/...

Author: reto
Date: Sun Feb  8 18:21:05 2015
New Revision: 1658231

URL: http://svn.apache.org/r1658231
Log:
COMMONSSITE-80: adapted after discussion on mailing list

Added:
    commons/sandbox/rdf/trunk/api/   (with props)
    commons/sandbox/rdf/trunk/api/pom.xml
      - copied, changed from r1651181, commons/sandbox/rdf/trunk/pom.xml
    commons/sandbox/rdf/trunk/api/src/
    commons/sandbox/rdf/trunk/api/src/main/
    commons/sandbox/rdf/trunk/api/src/main/assembly/
    commons/sandbox/rdf/trunk/api/src/main/assembly/bin.xml
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/assembly/bin.xml
    commons/sandbox/rdf/trunk/api/src/main/assembly/src.xml
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/assembly/src.xml
    commons/sandbox/rdf/trunk/api/src/main/java/
    commons/sandbox/rdf/trunk/api/src/main/java/org/
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/BlankNode.java
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNode.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/BlankNodeOrIri.java
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/BlankNodeOrIri.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/Graph.java
      - copied, changed from r1651183, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Graph.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/ImmutableGraph.java
      - copied unchanged from r1651183, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/ImmutableGraph.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/Iri.java
      - copied unchanged from r1651183, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Iri.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/Language.java
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Language.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/Literal.java
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Literal.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/RdfTerm.java
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/RdfTerm.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/Triple.java
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Triple.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/WatchableGraph.java
      - copied, changed from r1651183, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Graph.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/event/
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/event/AddEvent.java
      - copied unchanged from r1651183, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/AddEvent.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/event/FilterTriple.java
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/FilterTriple.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/event/GraphEvent.java
      - copied unchanged from r1651183, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/GraphEvent.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/event/GraphListener.java
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/GraphListener.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/event/RemoveEvent.java
      - copied unchanged from r1651183, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/event/RemoveEvent.java
    commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/package-info.java
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/package-info.java
    commons/sandbox/rdf/trunk/api/src/main/resources/
    commons/sandbox/rdf/trunk/api/src/media/
    commons/sandbox/rdf/trunk/api/src/site/
    commons/sandbox/rdf/trunk/api/src/site/custom/
    commons/sandbox/rdf/trunk/api/src/site/custom/project-info-report.properties
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/site/custom/project-info-report.properties
    commons/sandbox/rdf/trunk/api/src/site/resources/
    commons/sandbox/rdf/trunk/api/src/site/resources/download_net.cgi
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/site/resources/download_net.cgi
    commons/sandbox/rdf/trunk/api/src/site/resources/images/
    commons/sandbox/rdf/trunk/api/src/site/site.xml
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/site/site.xml
    commons/sandbox/rdf/trunk/api/src/site/xdoc/
    commons/sandbox/rdf/trunk/api/src/site/xdoc/code-standards.xml
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/site/xdoc/code-standards.xml
    commons/sandbox/rdf/trunk/api/src/site/xdoc/index.xml
      - copied unchanged from r1651181, commons/sandbox/rdf/trunk/src/site/xdoc/index.xml
    commons/sandbox/rdf/trunk/api/src/test/

Propchange: commons/sandbox/rdf/trunk/api/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Feb  8 18:21:05 2015
@@ -0,0 +1 @@
+target

Copied: commons/sandbox/rdf/trunk/api/pom.xml (from r1651181, commons/sandbox/rdf/trunk/pom.xml)
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/api/pom.xml?p2=commons/sandbox/rdf/trunk/api/pom.xml&p1=commons/sandbox/rdf/trunk/pom.xml&r1=1651181&r2=1658231&rev=1658231&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/pom.xml (original)
+++ commons/sandbox/rdf/trunk/api/pom.xml Sun Feb  8 18:21:05 2015
@@ -22,13 +22,13 @@
     <parent>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-parent</artifactId>
-        <version>35</version>
+        <version>37</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>commons-rdf</groupId>
-    <artifactId>commons-rdf</artifactId>
+    <artifactId>commons-rdf-api</artifactId>
     <version>0.1-SNAPSHOT</version>
-    <name>Apache Commons RDF</name>
+    <name>Apache Commons RDF API</name>
     <description>
         Apache Commons RDF provides an API modelling the RDF data model as defined by 
         http://www.w3.org/TR/rdf11-concepts/

Copied: commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/Graph.java (from r1651183, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Graph.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/Graph.java?p2=commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/Graph.java&p1=commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Graph.java&r1=1651183&r2=1658231&rev=1658231&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Graph.java (original)
+++ commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/Graph.java Sun Feb  8 18:21:05 2015
@@ -49,63 +49,6 @@ public interface Graph extends Collectio
             RdfTerm object);
 
     /**
-     * Adds the specified <code>GraphListener</code> to the graph. This listener
-     * will be notified, when the graph is modified and the <code>Triple</code>
-     * that was part of the modifiaction matched the specified
-     * <code>FilterTriple</code>. The notification will be passed to the
-     * listener after the specified delay time (in milli-seconds) has passed.
-     * If more matching events occur during the delay period, then they are
-     * passed all together at the end of the delay period. If the the listener
-     * unregisters or the platform is stopped within the period then the already
-     * occurred events may not be delivered.
-     *
-     * All implementations support this method, immutable implementations will
-     * typically provide an empty implementation, they shall not throw an
-     * exception.
-     *
-     * Implementation of which the triples change over time without add- and
-     * remove-methods being called (e.g. implementation dynamically generating
-     * their triples on invocation of the filer-method) may choose not to, or
-     * only partially propagate their changes to the listener. They should
-     * describe the behavior in the documentation of the class.
-     *
-     * Implementations should keep weak references the listeners, so that the
-     * listener can be garbage collected if its no longer referenced by another
-     * object.
-     *
-     * If delay is 0 notification will happen synchroneously.
-     *
-     * @param listener The listener that will be notified
-     * @param filter The triple filter with which triples are tested,
-     *        that were part of the modification.
-     * @param delay The time period afer which the listener will be notified in milliseconds.
-     */
-    public void addGraphListener(GraphListener listener, FilterTriple filter,
-            long delay);
-
-    /**
-     * Adds the specified <code>GraphListener</code> to the graph. This listener
-     * will be notified, when the graph is modified and the <code>Triple</code>
-     * that was part of the modifiaction matched the specified
-     * <code>FilterTriple</code>. The notification will be passed without delay.
-     *
-     * Same as <code>addGraphListener(listener, filter, 0).
-     *
-     * @param listener The listener that will be notified
-     * @param filter The triple filter with which triples are tested,
-     *        that were part of the modification.
-     */
-    public void addGraphListener(GraphListener listener, FilterTriple filter);
-
-    /**
-     * Removes the specified <code>GraphListener</code> from the graph. This
-     * listener will no longer be notified, when the graph is modified.
-     *
-     * @param listener The listener to be removed.
-     */
-    public void removeGraphListener(GraphListener listener);
-    
-    /**
      * Returns true if <code>other</code> describes the same graph and will 
      * always describe the same graph as this instance, false otherwise. 
      * It returns true if this == other or if it

Copied: commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/WatchableGraph.java (from r1651183, commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Graph.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/WatchableGraph.java?p2=commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/WatchableGraph.java&p1=commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Graph.java&r1=1651183&r2=1658231&rev=1658231&view=diff
==============================================================================
--- commons/sandbox/rdf/trunk/src/main/java/org/apache/commons/rdf/Graph.java (original)
+++ commons/sandbox/rdf/trunk/api/src/main/java/org/apache/commons/rdf/WatchableGraph.java Sun Feb  8 18:21:05 2015
@@ -26,27 +26,13 @@ import org.apache.commons.rdf.event.Grap
 
 
 /**
- * A set of triples (as it doesn't allow duplicates), it does however
- * not extend {@link java.util.Set} as it doesn't inherit its
- * specification for <code>hashCode()</code> and <code>equals</code>.
- * It is possible to add <code>GraphListener</code> to listen for modifications
- * in the triples.
+ * An extension to the Graph interface that allows to add throws events
+ * on modifications.
  *
  * @author reto
  */
-public interface Graph extends Collection<Triple> {
-    
-    /**
-     * Filters triples given a pattern. 
-     * filter(null, null, null) returns the same as iterator()
-     * 
-     * @param subject
-     * @param predicate
-     * @param object
-     * @return <code>Iterator</code>
-     */
-    public Iterator<Triple> filter(BlankNodeOrIri subject, Iri predicate, 
-            RdfTerm object);
+public interface WatchableGraph extends Graph {
+   
 
     /**
      * Adds the specified <code>GraphListener</code> to the graph. This listener
@@ -104,42 +90,5 @@ public interface Graph extends Collectio
      * @param listener The listener to be removed.
      */
     public void removeGraphListener(GraphListener listener);
-    
-    /**
-     * Returns true if <code>other</code> describes the same graph and will 
-     * always describe the same graph as this instance, false otherwise. 
-     * It returns true if this == other or if it
-     * is otherwise guaranteed that changes to one of the instances are
-     * immediately reflected in the other or if both graphs are immutable.
-     *
-     * @param other
-     * @return true if other == this
-     */
-    @Override
-    public boolean equals(Object other);
-
-    /**
-     * Returns an ImutableGraph describing the graph at the current point in 
-     * time. if <code>this</code> is an instance of ImmutableGraph this can 
-     * safely return <code>this</code>.
-     *
-     * @return the current time slice of the possibly mutable graph represented by the instance.
-     */
-    public ImmutableGraph getImmutableGraph();
-    
-    /**
-     * The lock provided by this methods allows to create read- and write-locks
-     * that span multiple method calls. Having a read locks prevents other
-     * threads from writing to this Graph, having a write-lock prevents other
-     * threads from reading and writing. Implementations would typically
-     * return a <code>java.util.concurrent.locks.ReentrantReadWriteLock</code>.
-     * Immutable instances (such as instances of <code>ImmutableGraph</code>)
-     * or instances used in transaction where concurrent acces of the same 
-     * instance is not an issue may return a no-op ReadWriteLock (i.e. one
-     * which returned ReadLock and WriteLock instances of which the methods do 
-     * not do anything)
-     *
-     * @return the lock of this Graph
-     */
-    ReadWriteLock getLock();
+  
 }