You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by ha...@apache.org on 2022/05/19 16:38:29 UTC

[clerezza] branch master updated: CLEREZZA-1063: Fix code documentation in api-implementation

This is an automated email from the ASF dual-hosted git repository.

hasan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/clerezza.git


The following commit(s) were added to refs/heads/master by this push:
     new f766deaa CLEREZZA-1063: Fix code documentation in api-implementation
f766deaa is described below

commit f766deaa8213284163b9c176c769f9df3c0fe3c9
Author: Hasan <ha...@apache.org>
AuthorDate: Thu May 19 18:38:13 2022 +0200

    CLEREZZA-1063: Fix code documentation in api-implementation
---
 .../implementation/graph/AbstractGraph.java        |  8 +++----
 .../graph/WatchableGraphWrapper.java               |  5 ++--
 .../implementation/graphmatching/GraphMatcher.java | 28 ++++++++++------------
 .../graphmatching/collections/IntHashMap.java      |  7 +++---
 .../graphmatching/collections/IntHashSet.java      |  2 +-
 .../graphmatching/collections/IntIterator.java     |  2 +-
 .../graphmatching/collections/IntSet.java          |  4 ++--
 .../implementation/in_memory/SimpleGraph.java      |  2 +-
 .../implementation/literal/LiteralFactory.java     |  2 +-
 .../implementation/literal/LiteralImpl.java        |  2 +-
 10 files changed, 28 insertions(+), 34 deletions(-)

diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/graph/AbstractGraph.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/graph/AbstractGraph.java
index 237a7bde..558fed1d 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/graph/AbstractGraph.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/graph/AbstractGraph.java
@@ -43,11 +43,6 @@ public abstract class AbstractGraph extends AbstractCollection<Triple>
     private final Lock readLock;
     private final Lock writeLock;
 
-    /**
-     * Constructs a LocalbleMGraph for an Graph.
-     *
-     * @param providedMGraph a non-lockable graph
-     */
     public AbstractGraph() {
         {
             String debugMode = System.getProperty(DEBUG_MODE);
@@ -61,6 +56,9 @@ public abstract class AbstractGraph extends AbstractCollection<Triple>
         writeLock = lock.writeLock();
     }
 
+    /**
+     * @param lock
+     */
     public AbstractGraph(final ReadWriteLock lock) {
         this.lock = lock;
         readLock = lock.readLock();
diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/graph/WatchableGraphWrapper.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/graph/WatchableGraphWrapper.java
index 15e49ec6..f1dfaedd 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/graph/WatchableGraphWrapper.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/graph/WatchableGraphWrapper.java
@@ -132,7 +132,7 @@ public class WatchableGraphWrapper implements WatchableGraph {
      * this method instead of <code>remove</code> for ImmutableGraph event support to be
      * added.
      *
-     * @param o The triple to be removed from the triple collection
+     * @param triple The triple to be removed from the triple collection
      * @return
      */
     protected boolean performRemove(Triple triple) {
@@ -151,8 +151,7 @@ public class WatchableGraphWrapper implements WatchableGraph {
      * the specified <code>Triple</code> matches the <code>FilterTriple</code>s
      * of the listeners.
      *
-     * @param triple The Triple that was modified
-     * @param type   The type of modification
+     * @param event The GraphEvent to dispatch
      */
     protected void dispatchEvent(GraphEvent event) {
         synchronized (listenerConfigs) {
diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/GraphMatcher.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/GraphMatcher.java
index 1a1f6ca8..ca6d9fb4 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/GraphMatcher.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/GraphMatcher.java
@@ -40,26 +40,24 @@ public class GraphMatcher {
      * returned map maps each <code>BNode</code>s from g1 to one
      * of g2. If the graphs are ground graphs the method return an empty map if
      * the ImmutableGraph are equals and null otherwise.
-     * <p/>
+     *
      * NOTE: This method does not returned mapping from blank nodes to grounded
-     * nodes, a bnode in g1 is not a vraiable that may match any node, but must
+     * nodes, a bnode in g1 is not a variable that may match any node, but must
      * match a bnode in g2.
-     * <p/>
-     * <p>
-     * On the algorithm:<br/>
-     * - In a first step it checked if every grounded triple in g1 matches one
-     * in g2<br/>
-     * - [optional] blank node blind matching</br>
-     * - in a map mbng1 bnode of g1 is mapped to a set of of its
+     *
+     * <p>On the algorithm:</p>
+     * <li>In a first step it checked if every grounded triple in g1 matches one in g2</li>
+     * <li>[optional] blank node blind matching</li>
+     * <li>in a map mbng1 bnode of g1 is mapped to a set of of its
      * properties and inverse properties, this is the predicate and the object
-     * or subject respectively, analoguosly in mbgn2 every bnode of g2<br/>
-     * - based on the incoming and outgoing properties a hash is calculated for
-     * each bnode, in the first step when calculating the hash  aconstant value
-     * is taken for the bnodes that might be subject or object in the (inverse properties)
+     * or subject respectively, analoguosly in mbgn2 every bnode of g2</li>
+     * <li>based on the incoming and outgoing properties a hash is calculated for
+     * each bnode, in the first step when calculating the hash a constant value
+     * is taken for the bnodes that might be subject or object in the (inverse properties)</li>
      * - hash-classes:
      *
-     * @param g1
-     * @param g2
+     * @param og1
+     * @param og2
      * @return a Set of NodePairs
      */
     public static Map<BlankNode, BlankNode> getValidMapping(Graph og1, Graph og2) {
diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntHashMap.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntHashMap.java
index f98b1250..7a4ca7ba 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntHashMap.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntHashMap.java
@@ -27,7 +27,6 @@ package org.apache.clerezza.implementation.graphmatching.collections;
 
 /**
  * <p>A hash map that uses primitive ints for the key rather than objects.</p>
- * <p>
  * <p>Note that this class is for internal optimization purposes only, and may
  * not be supported in future releases of Jakarta Commons Lang.  Utilities of
  * this sort may be included in future releases of Jakarta Commons Collections.</p>
@@ -171,7 +170,7 @@ public class IntHashMap<T> {
      * @param value a value to search for.
      * @return <code>true</code> if and only if some key maps to the
      * <code>value</code> argument in this hashtable as
-     * determined by the <tt>equals</tt> method;
+     * determined by the <code>equals</code> method;
      * <code>false</code> otherwise.
      * @throws NullPointerException if the value is <code>null</code>.
      * @see #containsKey(int)
@@ -197,7 +196,7 @@ public class IntHashMap<T> {
     /**
      * <p>Returns <code>true</code> if this HashMap maps one or more keys
      * to this value.</p>
-     * <p>
+     *
      * <p>Note that this method is identical in functionality to contains
      * (which predates the Map interface).</p>
      *
@@ -214,7 +213,7 @@ public class IntHashMap<T> {
      *
      * @param key possible key.
      * @return <code>true</code> if and only if the specified object is a
-     * key in this hashtable, as determined by the <tt>equals</tt>
+     * key in this hashtable, as determined by the <code>equals</code>
      * method; <code>false</code> otherwise.
      * @see #contains(Object)
      */
diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntHashSet.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntHashSet.java
index eaeccb3e..4d738d47 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntHashSet.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntHashSet.java
@@ -24,7 +24,7 @@ import java.util.HashSet;
 import java.util.Iterator;
 
 /**
- * This is currently just a placeholder implementation based onm HashSet<Integer>
+ * This is currently just a placeholder implementation based on {@literal HashSet<Integer>}
  * an efficient implementation is to store the primitives directly.
  *
  * @author reto
diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntIterator.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntIterator.java
index fe868f30..3a5308d6 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntIterator.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntIterator.java
@@ -23,7 +23,7 @@ package org.apache.clerezza.implementation.graphmatching.collections;
 import java.util.Iterator;
 
 /**
- * An iterator allowing to iterate over ints, Iterator<Integer> is extended for
+ * An iterator allowing to iterate over ints, {@literal Iterator<Integer>} is extended for
  * compatibility, however accessing nextInt allows faster implementations.
  *
  * @author reto
diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntSet.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntSet.java
index cb24ebe5..2998e185 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntSet.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/graphmatching/collections/IntSet.java
@@ -23,8 +23,8 @@ package org.apache.clerezza.implementation.graphmatching.collections;
 import java.util.Set;
 
 /**
- * A IntSet allows directly adding primitive ints to a set, Set<Integer> is
- * extended, but accessingt he respective methods is less efficient.
+ * An IntSet allows directly adding primitive ints to a set,
+ * {@literal Set<Integer>} is extended, but accessing the respective methods is less efficient.
  *
  * @author reto
  */
diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/in_memory/SimpleGraph.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/in_memory/SimpleGraph.java
index 1bf27cba..309a9c75 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/in_memory/SimpleGraph.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/in_memory/SimpleGraph.java
@@ -116,7 +116,7 @@ public class SimpleGraph extends AbstractGraph {
      * Creates a SimpleGraph for the specified collection of triples,
      * subsequent modification of baseSet do not affect the created instance.
      *
-     * @param baseSet
+     * @param baseCollection
      */
     public SimpleGraph(Collection<Triple> baseCollection) {
         this.triples = new HashSet<Triple>(baseCollection);
diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/literal/LiteralFactory.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/literal/LiteralFactory.java
index f6ee742a..e434089a 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/literal/LiteralFactory.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/literal/LiteralFactory.java
@@ -40,7 +40,7 @@ public abstract class LiteralFactory {
     /**
      * Get a <code>LiteralFactory</code>. If this has not been set using
      * setInstance it returns an instance of
-     * {@link org.apache.clerezza.model.impl.SimpleLiteralFactory}.
+     * {@link org.apache.clerezza.implementation.literal.SimpleLiteralFactory}.
      *
      * @return a concrete <code>LiteralFactory</code>
      */
diff --git a/api-implementation/src/main/java/org/apache/clerezza/implementation/literal/LiteralImpl.java b/api-implementation/src/main/java/org/apache/clerezza/implementation/literal/LiteralImpl.java
index d87013f4..810500a5 100644
--- a/api-implementation/src/main/java/org/apache/clerezza/implementation/literal/LiteralImpl.java
+++ b/api-implementation/src/main/java/org/apache/clerezza/implementation/literal/LiteralImpl.java
@@ -34,7 +34,7 @@ public class LiteralImpl extends AbstractLiteral implements Serializable {
     /**
      * @param lexicalForm
      * @param dataType
-     * @param Language    the language of this literal
+     * @param language    the language of this literal
      */
     public LiteralImpl(String lexicalForm, IRI dataType, Language language) {
         this.lexicalForm = lexicalForm;