sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1390268 - in /sis/trunk: sis-build-helper/src/main/java/org/apache/sis/internal/taglet/ sis-utility/src/main/java/org/apache/sis/util/ sis-utility/src/main/java/org/apache/sis/util/logging/ sis-utility/src/main/javadoc/ sis-utility/src/tes...
Date Wed, 26 Sep 2012 03:26:17 GMT
Author: desruisseaux
Date: Wed Sep 26 03:26:17 2012
New Revision: 1390268

URL: http://svn.apache.org/viewvc?rev=1390268&view=rev
Log:
Fixed javadoc errors and updated formatting using stylesheet.

Added:
    sis/trunk/sis-utility/src/main/javadoc/
    sis/trunk/sis-utility/src/main/javadoc/stylesheet.css   (with props)
Modified:
    sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Classes.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Static.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
    sis/trunk/sis-utility/src/main/java/org/apache/sis/util/package-info.java
    sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
    sis/trunk/src/main/javadoc/stylesheet.css

Modified: sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java (original)
+++ sis/trunk/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Module.java Wed
Sep 26 03:26:17 2012
@@ -48,12 +48,12 @@ public final class Module implements Tag
     }
 
     /**
-     * The base URL for Maven reports.
+     * The base URL for Maven reports, with a trailing slash.
      */
-    private static final String MAVEN_REPORTS_BASE_URL = "http://incubator.apache.org/sis/";
+    private static final String MAVEN_REPORTS_BASE_URL = "http://builds.apache.org/job/sis-trunk/site/";
 
     /**
-     * The base URL for Maven repository.
+     * The base URL for Maven repository, with a trailing slash.
      * See <a href="http://www.apache.org/dev/repository-faq.html">ASF Jar Repositories</a>
      * for more information.
      */
@@ -197,8 +197,8 @@ public final class Module implements Tag
             /*
              * Appends the module link.
              */
-            openMavenReportLink(buffer);
-            buffer.append("index.html\">").append(module).append("</a>");
+            buffer.append("<a href=\"").append(MAVEN_REPORTS_BASE_URL).append(module)
+                  .append("/index.html\">").append(module).append("</a>");
             /*
              * Appends the "(download binary)" link.
              */
@@ -215,23 +215,16 @@ public final class Module implements Tag
                 while ((outer = doc.containingClass()) != null) {
                     doc = outer;
                 }
-                buffer.append(" &nbsp;&nbsp; ");
-                openMavenReportLink(buffer);
-                buffer.append("xref/").append(doc.qualifiedName())
+                final String className = doc.qualifiedName();
+                buffer.append(" &nbsp;&nbsp; <a href=\"");
+                for (int j=className.indexOf('.'); j>=0; j=className.indexOf('.', j+1))
{
+                    buffer.append("../");
+                }
+                buffer.append("../xref/").append(className.replace('.', '/'))
                       .append(".html\">View source code for this class</a>");
             }
             buffer.append("\n</td></tr></table>");
         }
         return buffer.append("</dd>\n").toString();
     }
-
-    /**
-     * Opens a {@code <A HREF>} element toward the Maven report directory.
-     * A trailing slash is included.
-     *
-     * @param buffer The buffer in which to write.
-     */
-    private void openMavenReportLink(final StringBuilder buffer) {
-        buffer.append("<a href=\"").append(MAVEN_REPORTS_BASE_URL).append('/').append(module).append('/');
-    }
 }

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/ArgumentChecks.java Wed Sep 26
03:26:17 2012
@@ -23,21 +23,24 @@ import org.apache.sis.resources.Errors;
 
 
 /**
- * Provides static methods for performing argument checks. The methods in this class throw
- * one of the following exceptions (or a subclass of them) widely used in standard Java API:
+ * Provides static methods for performing argument checks.
+ * The methods in this class throw one of the following exceptions:
  * <p>
- * <table>
- * <tr><th>Exception</th></th>Thrown by</th></tr>
- * <tr><td>{@link NullPointerException}</td>
- * <td>{@link #ensureNonNull(String, Object) ensureNonNull}</td></tr>
+ * <table class="sis">
+ * <tr><th>Exception</th><th class="sep">Thrown by</th></tr>
+ * <tr><td>{@link NullArgumentException}</td>
+ * <td class="sep">{@link #ensureNonNull(String, Object) ensureNonNull}</td></tr>
  *
  * <tr><td>{@link IndexOutOfBoundsException}</td>
- * <td>{@link #ensureValidIndex(int, int) ensureValidIndex}</td></tr>
+ * <td class="sep">{@link #ensureValidIndex(int, int) ensureValidIndex}</td></tr>
  *
  * <tr><td>{@link IllegalArgumentException}</td>
- * <td>{@link #ensurePositive(String, int) ensurePositive},
+ * <td class="sep">{@link #ensurePositive(String, int) ensurePositive},
  * {@link #ensureStrictlyPositive(String, int) ensureStrictlyPositive},
  * {@link #ensureBetween(String, int, int, int) ensureBetween}</td></tr>
+ *
+ * <tr><td>{@link MismatchedDimensionException}</td>
+ * <td class="sep">{@link #ensureDimensionMatches(String, DirectPosition, int) ensureDimensionMatches}</td></tr>
  * </table>
  *
  * {@section Method Arguments}
@@ -381,7 +384,7 @@ public final class ArgumentChecks extend
 
     /**
      * Ensures that the given direct position has the expected number of dimensions.
-     * This method does nothing if the direct position is null.
+     * This method does nothing if the given direct position is null.
      *
      * @param  name     The name of the argument to be checked. Used only in case an exception
is thrown.
      * @param  position The direct position to check for its dimension.

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Arrays.java Wed Sep 26 03:26:17
2012
@@ -50,15 +50,15 @@ import org.apache.sis.internal.Objects;
  * <strong>small</strong> arrays. For large arrays or for frequent use, consider
using the
  * Java collection framework instead.
  * <p>
- * <table>
- * <tr><th>Method</th><th>Alternative</th></tr>
- * <tr><td>{@link #resize(Object[], int)}</td>                     <td>{@link
java.util.ArrayList}</td></tr>
- * <tr><td>{@link #append(Object[], Object)}</td>                  <td>{@link
java.util.ArrayList}</td></tr>
- * <tr><td>{@link #insert(Object[], int, Object[], int, int)}</td> <td>{@link
java.util.LinkedList}</td></tr>
- * <tr><td>{@link #remove(Object[], int, int)}</td>                <td>{@link
java.util.LinkedList}</td></tr>
- * <tr><td>{@link #intersects(Object[], Object[])}</td>            <td>{@link
java.util.HashSet}</td></tr>
- * <tr><td>{@link #contains(Object[], Object)}</td>                <td>{@link
java.util.HashSet}</td></tr>
- * <tr><td>{@link #containsIdentity(Object[], Object)}</td>        <td>{@link
java.util.IdentityHashMap}</td></tr>
+ * <table class="sis">
+ * <tr><th>Method</th>                                             <th
class="sep">Alternative</th></tr>
+ * <tr><td>{@link #resize(Object[], int)}</td>                     <td
class="sep">{@link java.util.ArrayList}</td></tr>
+ * <tr><td>{@link #append(Object[], Object)}</td>                  <td
class="sep">{@link java.util.ArrayList}</td></tr>
+ * <tr><td>{@link #insert(Object[], int, Object[], int, int)}</td> <td
class="sep">{@link java.util.LinkedList}</td></tr>
+ * <tr><td>{@link #remove(Object[], int, int)}</td>                <td
class="sep">{@link java.util.LinkedList}</td></tr>
+ * <tr><td>{@link #intersects(Object[], Object[])}</td>            <td
class="sep">{@link java.util.HashSet}</td></tr>
+ * <tr><td>{@link #contains(Object[], Object)}</td>                <td
class="sep">{@link java.util.HashSet}</td></tr>
+ * <tr><td>{@link #containsIdentity(Object[], Object)}</td>        <td
class="sep">{@link java.util.IdentityHashMap}</td></tr>
  * </table>
  * <p>
  * Note that this recommendation applies mostly to arrays of objects. It does not apply to
arrays
@@ -133,12 +133,12 @@ public final class Arrays extends Static
      * <ul>
      *   <li><p>If the given {@code length} is longer than the length of the
given {@code array},
      *       then the returned array will contain all the elements of {@code array} at index
-     *       <var>i</var> &lt; {@code array.length}. Elements at index <var>i</var>
&gt;=
-     *       {@code array.length} are initialized to {@code null}.</p></li>
+     *       <var>i</var>&nbsp;&lt;&nbsp;{@code array.length}. Elements
at index
+     *       <var>i</var>&nbsp;&gt;=&nbsp;{@code array.length} are
initialized to {@code null}.</p></li>
      *
      *   <li><p>If the given {@code length} is shorter than the length of the
given {@code array},
      *       then the returned array will contain only the elements of {@code array} at index
-     *       <var>i</var> &lt; {@code length}. Remaining elements are not
copied.</p></li>
+     *       <var>i</var>&nbsp;&lt;&nbsp;{@code length}. Remaining
elements are not copied.</p></li>
      *
      *   <li><p>If the given {@code length} is equal to the length of the given
{@code array},
      *       then {@code array} is returned unchanged. <strong>No copy</strong>
is performed.

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Classes.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Classes.java?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Classes.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Classes.java Wed Sep 26 03:26:17
2012
@@ -42,7 +42,7 @@ import static org.apache.sis.util.Arrays
  *       ({@link #changeArrayDimension(Class, int) changeArrayDimension})</li>
  *   <li>Find the common parent of two or more classes
  *       ({@link #findCommonClass(Class, Class) findCommonClass},
- *       ({@link #findCommonInterfaces(Class, Class) findCommonInterfaces})</li>
+ *        {@link #findCommonInterfaces(Class, Class) findCommonInterfaces})</li>
  *   <li>Getting the bounds of a parameterized field or method
  *       ({@link #boundOfParameterizedAttribute(Method) boundOfParameterizedAttribute})</li>
  *   <li>Getting a short class name ({@link #getShortName(Class) getShortName},

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Static.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Static.java?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Static.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/Static.java Wed Sep 26 03:26:17
2012
@@ -21,7 +21,7 @@ package org.apache.sis.util;
  * Parent of classes that contain only static utility methods. This parent is for documentation
  * purpose only. The list below summarizes some of the utility classes:
  *
- * <table>
+ * <table class="sis">
  * <tr><th colspan="2">Primitives and classes</th></tr>
  * <tr><td>{@link CharSequences}</td>
  *     <td>Methods working on {@link CharSequence} or {@link String} instances.</td></tr>
@@ -30,11 +30,11 @@ package org.apache.sis.util;
  * <tr><td>{@link Classes}</td>
  *     <td>Methods working on {@link Class} instances.</td></tr>
  *
- * <tr><th colspan="2" bgcolor="lightblue">Structures (trees, collections, arrays,
parameters)</th></tr>
+ * <tr><th colspan="2" class="hsep">Structures (trees, collections, arrays, parameters)</th></tr>
  * <tr><td>{@link Arrays}</td>
  *     <td>Insert or remove elements in the middle of arrays.</td></tr>
  *
- * <tr><th colspan="2">Loggings and exceptions</th></tr>
+ * <tr><th colspan="2" class="hsep">Loggings and exceptions</th></tr>
  * <tr><td>{@link ArgumentChecks}</td>
  *     <td>Perform argument checks and throw {@link IllegalArgumentException} if needed.</td></tr>
  * <tr><td>{@link org.apache.sis.util.Exceptions}</td>

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java Wed Sep 26
03:26:17 2012
@@ -46,14 +46,8 @@ import static org.apache.sis.util.Arrays
  *
  * {@section Configuration}
  * The log records can be redirected explicitly to an other logging framework using the
- * following method call (replace {@link LoggerFactory#COMMONS_LOGGING} by
- * {@link LoggerFactory#LOG4J} or an other framework if desired):
- *
- * {@preformat java
- *     Logging.SIS.setLoggerFactory(LoggerFactory.COMMONS_LOGGING);
- * }
- *
- * Note however that the above method invocation is performed automatically if the
+ * {@link #setLoggerFactory(LoggerFactory)} method.
+ * Note however that this method call is performed automatically if the
  * {@code sis-logging-commons.jar} or the {@code sis-logging-log4j.jar} file is
  * found on the classpath, so it usually doesn't need to be invoked explicitely.
  * See the {@link #scanLoggerFactory()} method for more details on automatic logger
@@ -221,9 +215,8 @@ public final class Logging extends Stati
     }
 
     /**
-     * Returns a {@code Logging} instance for the specified base logger. This instance is
-     * used for controlling logging configuration in SIS. For example methods like
-     * {@link #forceMonolineConsoleOutput(Level)} are invoked on a {@code Logging} instance.
+     * Returns a {@code Logging} instance for the specified base logger.
+     * This instance can be used for controlling logging configuration in SIS.
      * <p>
      * {@code Logging} instances follow the same hierarchy than {@link Logger}, i.e.
      * {@code "org.apache.sis"} is the parent of {@code "org.apache.sis.referencing"},
@@ -332,9 +325,9 @@ public final class Logging extends Stati
      *     META-INF/services/org.apache.sis.util.logging.LoggerFactory
      * }
      *
-     * The first factory found on the classpath is given to {@link #setLoggerFactory(String)}.
-     * If it can't be used (for example because of missing dependency), then the second factory
-     * is tried, <i>etc.</i> until an acceptable factory is found.
+     * The factory found on the classpath is given to {@link #setLoggerFactory(String)}.
+     * If more than one factory is found, then the log messages will be sent to the logging
+     * frameworks managed by all those factories.
      * <p>
      * This method usually doesn't need to be invoked explicitly, since it is automatically
      * invoked on {@code Logging} class initialization. However developers may invoke it
if

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
(original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
Wed Sep 26 03:26:17 2012
@@ -17,6 +17,7 @@
 package org.apache.sis.util.logging;
 
 import java.util.logging.Level;
+import java.util.logging.Logger;
 import java.util.concurrent.TimeUnit;
 import org.apache.sis.util.Configuration;
 
@@ -40,8 +41,11 @@ import static org.apache.sis.util.Argume
  * <ul>
  *   <li>The {@code $JAVA_HOME/lib/logging.properties} file can be edited in order
to log
  *       messages at the {@code FINE} level, at least for the packages of interest.</li>
- *   <li>The {@link Logging#forceMonolineConsoleOutput(Level)} convenience method
- *       can be invoked.</li>
+ *   <li>The {@link Logger#setLevel(Level)} can be invoked, together with
+ *       {@link java.util.logging.Handler#setLevel(Level)} on all relevant logging targets
+ *       (console or file, <i>etc.</i>).</li>
+ *   <li>The {@link MonolineFormatter#configureConsoleHandler(Logger, Level)} convenience
+ *       method can be invoked.</li>
  * </ul>
  *
  * @author  Martin Desruisseaux (Geomatys)

Modified: sis/trunk/sis-utility/src/main/java/org/apache/sis/util/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/java/org/apache/sis/util/package-info.java?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/main/java/org/apache/sis/util/package-info.java (original)
+++ sis/trunk/sis-utility/src/main/java/org/apache/sis/util/package-info.java Wed Sep 26 03:26:17
2012
@@ -23,6 +23,7 @@
  *   <ul>
  *     <li>Primitive or basic Java types:
  *         {@link org.apache.sis.util.CharSequences},
+ *         {@link org.apache.sis.util.StringBuilders},
  *         {@link org.apache.sis.util.Numbers},
  *         {@link org.apache.sis.util.Classes}.</li>
  *     <li>Arrays:

Added: sis/trunk/sis-utility/src/main/javadoc/stylesheet.css
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/main/javadoc/stylesheet.css?rev=1390268&view=auto
==============================================================================
--- sis/trunk/sis-utility/src/main/javadoc/stylesheet.css (added)
+++ sis/trunk/sis-utility/src/main/javadoc/stylesheet.css Wed Sep 26 03:26:17 2012
@@ -0,0 +1 @@
+link ../../../../src/main/javadoc/stylesheet.css
\ No newline at end of file

Propchange: sis/trunk/sis-utility/src/main/javadoc/stylesheet.css
------------------------------------------------------------------------------
    svn:special = *

Modified: sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java (original)
+++ sis/trunk/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java Wed Sep
26 03:26:17 2012
@@ -202,7 +202,7 @@ public final strictfp class CharSequence
     }
 
     /**
-     * Tests the {@link CharSequences#camelCaseToAcronym(String)} method.
+     * Tests the {@link CharSequences#camelCaseToAcronym(CharSequence)} method.
      */
     @Test
     public void testCamelCaseToAcronym() {
@@ -268,7 +268,7 @@ public final strictfp class CharSequence
     }
 
     /**
-     * Tests the {@link CharSequences#getLinesFromMultilines(String)} method.
+     * Tests the {@link CharSequences#getLinesFromMultilines(CharSequence)} method.
      */
     @Test
     public void testGetLinesFromMultilines() {

Modified: sis/trunk/src/main/javadoc/stylesheet.css
URL: http://svn.apache.org/viewvc/sis/trunk/src/main/javadoc/stylesheet.css?rev=1390268&r1=1390267&r2=1390268&view=diff
==============================================================================
--- sis/trunk/src/main/javadoc/stylesheet.css (original)
+++ sis/trunk/src/main/javadoc/stylesheet.css Wed Sep 26 03:26:17 2012
@@ -57,6 +57,26 @@ table.sis tr td {
 }
 
 /*
+ * Optionally add a line or column separator.
+ */
+table.sis tr th.hsep {
+  border-top-width: 1pt;
+  border-top-style: solid;
+}
+
+table.sis tr th.sep {
+  border-left-width: 1pt;
+  border-left-style: solid;
+  border-left-color: #819AB2;
+}
+
+table.sis tr td.sep {
+  border-left-width: 1pt;
+  border-left-style: solid;
+  border-left-color: #AAADB2;
+}
+
+/*
  * Table without vertical space between rows and a little bit of space between columns.
  * Other properties are left to their default values. In particular, there is no border.
  */



Mime
View raw message