You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2015/09/25 19:19:33 UTC

svn commit: r1705333 - in /sis: branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/ branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/ site/trunk/book/en/ site/trunk/book/fr/ site/trunk/content...

Author: desruisseaux
Date: Fri Sep 25 17:19:32 2015
New Revision: 1705333

URL: http://svn.apache.org/viewvc?rev=1705333&view=rev
Log:
Begin replacing manuar code colorization by an automatic one (for now just applied on Java keywords).
After completion of this tools for the developer guide, we may use the same tool for javadoc too.

Added:
    sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/CodeColorizer.java
      - copied, changed from r1705251, sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java
Modified:
    sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
    sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java
    sis/site/trunk/book/en/geoapi.html
    sis/site/trunk/book/en/utility.html
    sis/site/trunk/book/en/xml.html
    sis/site/trunk/book/fr/geoapi.html
    sis/site/trunk/book/fr/utility.html
    sis/site/trunk/book/fr/xml.html
    sis/site/trunk/content/book/en/developer-guide.html
    sis/site/trunk/content/book/fr/developer-guide.html

Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java [UTF-8] Fri Sep 25 17:19:32 2015
@@ -40,6 +40,9 @@ import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 import org.xml.sax.SAXException;
 
+// Share a convenience method.
+import static org.apache.sis.internal.book.CodeColorizer.toArray;
+
 
 /**
  * Generates the developer guide from the given input file.
@@ -125,6 +128,11 @@ public final class Assembler {
     private final ResourceBundle resources;
 
     /**
+     * Helper class for applying colors on content of {@code <pre>} and {@code <code>} elements.
+     */
+    private final CodeColorizer colorizer;
+
+    /**
      * Creates a new assembler for the given input and output files.
      *
      * @param  input  the input file (e.g. {@code "site/book/en/body.html"}).
@@ -141,6 +149,7 @@ public final class Assembler {
         inputDirectory = input.getParentFile();
         builder        = factory.newDocumentBuilder();
         document       = load(input.getName());
+        colorizer      = new CodeColorizer(document);
         tableOfContent = document.createElement("ul");
         tableOfContent.setAttribute("class", "toc");
         /*
@@ -246,18 +255,6 @@ public final class Assembler {
     }
 
     /**
-     * Returns all nodes in the given list as an array. This method is used for getting a snapshot
-     * of the list before to modify it (for example before the elements are moved to another node).
-     */
-    private static Node[] toArray(final NodeList nodes) {
-        final Node[] children = new Node[nodes.getLength()];
-        for (int i=0; i<children.length; i++) {
-            children[i] = nodes.item(i);
-        }
-        return children;
-    }
-
-    /**
      * Automatically inserts a {@code title} attribute in the given {@code <abbr>} element
      * if it meets the condition documented in the class javadoc.
      */
@@ -307,6 +304,10 @@ public final class Assembler {
                         processAbbreviation((Element) node);
                         break;
                     }
+                    case "pre": {
+                        colorizer.highlight(node, false);
+                        break;
+                    }
                     default: {
                         if (name.length() == 2 && name.charAt(0) == 'h') {
                             final int c = name.charAt(1) - '0';

Copied: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/CodeColorizer.java (from r1705251, sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/CodeColorizer.java?p2=sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/CodeColorizer.java&p1=sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java&r1=1705251&r2=1705333&rev=1705333&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/CodeColorizer.java [UTF-8] Fri Sep 25 17:19:32 2015
@@ -14,164 +14,33 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.taglet;
+package org.apache.sis.internal.book;
 
-import java.util.*;
-import com.sun.javadoc.Tag;
-import com.sun.tools.doclets.Taglet;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 
 
 /**
- * The <code>@preformat</code> tag for inserting a pre-formatted code in a javadoc comment.
- * The first word after the tag must be the format name ("java", "math", "wkt", "xml", "sql",
- * "shell" or "text").
- * The remaining is the text to format.
- *
- * <p>This taglet will automatically replace {@code &}, {@code <} and {@code >} by their HTML entities.
- * The only exception is {@code &#64;}, which is converted to the original {@code @} character because
- * we can't use that character directly inside this taglet.</p>
+ * Apply syntax colorization on Java code. This class is different than most other colorization tools
+ * since its apply different colors depending on whether a word is known to be defined in an OGC/ISO
+ * standard, in GeoAPI or in Apache SIS.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @since   0.3
- * @version 0.3
+ * @since   0.7
+ * @version 0.7
  * @module
  */
-public final class Preformat extends InlineTaglet {
-    /**
-     * The set of legal words after {@code preformat}. We write them in lower-cases even if this is not
-     * conform to the Java convention for enumeration constants, because we will use {@link Enum#name()}
-     * for getting the string to look for after {@code preformat}.
-     */
-    private static enum Style {
-        java, math, wkt, xml, sql, shell, text
-    }
-
-    /**
-     * Special characters to replace by HTML entities.
-     */
-    private static final String[] SPECIAL_CHARS = new String[] {
-        "&#64;", "@", // Because we can't use @ directly in {@preformat}.
-        "&",     "&amp;",
-        "<",     "&lt;",
-        ">",     "&gt;"
-    };
-
-    /**
-     * Register this taglet.
-     *
-     * @param tagletMap the map to register this tag to.
-     */
-    public static void register(final Map<String,Taglet> tagletMap) {
-       final Preformat tag = new Preformat();
-       tagletMap.put(tag.getName(), tag);
-    }
-
-    /**
-     * Constructs a default <code>@preformat</code> taglet.
-     */
-    private Preformat() {
-        super();
-    }
-
-    /**
-     * Returns the name of this custom tag.
-     *
-     * @return The tag name.
-     */
-    @Override
-    public String getName() {
-        return "preformat";
-    }
-
-    /**
-     * Returns {@code false} since <code>@preformat</code> can not be used in overview.
-     *
-     * @return Always {@code false}.
-     */
-    @Override
-    public boolean inOverview() {
-        return false;
-    }
-
-    /**
-     * Given the <code>Tag</code> representation of this custom tag, return its string representation.
-     *
-     * @param tag The tag to format.
-     * @return A string representation of the given tag.
-     */
-    @Override
-    public String toString(final Tag tag) {
-        String text = tag.text().trim().replace("\r\n", "\n").replace('\r', '\n');
-        String format = "<unspecified>";
-        /*
-         * Extracts the first word, which is expected to be the format name.
-         */
-        for (int i=0; i<text.length(); i++) {
-            if (Character.isWhitespace(text.charAt(i))) {
-                format = text.substring(0, i);
-                text = trim(text.substring(i));
-                break;
-            }
-        }
-        Style style;
-        try {
-            style = Style.valueOf(format);
-        } catch (IllegalArgumentException e) {
-            printWarning(tag.position(), "Unknown format: " + format);
-            style = Style.text;
-        }
-        /*
-         * Counts the minimal amount of spaces in the margin.
-         */
-        int margin = 0;
-        StringTokenizer tk = new StringTokenizer(text, "\r\n");
-all:    while (tk.hasMoreTokens()) {
-            final String line = tk.nextToken();
-            int stop = line.length();
-            if (margin != 0 && margin < stop) {
-                stop = margin;
-            }
-            for (int i=0; i<stop; i++) {
-                if (!Character.isSpaceChar(line.charAt(i))) {
-                    if (margin == 0 || i < margin) {
-                        margin = i;
-                    }
-                    if (i == 0) {
-                        break all;
-                    }
-                    break;
-                }
-            }
-        }
-        /*
-         * Nows inserts each line.
-         */
-        final StringBuilder buffer = new StringBuilder("<blockquote><pre>");
-        tk = new StringTokenizer(text, "\r\n", true);
-        while (tk.hasMoreTokens()) {
-            String line = tk.nextToken();
-            if (!line.startsWith("\n")) {
-                if (margin < line.length()) {
-                    line = line.substring(margin);
-                }
-                for (int i=0; i<SPECIAL_CHARS.length;) {
-                    line = line.replace(SPECIAL_CHARS[i++], SPECIAL_CHARS[i++]);
-                }
-                switch (style) {
-                    case java: colorJava(line, buffer); continue;
-                    case math: styleMath(line, buffer); continue;
-                }
-            }
-            buffer.append(line);
-        }
-        return buffer.append("</pre></blockquote>").toString();
-    }
-
+public final class CodeColorizer {
     /**
      * Lists of Java keywords.
      */
-    private static final Set<String> KEYWORDS =
-            Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
+    public static final Set<String> JAVA_KEYWORDS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
         "abstract", "continue", "for",        "new",        "switch",
         "assert",   "default",  "goto",       "package",    "synchronized",
         "boolean",  "do",       "if",         "private",    "this",
@@ -182,101 +51,94 @@ all:    while (tk.hasMoreTokens()) {
         "char",     "final",    "interface",  "static",     "void",
         "class",    "finally",  "long",       "strictfp",   "volatile",
         "const",    "float",    "native",     "super",      "while",
-        /* literals: */ "true", "false", "null"
-    )));
+        /* literals: */ "true", "false", "null")));
 
     /**
-     * Adds syntactic coloration for the given line.
+     * Returns all nodes in the given list as an array. This method is used for getting a snapshot
+     * of the list before to modify it (for example before the elements are moved to another node).
      */
-    private static void colorJava(final String line, final StringBuilder buffer) {
-        char quote = 0; // The kind of quoting in progress (" or ').
-        final int length = line.length();
-        for (int i=0; i<length; i++) {
-            final char c = line.charAt(i);
-            if (quote == 0) {
-                if (Character.isJavaIdentifierStart(c)) {
-                    int j = i;
-                    while (++j < length && Character.isJavaIdentifierPart(line.charAt(j)));
-                    final String word = line.substring(i, j);
-                    final boolean keyword = KEYWORDS.contains(word);
-                    i = j-1;
-                    boolean function = false;
-                    if (!keyword || word.equals("this") || word.equals("super")) {
-                        while (j < length) {
-                            final char t = line.charAt(j++);
-                            if (!Character.isWhitespace(t)) {
-                                function = (t == '(');
-                                break;
-                            }
-                        }
-                    }
-                    if (function) buffer.append("<b>");
-                    if (keyword)  buffer.append("<font color=\"green\">");
-                    if (true)     buffer.append(word);
-                    if (keyword)  buffer.append("</font>");
-                    if (function) buffer.append("</b>");
-                    continue;
-                }
-                switch (c) {
-                    case '/': {
-                        if (i+1 < length && line.charAt(i+1) == '/') {
-                            buffer.append("<i><font color=\"gray\">").append(line.substring(i)).append("</font></i>");
-                            return;
-                        }
-                        break;
-                    }
-                    case '\'': // fall through
-                    case '"': {
-                        quote = c;
-                        buffer.append("<font color=\"orangered\">").append(c);
-                        continue;
-                    }
-                }
-            } else if (c == quote) {
-                quote = 0;
-                buffer.append(c).append("</font>");
-                continue;
-            }
-            buffer.append(c);
+    static Node[] toArray(final NodeList nodes) {
+        final Node[] children = new Node[nodes.getLength()];
+        for (int i=0; i<children.length; i++) {
+            children[i] = nodes.item(i);
         }
+        return children;
     }
 
     /**
-     * Adds italic on variables in a math formulas.
-     * We will put in italic only the single latin letters.
+     * The object to use for creating nodes.
      */
-    private static void styleMath(final String line, final StringBuilder buffer) {
-        final int length = line.length();
-        for (int i=0; i<length; i++) {
-            final char c = line.charAt(i);
-            if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
-                if ((i == 0 || !Character.isLetterOrDigit(line.codePointBefore(i))) &&
-                    (i+1 >= length || !Character.isLetterOrDigit(line.codePointAt(i+1))))
-                {
-                    buffer.append("<var>").append(c).append("</var>");
-                    continue;
-                }
-            }
-            buffer.append(c);
-        }
-    }
+    private final Document document;
 
     /**
-     * Removes the leading and trailing linefeeds (but not other kind of spaces).
+     * Creates a new color colorizer.
+     *
+     * @param document the object to use for creating nodes.
      */
-    private static String trim(final String line) {
-        int high = line.length();
-        while (high != 0) {
-            final char c = line.charAt(high - 1);
-            if (c != '\r' && c != '\n') break;
-            high--;
-        }
-        int low = 0;
-        while (low != high) {
-            final char c = line.charAt(low);
-            if (c != '\r' && c != '\n') break;
-            low++;
+    CodeColorizer(final Document document) {
+        this.document = document;
+    }
+
+    /**
+     * Applies emphasing on the words found in all text node of the given node.
+     *
+     * @param parent the root element where to put Java keywords in bold characters.
+     *        This is typically a {@code <pre>} or {@code <code>} element.
+     * @param isInsideQuotes if the text begin inside a quoted text.
+     */
+    public void highlight(final Node parent, boolean isInsideQuotes) {
+        for (final Node node : toArray(parent.getChildNodes())) {
+            switch (node.getNodeType()) {
+                case Node.ELEMENT_NODE: {
+                    highlight(node, isInsideQuotes);
+                    break;
+                }
+                case Node.TEXT_NODE: {
+                    final String text = node.getTextContent();
+                    int nextSubstringStart = 0, lower = 0;
+                    while (lower < text.length()) {
+                        int c = text.codePointAt(lower);
+                        if (isInsideQuotes || !Character.isJavaIdentifierStart(c)) {
+                            if (c == '"') {
+                                isInsideQuotes = !isInsideQuotes;
+                            }
+                            lower += Character.charCount(c);
+                        } else {
+                            /*
+                             * Found the beginning of a Java identifier. Search where it ends.
+                             */
+                            int upper = lower;
+                            while (Character.isJavaIdentifierPart(c)) {
+                                upper += Character.charCount(c);
+                                if (upper >= text.length()) {
+                                    break;
+                                }
+                                c = text.codePointAt(upper);
+                            }
+                            /*
+                             * The following code is executed for each word which is a valid Java identifier.
+                             * Different kind of emphase may be applied: bold for Java keywords, some colors
+                             * for OGC/ISO classes, other colors for SIS classes, etc.
+                             */
+                            final String word = text.substring(lower, upper);
+                            Element emphase = null;
+                            if (JAVA_KEYWORDS.contains(word)) {
+                                emphase = document.createElement("b");
+                            }
+                            if (emphase != null) {
+                                emphase.setTextContent(word);
+                                if (nextSubstringStart != lower) {
+                                    parent.insertBefore(document.createTextNode(text.substring(nextSubstringStart, lower)), node);
+                                }
+                                parent.insertBefore(emphase, node);
+                                nextSubstringStart = upper;
+                            }
+                            lower = upper;
+                        }
+                    }
+                    node.setTextContent(text.substring(nextSubstringStart));
+                }
+            }
         }
-        return line.substring(low, high);
     }
 }

Modified: sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-build-helper/src/main/java/org/apache/sis/internal/taglet/Preformat.java [UTF-8] Fri Sep 25 17:19:32 2015
@@ -16,9 +16,11 @@
  */
 package org.apache.sis.internal.taglet;
 
-import java.util.*;
+import java.util.Map;
+import java.util.StringTokenizer;
 import com.sun.javadoc.Tag;
 import com.sun.tools.doclets.Taglet;
+import org.apache.sis.internal.book.CodeColorizer;
 
 
 /**
@@ -168,24 +170,6 @@ all:    while (tk.hasMoreTokens()) {
     }
 
     /**
-     * Lists of Java keywords.
-     */
-    private static final Set<String> KEYWORDS =
-            Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
-        "abstract", "continue", "for",        "new",        "switch",
-        "assert",   "default",  "goto",       "package",    "synchronized",
-        "boolean",  "do",       "if",         "private",    "this",
-        "break",    "double",   "implements", "protected",  "throw",
-        "byte",     "else",     "import",     "public",     "throws",
-        "case",     "enum",     "instanceof", "return",     "transient",
-        "catch",    "extends",  "int",        "short",      "try",
-        "char",     "final",    "interface",  "static",     "void",
-        "class",    "finally",  "long",       "strictfp",   "volatile",
-        "const",    "float",    "native",     "super",      "while",
-        /* literals: */ "true", "false", "null"
-    )));
-
-    /**
      * Adds syntactic coloration for the given line.
      */
     private static void colorJava(final String line, final StringBuilder buffer) {
@@ -198,7 +182,7 @@ all:    while (tk.hasMoreTokens()) {
                     int j = i;
                     while (++j < length && Character.isJavaIdentifierPart(line.charAt(j)));
                     final String word = line.substring(i, j);
-                    final boolean keyword = KEYWORDS.contains(word);
+                    final boolean keyword = CodeColorizer.JAVA_KEYWORDS.contains(word);
                     i = j-1;
                     boolean function = false;
                     if (!keyword || word.equals("this") || word.equals("super")) {

Modified: sis/site/trunk/book/en/geoapi.html
URL: http://svn.apache.org/viewvc/sis/site/trunk/book/en/geoapi.html?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/site/trunk/book/en/geoapi.html (original)
+++ sis/site/trunk/book/en/geoapi.html Fri Sep 25 17:19:32 2015
@@ -229,14 +229,14 @@
       and that this association is mandatory — meaning, in Java, that the method is not allowed to return a <code>null</code> value.
     </p>
 
-<pre><b>package</b> <code class="GeoAPI">org.opengis.referencing.crs</code>;
+<pre>package <code class="GeoAPI">org.opengis.referencing.crs</code>;
 <code class="comment">
 /**
  * A 2D coordinate reference system used to approximate the shape of the earth on a planar surface.
  */</code>
 <code class="GeoAPI">@UML</code>(<var>specification</var> = ISO_19111,
      <var>identifier</var> = "<code class="OGC">SC_ProjectedCRS</code>")
-<b>public interface</b> <code class="GeoAPI">ProjectedCRS</code> <b>extends</b> <code class="GeoAPI">GeneralDerivedCRS</code> {<code class="comment">
+public interface <code class="GeoAPI">ProjectedCRS</code> extends <code class="GeoAPI">GeneralDerivedCRS</code> {<code class="comment">
     /**
      * Returns the coordinate system, which must be Cartesian.
      */</code>
@@ -271,8 +271,8 @@ System.out.println("The standard name fo
       Users are always encouraged to only read this file once and then save its contents in their application's cache.
     </p>
 
-<pre>Properties <var>isoToGeoAPI</var> = <b>new</b> Properties();
-<b>try</b> (InputStream in = <code class="GeoAPI">UML</code>.class.getResourceAsStream("<code class="GeoAPI">class-index.properties</code>")) {
+<pre>Properties <var>isoToGeoAPI</var> = new Properties();
+try (InputStream in = <code class="GeoAPI">UML</code>.class.getResourceAsStream("<code class="GeoAPI">class-index.properties</code>")) {
     <var>isoToGeoAPI</var>.load(in);
 }
 String <var>isoName</var> = "<code class="OGC">CI_Citation</code>";
@@ -467,8 +467,8 @@ System.out.println("The GeoAPI interface
 
 <pre><code class="GeoAPI">MediumName</code> <var>cdRom</var>  = <code class="GeoAPI">MediumName.CD_ROM;</code>
 <code class="GeoAPI">MediumName</code> <var>usbKey</var> = <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">USB_KEY</code>"); <code class="comment">// There is no constraint on this value.</code>
-<b>assert</b> <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">CD_ROM</code>")  == <var>cdRom</var>  : "valueOf must return existing constants.";
-<b>assert</b> <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">USB_KEY</code>") == <var>usbKey</var> : "valueOf must cache the previously requested values.";</pre>
+assert <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">CD_ROM</code>")  == <var>cdRom</var>  : "valueOf must return existing constants.";
+assert <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">USB_KEY</code>") == <var>usbKey</var> : "valueOf must cache the previously requested values.";</pre>
 
 
 
@@ -493,12 +493,12 @@ System.out.println("The GeoAPI interface
       for example when multiple libraries coexist — then the choice is left to the user.
     </p>
 
-<pre><b>import</b> <code class="GeoAPI">org.opengis.referencing.GeodeticDatum</code>;
-<b>import</b> <code class="GeoAPI">org.opengis.referencing.DatumFactory</code>;
-<b>import</b> java.util.ServiceLoader;
+<pre>import <code class="GeoAPI">org.opengis.referencing.GeodeticDatum</code>;
+import <code class="GeoAPI">org.opengis.referencing.DatumFactory</code>;
+import java.util.ServiceLoader;
 
-<b>public class</b> MyApplication {
-    <b>public void</b> createMyDatum() {
+public class MyApplication {
+    public void createMyDatum() {
         ServiceLoader  <var>loader</var> = ServiceLoader.load(<code class="GeoAPI">DatumFactory</code>.class);
         <code class="GeoAPI">DatumFactory</code>  <var>factory</var> = <var>loader</var>.iterator().next();
         <code class="GeoAPI">GeodeticDatum</code> <var>myDatum</var> = <var>factory</var>.<code class="GeoAPI">createGeodeticDatum</code>(…);
@@ -690,24 +690,24 @@ System.out.println("The GeoAPI interface
       as in the following example:
     </p>
 
-<pre><b>import</b> <code class="GeoAPI">org.opengis.metadata.Metadata</code>;
-<b>import</b> <code class="GeoAPI">org.opengis.test.Validators</code>;
-<b>import</b> org.junit.Test;
+<pre>import <code class="GeoAPI">org.opengis.metadata.Metadata</code>;
+import <code class="GeoAPI">org.opengis.test.Validators</code>;
+import org.junit.Test;
 
-<b>public class</b> MyTest {<code class="comment">
+public class MyTest {<code class="comment">
     /*
      * Tolerate the absence of mandatory attributes in metadata and citation packages.
      * This modification applies to all tests executed by the currently running <abbr>JVM</abbr>.
      * If there are multiple test classes, this initialization may be performed
      * in a parent class to all test classes.
      */</code>
-    <b>static</b> {
-        <code class="GeoAPI">Validators.DEFAULT.metadata.requireMandatoryAttributes</code> = <b>false</b>;
-        <code class="GeoAPI">Validators.DEFAULT.citation.requireMandatoryAttributes</code> = <b>false</b>;
+    static {
+        <code class="GeoAPI">Validators.DEFAULT.metadata.requireMandatoryAttributes</code> = false;
+        <code class="GeoAPI">Validators.DEFAULT.citation.requireMandatoryAttributes</code> = false;
     }
 
     @Test
-    <b>public void</b> testMyMetadata() {
+    public void testMyMetadata() {
         <code class="GeoAPI">Metadata</code> <var>myObject</var> = …; <code class="comment">// Create an object here.</code>
         <code class="GeoAPI">Validators.validate</code>(<var>myObject</var>);
     }
@@ -718,21 +718,21 @@ System.out.println("The GeoAPI interface
       This approach requires the creation of a new instance of the validator that we wish to modify the configuration.
     </p>
 
-<pre><b>import</b> <code class="GeoAPI">org.opengis.metadata.Metadata</code>;
-<b>import</b> <code class="GeoAPI">org.opengis.test.ValidatorContainer</code>;
-<b>import</b> org.junit.Test;
-
-<b>public class</b> MyTest {
-    <b>private final</b> <code class="GeoAPI">ValidatorContainer</code> <var>validators</var>;
-
-    <b>public</b> MyTest() {
-        <var>validators</var> = <b>new</b> <code class="GeoAPI">ValidatorContainer()</code>;
-        <var>validators</var>.<code class="GeoAPI">metadata.requireMandatoryAttributes</code> = <b>false</b>;
-        <var>validators</var>.<code class="GeoAPI">citation.requireMandatoryAttributes</code> = <b>false</b>;
+<pre>import <code class="GeoAPI">org.opengis.metadata.Metadata</code>;
+import <code class="GeoAPI">org.opengis.test.ValidatorContainer</code>;
+import org.junit.Test;
+
+public class MyTest {
+    private final <code class="GeoAPI">ValidatorContainer</code> <var>validators</var>;
+
+    public MyTest() {
+        <var>validators</var> = new <code class="GeoAPI">ValidatorContainer()</code>;
+        <var>validators</var>.<code class="GeoAPI">metadata.requireMandatoryAttributes</code> = false;
+        <var>validators</var>.<code class="GeoAPI">citation.requireMandatoryAttributes</code> = false;
     }
 
     @Test
-    <b>public void</b> testMyMetadata() {
+    public void testMyMetadata() {
         <code class="GeoAPI">Metadata</code> <var>myObject</var> = …; <code class="comment">// Create an object here.</code>
         <var>validators</var>.<code class="GeoAPI">validate</code>(<var>myObject</var>);
     }
@@ -755,20 +755,20 @@ System.out.println("The GeoAPI interface
       However, this example adds a supplemental verification, annotated with <code>@After</code>, which will be executed after each test.
     </p>
 
-<pre><b>import</b> org.junit.*;
-<b>import</b> org.junit.runner.RunWith;
-<b>import</b> org.junit.runners.JUnit4;
-<b>import</b> <code class="GeoAPI">org.opengis.test.referencing.ParameterizedTransformTest</code>;
-<b>import static</b> org.junit.Assert.*;
+<pre>import org.junit.*;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import <code class="GeoAPI">org.opengis.test.referencing.ParameterizedTransformTest</code>;
+import static org.junit.Assert.*;
 
 @RunWith(JUnit4.class)
-<b>public class</b> MyTest <b>extends</b> <code class="GeoAPI">ParameterizedTransformTest</code> {<code class="comment">
+public class MyTest extends <code class="GeoAPI">ParameterizedTransformTest</code> {<code class="comment">
     /**
      * Specify our own coordinate transformation factory for the GeoAPI tests.
      * GeoAPI will test the objects created by this factory.
      */</code>
-    <b>public</b> MyTest() {
-        <b>super</b>(<b>new</b> MyMathTransformFactory());
+    public MyTest() {
+        super(new MyMathTransformFactory());
     }
 <code class="comment">
     /**
@@ -778,9 +778,9 @@ System.out.println("The GeoAPI interface
      */</code>
     @Test
     @Override
-    <b>public void</b> testLambertAzimuthalEqualArea() <b>throws</b> <code class="GeoAPI">FactoryException</code>, <code class="GeoAPI">TransformException</code> {
+    public void testLambertAzimuthalEqualArea() throws <code class="GeoAPI">FactoryException</code>, <code class="GeoAPI">TransformException</code> {
         <code class="GeoAPI"><var>tolerance</var></code> = 0.1; // 10 cm tolerance.
-        <b>super</b>.<code class="GeoAPI">testLambertAzimuthalEqualArea()</code>;
+        super.<code class="GeoAPI">testLambertAzimuthalEqualArea()</code>;
     }
 <code class="comment">
     /**
@@ -789,8 +789,8 @@ System.out.println("The GeoAPI interface
      * works correctly in two-dimensional spaces.
      */</code>
     @After
-    <b>public void</b> ensureAllTransformAreMath2D() {
-        assertTrue(<code class="GeoAPI"><var>transform</var></code> <b>instanceof</b> <code class="GeoAPI">MathTransform2D</code>);
+    public void ensureAllTransformAreMath2D() {
+        assertTrue(<code class="GeoAPI"><var>transform</var></code> instanceof <code class="GeoAPI">MathTransform2D</code>);
     }
 }</pre>
 

Modified: sis/site/trunk/book/en/utility.html
URL: http://svn.apache.org/viewvc/sis/site/trunk/book/en/utility.html?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/site/trunk/book/en/utility.html (original)
+++ sis/site/trunk/book/en/utility.html Fri Sep 25 17:19:32 2015
@@ -232,17 +232,17 @@
       </tr>
       <tr>
         <td>
-<pre style="margin-top: 6pt"><b>for</b> (<b>int</b> <var>i</var>=0; <var>i</var>&lt;<var>string</var>.length(); <var>i</var>++) {
-    <b>char</b> <var>c</var> = <var>string</var>.charAt(<var>i</var>);
-    <b>if</b> (Character.isWhitespace(<var>c</var>)) {
+<pre style="margin-top: 6pt">for (int <var>i</var>=0; <var>i</var>&lt;<var>string</var>.length(); <var>i</var>++) {
+    char <var>c</var> = <var>string</var>.charAt(<var>i</var>);
+    if (Character.isWhitespace(<var>c</var>)) {
         <code class="comment">// A blank space was found.</code>
     }
 }</pre>
         </td>
         <td>
-<pre style="margin-top: 6pt"><b>for</b> (<b>int</b> <var>i</var>=0; <var>i</var>&lt;<var>string</var>.length();) {
-    <b>int</b> <var>c</var> = <var>string</var>.codePointAt(<var>i</var>);
-    <b>if</b> (Character.isWhitespace(<var>c</var>)) {
+<pre style="margin-top: 6pt">for (int <var>i</var>=0; <var>i</var>&lt;<var>string</var>.length();) {
+    int <var>c</var> = <var>string</var>.codePointAt(<var>i</var>);
+    if (Character.isWhitespace(<var>c</var>)) {
         <code class="comment">// A blank space was found.</code>
     }
     <var>i</var> += Character.charCount(<var>c</var>);

Modified: sis/site/trunk/book/en/xml.html
URL: http://svn.apache.org/viewvc/sis/site/trunk/book/en/xml.html?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/site/trunk/book/en/xml.html (original)
+++ sis/site/trunk/book/en/xml.html Fri Sep 25 17:19:32 2015
@@ -280,14 +280,14 @@
       For example, the following code defines a value for the <code class="OGC">uuid</code> attribute:
     </p>
 
-<pre><b>import</b> <code class="SIS">org.apache.sis.metadata.iso.DefaultMetadata</code>;
-<b>import</b> <code class="SIS">org.apache.sis.xml.IdentifierSpace</code>;
-<b>import</b> java.util.UUID;
+<pre>import <code class="SIS">org.apache.sis.metadata.iso.DefaultMetadata</code>;
+import <code class="SIS">org.apache.sis.xml.IdentifierSpace</code>;
+import java.util.UUID;
 
-<b>public class</b> MyClass {
-    <b>public void</b> myMethod() {
+public class MyClass {
+    public void myMethod() {
         UUID <var>identifier</var> = UUID.randomUUID();
-        <code class="SIS">DefaultMetadata</code> <var>metadata</var> = <b>new</b> <code class="SIS">DefaultMetadata</code>();
+        <code class="SIS">DefaultMetadata</code> <var>metadata</var> = new <code class="SIS">DefaultMetadata</code>();
         <var>metadata</var>.<code class="SIS">getIdentifierMap().putSpecialized</code>(<code class="SIS">IdentifierSpace.UUID</code>, <var>identifier</var>);
     }
 }</pre>

Modified: sis/site/trunk/book/fr/geoapi.html
URL: http://svn.apache.org/viewvc/sis/site/trunk/book/fr/geoapi.html?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/site/trunk/book/fr/geoapi.html (original)
+++ sis/site/trunk/book/fr/geoapi.html Fri Sep 25 17:19:32 2015
@@ -237,14 +237,14 @@
       pas autorisée à retourner la valeur <code>null</code>.
     </p>
 
-<pre><b>package</b> <code class="GeoAPI">org.opengis.referencing.crs</code>;
+<pre>package <code class="GeoAPI">org.opengis.referencing.crs</code>;
 <code class="comment">
 /**
  * A 2D coordinate reference system used to approximate the shape of the earth on a planar surface.
  */</code>
 <code class="GeoAPI">@UML</code>(<var>specification</var> = ISO_19111,
      <var>identifier</var> = "<code class="OGC">SC_ProjectedCRS</code>")
-<b>public interface</b> <code class="GeoAPI">ProjectedCRS</code> <b>extends</b> <code class="GeoAPI">GeneralDerivedCRS</code> {<code class="comment">
+public interface <code class="GeoAPI">ProjectedCRS</code> extends <code class="GeoAPI">GeneralDerivedCRS</code> {<code class="comment">
     /**
      * Returns the coordinate system, which must be Cartesian.
      */</code>
@@ -281,8 +281,8 @@ System.out.println("Le nom standard de l
       une cache de leur application.
     </p>
 
-<pre>Properties <var>isoToGeoAPI</var> = <b>new</b> Properties();
-<b>try</b> (InputStream in = <code class="GeoAPI">UML</code>.class.getResourceAsStream("<code class="GeoAPI">class-index.properties</code>")) {
+<pre>Properties <var>isoToGeoAPI</var> = new Properties();
+try (InputStream in = <code class="GeoAPI">UML</code>.class.getResourceAsStream("<code class="GeoAPI">class-index.properties</code>")) {
     <var>isoToGeoAPI</var>.load(in);
 }
 String <var>isoName</var> = "<code class="OGC">CI_Citation</code>";
@@ -479,8 +479,8 @@ System.out.println("L’interface Geo
 
 <pre><code class="GeoAPI">MediumName</code> <var>cdRom</var>  = <code class="GeoAPI">MediumName.CD_ROM;</code>
 <code class="GeoAPI">MediumName</code> <var>usbKey</var> = <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">USB_KEY</code>"); <code class="comment">// Aucune constante n’existe pour cette valeur.</code>
-<b>assert</b> <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">CD_ROM</code>")  == <var>cdRom</var>  : "valueOf doit retourner les constantes existantes.";
-<b>assert</b> <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">USB_KEY</code>") == <var>usbKey</var> : "valueOf doit cacher les valeurs précédemment demandées.";</pre>
+assert <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">CD_ROM</code>")  == <var>cdRom</var>  : "valueOf doit retourner les constantes existantes.";
+assert <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">USB_KEY</code>") == <var>usbKey</var> : "valueOf doit cacher les valeurs précédemment demandées.";</pre>
 
 
 
@@ -505,12 +505,12 @@ System.out.println("L’interface Geo
       par exemple lorsque plusieurs bibliothèques cohabitent, alors le choix est laissé à l’utilisateur.
     </p>
 
-<pre><b>import</b> <code class="GeoAPI">org.opengis.referencing.GeodeticDatum</code>;
-<b>import</b> <code class="GeoAPI">org.opengis.referencing.DatumFactory</code>;
-<b>import</b> java.util.ServiceLoader;
+<pre>import <code class="GeoAPI">org.opengis.referencing.GeodeticDatum</code>;
+import <code class="GeoAPI">org.opengis.referencing.DatumFactory</code>;
+import java.util.ServiceLoader;
 
-<b>public class</b> MyApplication {
-    <b>public void</b> createMyDatum() {
+public class MyApplication {
+    public void createMyDatum() {
         ServiceLoader  <var>loader</var> = ServiceLoader.load(<code class="GeoAPI">DatumFactory</code>.class);
         <code class="GeoAPI">DatumFactory</code>  <var>factory</var> = <var>loader</var>.iterator().next();
         <code class="GeoAPI">GeodeticDatum</code> <var>myDatum</var> = <var>factory</var>.<code class="GeoAPI">createGeodeticDatum</code>(…);
@@ -715,24 +715,24 @@ System.out.println("L’interface Geo
       <abbr title="Java Virtual Machine">JVM</abbr> courante comme dans l’exemple suivant:
     </p>
 
-<pre><b>import</b> <code class="GeoAPI">org.opengis.metadata.Metadata</code>;
-<b>import</b> <code class="GeoAPI">org.opengis.test.Validators</code>;
-<b>import</b> org.junit.Test;
+<pre>import <code class="GeoAPI">org.opengis.metadata.Metadata</code>;
+import <code class="GeoAPI">org.opengis.test.Validators</code>;
+import org.junit.Test;
 
-<b>public class</b> MyTest {<code class="comment">
+public class MyTest {<code class="comment">
     /*
      * Tolérer l’absence d’attributs obligatoires dans les paquets metadata et citation.
      * Cette modification s’appliquera à tous les tests exécutés dans la <abbr>JVM</abbr> courante.
      * S’il existe plusieurs classes de tests, cette initialisation peut être effectuée
      * dans une classe parente à toutes les classes de tests.
      */</code>
-    <b>static</b> {
-        <code class="GeoAPI">Validators.DEFAULT.metadata.requireMandatoryAttributes</code> = <b>false</b>;
-        <code class="GeoAPI">Validators.DEFAULT.citation.requireMandatoryAttributes</code> = <b>false</b>;
+    static {
+        <code class="GeoAPI">Validators.DEFAULT.metadata.requireMandatoryAttributes</code> = false;
+        <code class="GeoAPI">Validators.DEFAULT.citation.requireMandatoryAttributes</code> = false;
     }
 
     @Test
-    <b>public void</b> testMyMetadata() {
+    public void testMyMetadata() {
         <code class="GeoAPI">Metadata</code> <var>myObject</var> = …; <code class="comment">// Construisez un objet ici.</code>
         <code class="GeoAPI">Validators.validate</code>(<var>myObject</var>);
     }
@@ -744,21 +744,21 @@ System.out.println("L’interface Geo
       Cette approche nécessite de créer une nouvelle instance du validateur dont on souhaite modifier la configuration.
     </p>
 
-<pre><b>import</b> <code class="GeoAPI">org.opengis.metadata.Metadata</code>;
-<b>import</b> <code class="GeoAPI">org.opengis.test.ValidatorContainer</code>;
-<b>import</b> org.junit.Test;
-
-<b>public class</b> MyTest {
-    <b>private final</b> <code class="GeoAPI">ValidatorContainer</code> <var>validators</var>;
-
-    <b>public</b> MyTest() {
-        <var>validators</var> = <b>new</b> <code class="GeoAPI">ValidatorContainer()</code>;
-        <var>validators</var>.<code class="GeoAPI">metadata.requireMandatoryAttributes</code> = <b>false</b>;
-        <var>validators</var>.<code class="GeoAPI">citation.requireMandatoryAttributes</code> = <b>false</b>;
+<pre>import <code class="GeoAPI">org.opengis.metadata.Metadata</code>;
+import <code class="GeoAPI">org.opengis.test.ValidatorContainer</code>;
+import org.junit.Test;
+
+public class MyTest {
+    private final <code class="GeoAPI">ValidatorContainer</code> <var>validators</var>;
+
+    public MyTest() {
+        <var>validators</var> = new <code class="GeoAPI">ValidatorContainer()</code>;
+        <var>validators</var>.<code class="GeoAPI">metadata.requireMandatoryAttributes</code> = false;
+        <var>validators</var>.<code class="GeoAPI">citation.requireMandatoryAttributes</code> = false;
     }
 
     @Test
-    <b>public void</b> testMyMetadata() {
+    public void testMyMetadata() {
         <code class="GeoAPI">Metadata</code> <var>myObject</var> = …; <code class="comment">// Construisez un objet ici.</code>
         <var>validators</var>.<code class="GeoAPI">validate</code>(<var>myObject</var>);
     }
@@ -782,20 +782,20 @@ System.out.println("L’interface Geo
       qui sera exécutée après chacun des tests.
     </p>
 
-<pre><b>import</b> org.junit.*;
-<b>import</b> org.junit.runner.RunWith;
-<b>import</b> org.junit.runners.JUnit4;
-<b>import</b> <code class="GeoAPI">org.opengis.test.referencing.ParameterizedTransformTest</code>;
-<b>import static</b> org.junit.Assert.*;
+<pre>import org.junit.*;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import <code class="GeoAPI">org.opengis.test.referencing.ParameterizedTransformTest</code>;
+import static org.junit.Assert.*;
 
 @RunWith(JUnit4.class)
-<b>public class</b> MyTest <b>extends</b> <code class="GeoAPI">ParameterizedTransformTest</code> {<code class="comment">
+public class MyTest extends <code class="GeoAPI">ParameterizedTransformTest</code> {<code class="comment">
     /**
      * Spécifie aux tests de GeoAPI notre propre fabrique de transformations de coordonnées.
      * GeoAPI testera les objets construits par cette fabrique.
      */</code>
-    <b>public</b> MyTest() {
-        <b>super</b>(<b>new</b> MyMathTransformFactory());
+    public MyTest() {
+        super(new MyMathTransformFactory());
     }
 <code class="comment">
     /**
@@ -805,9 +805,9 @@ System.out.println("L’interface Geo
      */</code>
     @Test
     @Override
-    <b>public void</b> testLambertAzimuthalEqualArea() <b>throws</b> <code class="GeoAPI">FactoryException</code>, <code class="GeoAPI">TransformException</code> {
+    public void testLambertAzimuthalEqualArea() throws <code class="GeoAPI">FactoryException</code>, <code class="GeoAPI">TransformException</code> {
         <code class="GeoAPI"><var>tolerance</var></code> = 0.1; // Tolérance de 10 cm.
-        <b>super</b>.<code class="GeoAPI">testLambertAzimuthalEqualArea()</code>;
+        super.<code class="GeoAPI">testLambertAzimuthalEqualArea()</code>;
     }
 <code class="comment">
     /**
@@ -816,8 +816,8 @@ System.out.println("L’interface Geo
      * travaillait bien dans des espaces bi-dimensionnels.
      */</code>
     @After
-    <b>public void</b> ensureAllTransformAreMath2D() {
-        assertTrue(<code class="GeoAPI"><var>transform</var></code> <b>instanceof</b> <code class="GeoAPI">MathTransform2D</code>);
+    public void ensureAllTransformAreMath2D() {
+        assertTrue(<code class="GeoAPI"><var>transform</var></code> instanceof <code class="GeoAPI">MathTransform2D</code>);
     }
 }</pre>
 

Modified: sis/site/trunk/book/fr/utility.html
URL: http://svn.apache.org/viewvc/sis/site/trunk/book/fr/utility.html?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/site/trunk/book/fr/utility.html (original)
+++ sis/site/trunk/book/fr/utility.html Fri Sep 25 17:19:32 2015
@@ -232,17 +232,17 @@
       </tr>
       <tr>
         <td>
-<pre style="margin-top: 6pt"><b>for</b> (<b>int</b> <var>i</var>=0; <var>i</var>&lt;<var>string</var>.length(); <var>i</var>++) {
-    <b>char</b> <var>c</var> = <var>string</var>.charAt(<var>i</var>);
-    <b>if</b> (Character.isWhitespace(<var>c</var>)) {
+<pre style="margin-top: 6pt">for (int <var>i</var>=0; <var>i</var>&lt;<var>string</var>.length(); <var>i</var>++) {
+    char <var>c</var> = <var>string</var>.charAt(<var>i</var>);
+    if (Character.isWhitespace(<var>c</var>)) {
         <code class="comment">// Un espace blanc a été trouvé.</code>
     }
 }</pre>
         </td>
         <td>
-<pre style="margin-top: 6pt"><b>for</b> (<b>int</b> <var>i</var>=0; <var>i</var>&lt;<var>string</var>.length();) {
-    <b>int</b> <var>c</var> = <var>string</var>.codePointAt(<var>i</var>);
-    <b>if</b> (Character.isWhitespace(<var>c</var>)) {
+<pre style="margin-top: 6pt">for (int <var>i</var>=0; <var>i</var>&lt;<var>string</var>.length();) {
+    int <var>c</var> = <var>string</var>.codePointAt(<var>i</var>);
+    if (Character.isWhitespace(<var>c</var>)) {
         <code class="comment">// Un espace blanc a été trouvé.</code>
     }
     <var>i</var> += Character.charCount(<var>c</var>);

Modified: sis/site/trunk/book/fr/xml.html
URL: http://svn.apache.org/viewvc/sis/site/trunk/book/fr/xml.html?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/site/trunk/book/fr/xml.html (original)
+++ sis/site/trunk/book/fr/xml.html Fri Sep 25 17:19:32 2015
@@ -288,14 +288,14 @@
       Par exemple le code suivant définit une valeur pour l’attribut <code class="OGC">uuid</code>:
     </p>
 
-<pre><b>import</b> <code class="SIS">org.apache.sis.metadata.iso.DefaultMetadata</code>;
-<b>import</b> <code class="SIS">org.apache.sis.xml.IdentifierSpace</code>;
-<b>import</b> java.util.UUID;
+<pre>import <code class="SIS">org.apache.sis.metadata.iso.DefaultMetadata</code>;
+import <code class="SIS">org.apache.sis.xml.IdentifierSpace</code>;
+import java.util.UUID;
 
-<b>public class</b> MyClass {
-    <b>public void</b> myMethod() {
+public class MyClass {
+    public void myMethod() {
         UUID <var>identifier</var> = UUID.randomUUID();
-        <code class="SIS">DefaultMetadata</code> <var>metadata</var> = <b>new</b> <code class="SIS">DefaultMetadata</code>();
+        <code class="SIS">DefaultMetadata</code> <var>metadata</var> = new <code class="SIS">DefaultMetadata</code>();
         <var>metadata</var>.<code class="SIS">getIdentifierMap().putSpecialized</code>(<code class="SIS">IdentifierSpace.UUID</code>, <var>identifier</var>);
     }
 }</pre>

Modified: sis/site/trunk/content/book/en/developer-guide.html
URL: http://svn.apache.org/viewvc/sis/site/trunk/content/book/en/developer-guide.html?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/site/trunk/content/book/en/developer-guide.html (original)
+++ sis/site/trunk/content/book/en/developer-guide.html Fri Sep 25 17:19:32 2015
@@ -714,7 +714,7 @@ and that this association is mandatory �
  */</code>
 <code class="GeoAPI">@UML</code>(<var>specification</var> = ISO_19111,
      <var>identifier</var> = "<code class="OGC">SC_ProjectedCRS</code>")
-<b>public interface</b> <code class="GeoAPI">ProjectedCRS</code> <b>extends</b> <code class="GeoAPI">GeneralDerivedCRS</code> {<code class="comment">
+<b>public</b> <b>interface</b> <code class="GeoAPI">ProjectedCRS</code> <b>extends</b> <code class="GeoAPI">GeneralDerivedCRS</code> {<code class="comment">
     /**
      * Returns the coordinate system, which must be Cartesian.
      */</code>
@@ -731,9 +731,9 @@ or for writing elements in an <abbr>XML<
 The following example displays the standard name for the method <code class="GeoAPI">getTitle()</code> from the <code class="GeoAPI">Citation</code> interface:
 </p>
 
-<pre>Class&lt;?&gt; <var>type</var>   = <code class="GeoAPI">Citation</code>.class;
-Method   <var>method</var> = <var>type</var>.getMethod("<code class="GeoAPI">getTitle</code>", (Class&lt;?&gt;[]) null);
-<code class="GeoAPI">UML</code>      <var>annot</var>  = <var>method</var>.getAnnotation(<code class="GeoAPI">UML</code>.class);
+<pre>Class&lt;?&gt; <var>type</var>   = <code class="GeoAPI">Citation</code>.<b>class</b>;
+Method   <var>method</var> = <var>type</var>.getMethod("<code class="GeoAPI">getTitle</code>", (Class&lt;?&gt;[]) <b>null</b>);
+<code class="GeoAPI">UML</code>      <var>annot</var>  = <var>method</var>.getAnnotation(<code class="GeoAPI">UML</code>.<b>class</b>);
 String   <var>id</var>     = <var>annot</var>.identifier();
 System.out.println("The standard name for the " + <var>method</var>.getName() + " method is " + <var>id</var>);</pre>
 
@@ -750,7 +750,7 @@ Users are always encouraged to only read
 </p>
 
 <pre>Properties <var>isoToGeoAPI</var> = <b>new</b> Properties();
-<b>try</b> (InputStream in = <code class="GeoAPI">UML</code>.class.getResourceAsStream("<code class="GeoAPI">class-index.properties</code>")) {
+<b>try</b> (InputStream in = <code class="GeoAPI">UML</code>.<b>class</b>.getResourceAsStream("<code class="GeoAPI">class-index.properties</code>")) {
     <var>isoToGeoAPI</var>.load(in);
 }
 String <var>isoName</var> = "<code class="OGC">CI_Citation</code>";
@@ -944,7 +944,7 @@ creates new instances if the name provid
 </p>
 
 <pre><code class="GeoAPI">MediumName</code> <var>cdRom</var>  = <code class="GeoAPI">MediumName.CD_ROM;</code>
-<code class="GeoAPI">MediumName</code> <var>usbKey</var> = <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">USB_KEY</code>"); <code class="comment">// There is no constraint on this value.</code>
+<code class="GeoAPI">MediumName</code> <var>usbKey</var> = <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">USB_KEY</code>"); <code class="comment">// There is no constraint on <b>this</b> value.</code>
 <b>assert</b> <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">CD_ROM</code>")  == <var>cdRom</var>  : "valueOf must return existing constants.";
 <b>assert</b> <code class="GeoAPI">MediumName.valueOf</code>("<code class="GeoAPI">USB_KEY</code>") == <var>usbKey</var> : "valueOf must cache the previously requested values.";</pre>
 
@@ -975,9 +975,9 @@ for example when multiple libraries coex
 <b>import</b> <code class="GeoAPI">org.opengis.referencing.DatumFactory</code>;
 <b>import</b> java.util.ServiceLoader;
 
-<b>public class</b> MyApplication {
-    <b>public void</b> createMyDatum() {
-        ServiceLoader  <var>loader</var> = ServiceLoader.load(<code class="GeoAPI">DatumFactory</code>.class);
+<b>public</b> <b>class</b> MyApplication {
+    <b>public</b> <b>void</b> createMyDatum() {
+        ServiceLoader  <var>loader</var> = ServiceLoader.load(<code class="GeoAPI">DatumFactory</code>.<b>class</b>);
         <code class="GeoAPI">DatumFactory</code>  <var>factory</var> = <var>loader</var>.iterator().next();
         <code class="GeoAPI">GeodeticDatum</code> <var>myDatum</var> = <var>factory</var>.<code class="GeoAPI">createGeodeticDatum</code>(…);
     }
@@ -1172,12 +1172,12 @@ as in the following example:
 <b>import</b> <code class="GeoAPI">org.opengis.test.Validators</code>;
 <b>import</b> org.junit.Test;
 
-<b>public class</b> MyTest {<code class="comment">
+<b>public</b> <b>class</b> MyTest {<code class="comment">
     /*
      * Tolerate the absence of mandatory attributes in metadata and citation packages.
      * This modification applies to all tests executed by the currently running <abbr>JVM</abbr>.
-     * If there are multiple test classes, this initialization may be performed
-     * in a parent class to all test classes.
+     * If there are multiple test classes, <b>this</b> initialization may be performed
+     * in a parent <b>class</b> to all test classes.
      */</code>
     <b>static</b> {
         <code class="GeoAPI">Validators.DEFAULT.metadata.requireMandatoryAttributes</code> = <b>false</b>;
@@ -1185,7 +1185,7 @@ as in the following example:
     }
 
     @Test
-    <b>public void</b> testMyMetadata() {
+    <b>public</b> <b>void</b> testMyMetadata() {
         <code class="GeoAPI">Metadata</code> <var>myObject</var> = …; <code class="comment">// Create an object here.</code>
         <code class="GeoAPI">Validators.validate</code>(<var>myObject</var>);
     }
@@ -1200,8 +1200,8 @@ This approach requires the creation of a
 <b>import</b> <code class="GeoAPI">org.opengis.test.ValidatorContainer</code>;
 <b>import</b> org.junit.Test;
 
-<b>public class</b> MyTest {
-    <b>private final</b> <code class="GeoAPI">ValidatorContainer</code> <var>validators</var>;
+<b>public</b> <b>class</b> MyTest {
+    <b>private</b> <b>final</b> <code class="GeoAPI">ValidatorContainer</code> <var>validators</var>;
 
     <b>public</b> MyTest() {
         <var>validators</var> = <b>new</b> <code class="GeoAPI">ValidatorContainer()</code>;
@@ -1210,7 +1210,7 @@ This approach requires the creation of a
     }
 
     @Test
-    <b>public void</b> testMyMetadata() {
+    <b>public</b> <b>void</b> testMyMetadata() {
         <code class="GeoAPI">Metadata</code> <var>myObject</var> = …; <code class="comment">// Create an object here.</code>
         <var>validators</var>.<code class="GeoAPI">validate</code>(<var>myObject</var>);
     }
@@ -1237,37 +1237,37 @@ However, this example adds a supplementa
 <b>import</b> org.junit.runner.RunWith;
 <b>import</b> org.junit.runners.JUnit4;
 <b>import</b> <code class="GeoAPI">org.opengis.test.referencing.ParameterizedTransformTest</code>;
-<b>import static</b> org.junit.Assert.*;
+<b>import</b> <b>static</b> org.junit.Assert.*;
 
-@RunWith(JUnit4.class)
-<b>public class</b> MyTest <b>extends</b> <code class="GeoAPI">ParameterizedTransformTest</code> {<code class="comment">
+@RunWith(JUnit4.<b>class</b>)
+<b>public</b> <b>class</b> MyTest <b>extends</b> <code class="GeoAPI">ParameterizedTransformTest</code> {<code class="comment">
     /**
-     * Specify our own coordinate transformation factory for the GeoAPI tests.
-     * GeoAPI will test the objects created by this factory.
+     * Specify our own coordinate transformation factory <b>for</b> the GeoAPI tests.
+     * GeoAPI will test the objects created by <b>this</b> factory.
      */</code>
     <b>public</b> MyTest() {
         <b>super</b>(<b>new</b> MyMathTransformFactory());
     }
 <code class="comment">
     /**
-     * Changes the behaviour of a test. This example relaxes the requirements of this test a little,
-     * by accepting errors of up to 10 centimetres, rather than the default value of 1 cm.
-     * This change only applies to this method, and does not affect the other inherited tests.
+     * Changes the behaviour of a test. This example relaxes the requirements of <b>this</b> test a little,
+     * by accepting errors of up to 10 centimetres, rather than the <b>default</b> value of 1 cm.
+     * This change only applies to <b>this</b> method, and does not affect the other inherited tests.
      */</code>
     @Test
     @Override
-    <b>public void</b> testLambertAzimuthalEqualArea() <b>throws</b> <code class="GeoAPI">FactoryException</code>, <code class="GeoAPI">TransformException</code> {
+    <b>public</b> <b>void</b> testLambertAzimuthalEqualArea() <b>throws</b> <code class="GeoAPI">FactoryException</code>, <code class="GeoAPI">TransformException</code> {
         <code class="GeoAPI"><var>tolerance</var></code> = 0.1; // 10 cm tolerance.
         <b>super</b>.<code class="GeoAPI">testLambertAzimuthalEqualArea()</code>;
     }
 <code class="comment">
     /**
      * Supplemental verification performed after each test, inherited or not.
-     * In this example, we are verifying that the transformation tested
+     * In <b>this</b> example, we are verifying that the transformation tested
      * works correctly in two-dimensional spaces.
      */</code>
     @After
-    <b>public void</b> ensureAllTransformAreMath2D() {
+    <b>public</b> <b>void</b> ensureAllTransformAreMath2D() {
         assertTrue(<code class="GeoAPI"><var>transform</var></code> <b>instanceof</b> <code class="GeoAPI">MathTransform2D</code>);
     }
 }</pre>
@@ -1563,8 +1563,8 @@ For example, the following code defines
 <b>import</b> <code class="SIS">org.apache.sis.xml.IdentifierSpace</code>;
 <b>import</b> java.util.UUID;
 
-<b>public class</b> MyClass {
-    <b>public void</b> myMethod() {
+<b>public</b> <b>class</b> MyClass {
+    <b>public</b> <b>void</b> myMethod() {
         UUID <var>identifier</var> = UUID.randomUUID();
         <code class="SIS">DefaultMetadata</code> <var>metadata</var> = <b>new</b> <code class="SIS">DefaultMetadata</code>();
         <var>metadata</var>.<code class="SIS">getIdentifierMap().putSpecialized</code>(<code class="SIS">IdentifierSpace.UUID</code>, <var>identifier</var>);

Modified: sis/site/trunk/content/book/fr/developer-guide.html
URL: http://svn.apache.org/viewvc/sis/site/trunk/content/book/fr/developer-guide.html?rev=1705333&r1=1705332&r2=1705333&view=diff
==============================================================================
--- sis/site/trunk/content/book/fr/developer-guide.html [UTF-8] (original)
+++ sis/site/trunk/content/book/fr/developer-guide.html [UTF-8] Fri Sep 25 17:19:32 2015
@@ -753,7 +753,7 @@ pas autorisée à retourner la valeur <c
  */</code>
 <code class="GeoAPI">@UML</code>(<var>specification</var> = ISO_19111,
      <var>identifier</var> = "<code class="OGC">SC_ProjectedCRS</code>")
-<b>public interface</b> <code class="GeoAPI">ProjectedCRS</code> <b>extends</b> <code class="GeoAPI">GeneralDerivedCRS</code> {<code class="comment">
+<b>public</b> <b>interface</b> <code class="GeoAPI">ProjectedCRS</code> <b>extends</b> <code class="GeoAPI">GeneralDerivedCRS</code> {<code class="comment">
     /**
      * Returns the coordinate system, which must be Cartesian.
      */</code>
@@ -770,9 +770,9 @@ ou pour écrire des éléments dans un d
 méthode <code class="GeoAPI">getTitle()</code> de l’interface <code class="GeoAPI">Citation</code>:
 </p>
 
-<pre>Class&lt;?&gt; <var>type</var>   = <code class="GeoAPI">Citation</code>.class;
-Method   <var>method</var> = <var>type</var>.getMethod("<code class="GeoAPI">getTitle</code>", (Class&lt;?&gt;[]) null);
-<code class="GeoAPI">UML</code>      <var>annot</var>  = <var>method</var>.getAnnotation(<code class="GeoAPI">UML</code>.class);
+<pre>Class&lt;?&gt; <var>type</var>   = <code class="GeoAPI">Citation</code>.<b>class</b>;
+Method   <var>method</var> = <var>type</var>.getMethod("<code class="GeoAPI">getTitle</code>", (Class&lt;?&gt;[]) <b>null</b>);
+<code class="GeoAPI">UML</code>      <var>annot</var>  = <var>method</var>.getAnnotation(<code class="GeoAPI">UML</code>.<b>class</b>);
 String   <var>id</var>     = <var>annot</var>.identifier();
 System.out.println("Le nom standard de la méthode " + <var>method</var>.getName() + " est " + <var>id</var>);</pre>
 
@@ -791,7 +791,7 @@ une cache de leur application.
 </p>
 
 <pre>Properties <var>isoToGeoAPI</var> = <b>new</b> Properties();
-<b>try</b> (InputStream in = <code class="GeoAPI">UML</code>.class.getResourceAsStream("<code class="GeoAPI">class-index.properties</code>")) {
+<b>try</b> (InputStream in = <code class="GeoAPI">UML</code>.<b>class</b>.getResourceAsStream("<code class="GeoAPI">class-index.properties</code>")) {
     <var>isoToGeoAPI</var>.load(in);
 }
 String <var>isoName</var> = "<code class="OGC">CI_Citation</code>";
@@ -1018,9 +1018,9 @@ par exemple lorsque plusieurs bibliothè
 <b>import</b> <code class="GeoAPI">org.opengis.referencing.DatumFactory</code>;
 <b>import</b> java.util.ServiceLoader;
 
-<b>public class</b> MyApplication {
-    <b>public void</b> createMyDatum() {
-        ServiceLoader  <var>loader</var> = ServiceLoader.load(<code class="GeoAPI">DatumFactory</code>.class);
+<b>public</b> <b>class</b> MyApplication {
+    <b>public</b> <b>void</b> createMyDatum() {
+        ServiceLoader  <var>loader</var> = ServiceLoader.load(<code class="GeoAPI">DatumFactory</code>.<b>class</b>);
         <code class="GeoAPI">DatumFactory</code>  <var>factory</var> = <var>loader</var>.iterator().next();
         <code class="GeoAPI">GeodeticDatum</code> <var>myDatum</var> = <var>factory</var>.<code class="GeoAPI">createGeodeticDatum</code>(…);
     }
@@ -1228,7 +1228,7 @@ Cette règle et quelques autres peuvent
 <b>import</b> <code class="GeoAPI">org.opengis.test.Validators</code>;
 <b>import</b> org.junit.Test;
 
-<b>public class</b> MyTest {<code class="comment">
+<b>public</b> <b>class</b> MyTest {<code class="comment">
     /*
      * Tolérer l’absence d’attributs obligatoires dans les paquets metadata et citation.
      * Cette modification s’appliquera à tous les tests exécutés dans la <abbr>JVM</abbr> courante.
@@ -1241,7 +1241,7 @@ Cette règle et quelques autres peuvent
     }
 
     @Test
-    <b>public void</b> testMyMetadata() {
+    <b>public</b> <b>void</b> testMyMetadata() {
         <code class="GeoAPI">Metadata</code> <var>myObject</var> = …; <code class="comment">// Construisez un objet ici.</code>
         <code class="GeoAPI">Validators.validate</code>(<var>myObject</var>);
     }
@@ -1257,8 +1257,8 @@ Cette approche nécessite de créer une
 <b>import</b> <code class="GeoAPI">org.opengis.test.ValidatorContainer</code>;
 <b>import</b> org.junit.Test;
 
-<b>public class</b> MyTest {
-    <b>private final</b> <code class="GeoAPI">ValidatorContainer</code> <var>validators</var>;
+<b>public</b> <b>class</b> MyTest {
+    <b>private</b> <b>final</b> <code class="GeoAPI">ValidatorContainer</code> <var>validators</var>;
 
     <b>public</b> MyTest() {
         <var>validators</var> = <b>new</b> <code class="GeoAPI">ValidatorContainer()</code>;
@@ -1267,7 +1267,7 @@ Cette approche nécessite de créer une
     }
 
     @Test
-    <b>public void</b> testMyMetadata() {
+    <b>public</b> <b>void</b> testMyMetadata() {
         <code class="GeoAPI">Metadata</code> <var>myObject</var> = …; <code class="comment">// Construisez un objet ici.</code>
         <var>validators</var>.<code class="GeoAPI">validate</code>(<var>myObject</var>);
     }
@@ -1295,10 +1295,10 @@ qui sera exécutée après chacun des te
 <b>import</b> org.junit.runner.RunWith;
 <b>import</b> org.junit.runners.JUnit4;
 <b>import</b> <code class="GeoAPI">org.opengis.test.referencing.ParameterizedTransformTest</code>;
-<b>import static</b> org.junit.Assert.*;
+<b>import</b> <b>static</b> org.junit.Assert.*;
 
-@RunWith(JUnit4.class)
-<b>public class</b> MyTest <b>extends</b> <code class="GeoAPI">ParameterizedTransformTest</code> {<code class="comment">
+@RunWith(JUnit4.<b>class</b>)
+<b>public</b> <b>class</b> MyTest <b>extends</b> <code class="GeoAPI">ParameterizedTransformTest</code> {<code class="comment">
     /**
      * Spécifie aux tests de GeoAPI notre propre fabrique de transformations de coordonnées.
      * GeoAPI testera les objets construits par cette fabrique.
@@ -1314,7 +1314,7 @@ qui sera exécutée après chacun des te
      */</code>
     @Test
     @Override
-    <b>public void</b> testLambertAzimuthalEqualArea() <b>throws</b> <code class="GeoAPI">FactoryException</code>, <code class="GeoAPI">TransformException</code> {
+    <b>public</b> <b>void</b> testLambertAzimuthalEqualArea() <b>throws</b> <code class="GeoAPI">FactoryException</code>, <code class="GeoAPI">TransformException</code> {
         <code class="GeoAPI"><var>tolerance</var></code> = 0.1; // Tolérance de 10 cm.
         <b>super</b>.<code class="GeoAPI">testLambertAzimuthalEqualArea()</code>;
     }
@@ -1325,7 +1325,7 @@ qui sera exécutée après chacun des te
      * travaillait bien dans des espaces bi-dimensionnels.
      */</code>
     @After
-    <b>public void</b> ensureAllTransformAreMath2D() {
+    <b>public</b> <b>void</b> ensureAllTransformAreMath2D() {
         assertTrue(<code class="GeoAPI"><var>transform</var></code> <b>instanceof</b> <code class="GeoAPI">MathTransform2D</code>);
     }
 }</pre>
@@ -1630,8 +1630,8 @@ Par exemple le code suivant définit une
 <b>import</b> <code class="SIS">org.apache.sis.xml.IdentifierSpace</code>;
 <b>import</b> java.util.UUID;
 
-<b>public class</b> MyClass {
-    <b>public void</b> myMethod() {
+<b>public</b> <b>class</b> MyClass {
+    <b>public</b> <b>void</b> myMethod() {
         UUID <var>identifier</var> = UUID.randomUUID();
         <code class="SIS">DefaultMetadata</code> <var>metadata</var> = <b>new</b> <code class="SIS">DefaultMetadata</code>();
         <var>metadata</var>.<code class="SIS">getIdentifierMap().putSpecialized</code>(<code class="SIS">IdentifierSpace.UUID</code>, <var>identifier</var>);