sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1804581 - in /sis/branches/JDK8: core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/ core/sis-utility/src/main/java/org/apache/sis/internal/util/ core/sis-utility/src/main/java/org/apache/sis/xml/ storage/sis-storage/src/main/...
Date Wed, 09 Aug 2017 16:43:12 GMT
Author: desruisseaux
Date: Wed Aug  9 16:43:11 2017
New Revision: 1804581

URL: http://svn.apache.org/viewvc?rev=1804581&view=rev
Log:
Replace the XML "xsd" prefix by "xs" at least in documentation. This is a side effect of Cullen
Rombach's work on ISO 19115-3 upgrade.

Modified:
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java?rev=1804581&r1=1804580&r2=1804581&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java
[UTF-8] Wed Aug  9 16:43:11 2017
@@ -26,7 +26,7 @@ import org.apache.sis.internal.jaxb.XmlU
 
 /**
  * JAXB adapter wrapping the date value (as milliseconds elapsed since January 1st, 1970)
in a
- * {@link XMLGregorianCalendar} for the {@code xsd:date} type. Hours, minutes and seconds
are
+ * {@link XMLGregorianCalendar} for the {@code xs:date} type. Hours, minutes and seconds
are
  * discarded.
  *
  * <p>Using this adapter is equivalent to apply the following annotation on a {@code
Date} field:</p>
@@ -81,7 +81,7 @@ public final class DateAdapter extends X
             final Context context = Context.current();
             try {
                 final XMLGregorianCalendar gc = XmlUtilities.toXML(context, value);
-                XmlUtilities.trimTime(gc, true);        // Type is xsd:date without time.
+                XmlUtilities.trimTime(gc, true);        // Type is xs:date without time.
                 return gc;
             } catch (DatatypeConfigurationException e) {
                 Context.warningOccured(context, XmlAdapter.class, "marshal", e, true);

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java?rev=1804581&r1=1804580&r2=1804581&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java
[UTF-8] Wed Aug  9 16:43:11 2017
@@ -58,7 +58,7 @@ import org.apache.sis.measure.Units;
  *   <gml:semiMajorAxis uom="urn:ogc:def:uom:EPSG::9001">6378137</gml:semiMajorAxis>
  * }
  *
- * Both have a value of type {@code xsd:double} and a {@code uom} attribute (without namespace)
+ * Both have a value of type {@code xs:double} and a {@code uom} attribute (without namespace)
  * of type {@code gml:UomIdentifier}. Those two informations are represented by this class.
  *
  * @author  Cédric Briançon (Geomatys)

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java?rev=1804581&r1=1804580&r2=1804581&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java
[UTF-8] Wed Aug  9 16:43:11 2017
@@ -32,7 +32,7 @@ import static org.apache.sis.internal.ja
 
 /**
  * JAXB adapter wrapping the date value (as milliseconds elapsed since January 1st, 1970)
in a
- * {@link XMLGregorianCalendar} for the {@code xsd:dateTime} type with the timezone forced
to UTC.
+ * {@link XMLGregorianCalendar} for the {@code xs:dateTime} type with the timezone forced
to UTC.
  * The milliseconds are omitted if not different than zero.
  *
  * @author  Martin Desruisseaux (Geomatys)

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java?rev=1804581&r1=1804580&r2=1804581&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java
[UTF-8] Wed Aug  9 16:43:11 2017
@@ -46,14 +46,14 @@ public final class Utilities extends Sta
      *
      * <div class="section">Relationship with {@code gml:id}</div>
      * This method may be invoked for building {@code gml:id} values. Strictly speaking this
is not appropriate
-     * since the {@code xsd:ID} type defines valid identifiers as containing only letters,
digits, underscores,
+     * since the {@code xs:ID} type defines valid identifiers as containing only letters,
digits, underscores,
      * hyphens, and periods. This differ from Unicode identifier in two ways:
      *
      * <ul>
      *   <li>Unicode identifiers accept Japanese or Chinese ideograms for instance,
which are considered as letters.</li>
      *   <li>Unicode identifiers do not accept the {@code '-'} and {@code ':'} characters.
However this restriction
      *       fits well our need, since those characters are typical values for the {@code
separator} argument.</li>
-     *   <li>Note that {@code '_'} is valid both in {@code xsd:ID} and Unicode identifier.</li>
+     *   <li>Note that {@code '_'} is valid both in {@code xs:ID} and Unicode identifier.</li>
      * </ul>
      *
      * @param  appendTo     the buffer where to append the valid characters.

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java?rev=1804581&r1=1804580&r2=1804581&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java [UTF-8]
(original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java [UTF-8]
Wed Aug  9 16:43:11 2017
@@ -189,7 +189,7 @@ public final class Namespaces extends St
     private static final Map<String,String> SPECIFIC_URLS;
     static {
         final Map<String,String> p = new HashMap<>(40);
-        p.put(XMLConstants.W3C_XML_SCHEMA_NS_URI,                         "xsd");
+        p.put(XMLConstants.W3C_XML_SCHEMA_NS_URI,                         "xsd");   // TODO:
should be "xs".
         p.put(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI,                "xsi");
         p.put("http://www.w3.org/2004/02/skos/core#",                    "skos");
         p.put("http://www.w3.org/1999/02/22-rdf-syntax-ns#",              "rdf");

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java?rev=1804581&r1=1804580&r2=1804581&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
[UTF-8] Wed Aug  9 16:43:11 2017
@@ -111,12 +111,24 @@ public final class Store extends DataSto
     static final char ORDINATE_SEPARATOR = ' ';
 
     /**
-     * The prefix for elements in the {@code @columns} line that specify the data type.
+     * The prefix for elements in the {@code @columns} line that specify the data type,
+     * as required by the OGC CSV encoding specification.
      * Examples: {@code xsd:boolean}, {@code xsd:decimal}, {@code xsd:integer}, <i>etc</i>.
+     *
+     * <p>Note that this prefix is slightly different than the {@code "xs:"} prefix
used
+     * in {@code https://www.w3.org/2009/XMLSchema/XMLSchema.xsd} file. This data store
+     * implementation accepts both.</p>
      */
     private static final String TYPE_PREFIX = "xsd:";
 
     /**
+     * The prefix used in {@code https://www.w3.org/2009/XMLSchema/XMLSchema.xsd} file.
+     * This is not the same prefix than the one specified by OGC CSV encoding, but this
+     * implementation accepts both.
+     */
+    private static final String XS_PREFIX = "xs:";
+
+    /**
      * The reader, set by the constructor and cleared when no longer needed.
      *
      * @see #readLine()
@@ -473,8 +485,11 @@ public final class Store extends DataSto
             Class<?> type = null;
             if (++i < size) {
                 String tn = elements.get(i);
-                if (!tn.isEmpty() && tn.regionMatches(true, 0, TYPE_PREFIX, 0, TYPE_PREFIX.length()))
{
-                    String st = tn.substring(TYPE_PREFIX.length()).toLowerCase(Locale.US);
+                int length;
+                if (tn.regionMatches(true, 0, TYPE_PREFIX, 0, length = TYPE_PREFIX.length())
||
+                    tn.regionMatches(true, 0,   XS_PREFIX, 0, length =   XS_PREFIX.length()))
+                {
+                    String st = tn.substring(length).toLowerCase(Locale.US);
                     switch (st) {
                         case "boolean":  type = Boolean.class; break;
                         case "decimal":  type = Double .class; break;

Modified: sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java?rev=1804581&r1=1804580&r2=1804581&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
[UTF-8] Wed Aug  9 16:43:11 2017
@@ -155,31 +155,31 @@ final class Types {
         parent = builder.build();
         /*
          * WayPoint ⇾ GPXEntity
-         * ┌──────────────────┬────────────────┬────────────────────────┬─────────────┐
-         * │ Name             │ Type           │ XML type               │ Cardinality
│
-         * ├──────────────────┼────────────────┼────────────────────────┼─────────────┤
-         * │ sis:identifier   │ Integer        │                        │   [1 …
1]   │
-         * │ sis:envelope     │ Envelope       │                        │   [1 …
1]   │
-         * │ sis:geometry     │ Point          │ (lat,lon) attributes   │   [1 …
1]   │
-         * │ ele              │ Double         │ xsd:decimal            │   [0 …
1]   │
-         * │ time             │ Temporal       │ xsd:dateTime           │   [0 …
1]   │
-         * │ magvar           │ Double         │ gpx:degreesType        │   [0 …
1]   │
-         * │ geoidheight      │ Double         │ xsd:decimal            │   [0 …
1]   │
-         * │ name             │ String         │ xsd:string             │   [0 …
1]   │
-         * │ cmt              │ String         │ xsd:string             │   [0 …
1]   │
-         * │ desc             │ String         │ xsd:string             │   [0 …
1]   │
-         * │ src              │ String         │ xsd:string             │   [0 …
1]   │
-         * │ link             │ OnlineResource │ gpx:linkType           │   [0 …
∞]   │
-         * │ sym              │ String         │ xsd:string             │   [0 …
1]   │
-         * │ type             │ String         │ xsd:string             │   [0 …
1]   │
-         * │ fix              │ Fix            │ gpx:fixType            │   [0 …
1]   │
-         * │ sat              │ Integer        │ xsd:nonNegativeInteger │   [0 …
1]   │
-         * │ hdop             │ Double         │ xsd:decimal            │   [0 …
1]   │
-         * │ vdop             │ Double         │ xsd:decimal            │   [0 …
1]   │
-         * │ pdop             │ Double         │ xsd:decimal            │   [0 …
1]   │
-         * │ ageofdgpsdata    │ Double         │ xsd:decimal            │   [0 …
1]   │
-         * │ dgpsid           │ Integer        │ gpx:dgpsStationType    │   [0 …
1]   │
-         * └──────────────────┴────────────────┴────────────────────────┴─────────────┘
+         * ┌──────────────────┬────────────────┬───────────────────────┬─────────────┐
+         * │ Name             │ Type           │ XML type              │ Cardinality
│
+         * ├──────────────────┼────────────────┼───────────────────────┼─────────────┤
+         * │ sis:identifier   │ Integer        │                       │   [1 …
1]   │
+         * │ sis:envelope     │ Envelope       │                       │   [1 …
1]   │
+         * │ sis:geometry     │ Point          │ (lat,lon) attributes  │   [1 …
1]   │
+         * │ ele              │ Double         │ xs:decimal            │   [0 …
1]   │
+         * │ time             │ Temporal       │ xs:dateTime           │   [0 …
1]   │
+         * │ magvar           │ Double         │ gpx:degreesType       │   [0 …
1]   │
+         * │ geoidheight      │ Double         │ xs:decimal            │   [0 …
1]   │
+         * │ name             │ String         │ xs:string             │   [0 …
1]   │
+         * │ cmt              │ String         │ xs:string             │   [0 …
1]   │
+         * │ desc             │ String         │ xs:string             │   [0 …
1]   │
+         * │ src              │ String         │ xs:string             │   [0 …
1]   │
+         * │ link             │ OnlineResource │ gpx:linkType          │   [0 …
∞]   │
+         * │ sym              │ String         │ xs:string             │   [0 …
1]   │
+         * │ type             │ String         │ xs:string             │   [0 …
1]   │
+         * │ fix              │ Fix            │ gpx:fixType           │   [0 …
1]   │
+         * │ sat              │ Integer        │ xs:nonNegativeInteger │   [0 …
1]   │
+         * │ hdop             │ Double         │ xs:decimal            │   [0 …
1]   │
+         * │ vdop             │ Double         │ xs:decimal            │   [0 …
1]   │
+         * │ pdop             │ Double         │ xs:decimal            │   [0 …
1]   │
+         * │ ageofdgpsdata    │ Double         │ xs:decimal            │   [0 …
1]   │
+         * │ dgpsid           │ Integer        │ gpx:dgpsStationType   │   [0 …
1]   │
+         * └──────────────────┴────────────────┴───────────────────────┴─────────────┘
          */
         builder.clear().setSuperTypes(parent).setNameSpace(Tags.PREFIX).setName("WayPoint");
         builder.addAttribute(GeometryType.POINT).setName(geomName)
@@ -207,21 +207,21 @@ final class Types {
         wayPoint = create(builder, resources);
         /*
          * Route ⇾ GPXEntity
-         * ┌────────────────┬────────────────┬────────────────────────┬─────────────┐
-         * │ Name           │ Type           │ XML type               │ Cardinality
│
-         * ├────────────────┼────────────────┼────────────────────────┼─────────────┤
-         * │ sis:identifier │ Integer        │                        │   [1 …
1]   │
-         * │ sis:envelope   │ Envelope       │                        │   [1 …
1]   │
-         * │ sis:geometry   │ Polyline       │                        │   [1 …
1]   │
-         * │ name           │ String         │ xsd:string             │   [0 …
1]   │
-         * │ cmt            │ String         │ xsd:string             │   [0 …
1]   │
-         * │ desc           │ String         │ xsd:string             │   [0 …
1]   │
-         * │ src            │ String         │ xsd:string             │   [0 …
1]   │
-         * │ link           │ OnlineResource │ gpx:linkType           │   [0 …
∞]   │
-         * │ number         │ Integer        │ xsd:nonNegativeInteger │   [0 …
1]   │
-         * │ type           │ String         │ xsd:string             │   [0 …
1]   │
-         * │ rtept          │ WayPoint       │ gpx:wptType            │   [0 …
∞]   │
-         * └────────────────┴────────────────┴────────────────────────┴─────────────┘
+         * ┌────────────────┬────────────────┬───────────────────────┬─────────────┐
+         * │ Name           │ Type           │ XML type              │ Cardinality
│
+         * ├────────────────┼────────────────┼───────────────────────┼─────────────┤
+         * │ sis:identifier │ Integer        │                       │   [1 … 1]
  │
+         * │ sis:envelope   │ Envelope       │                       │   [1 … 1]
  │
+         * │ sis:geometry   │ Polyline       │                       │   [1 … 1]
  │
+         * │ name           │ String         │ xs:string             │   [0 … 1]
  │
+         * │ cmt            │ String         │ xs:string             │   [0 … 1]
  │
+         * │ desc           │ String         │ xs:string             │   [0 … 1]
  │
+         * │ src            │ String         │ xs:string             │   [0 … 1]
  │
+         * │ link           │ OnlineResource │ gpx:linkType          │   [0 … ∞]
  │
+         * │ number         │ Integer        │ xs:nonNegativeInteger │   [0 … 1]
  │
+         * │ type           │ String         │ xs:string             │   [0 … 1]
  │
+         * │ rtept          │ WayPoint       │ gpx:wptType           │   [0 … ∞]
  │
+         * └────────────────┴────────────────┴───────────────────────┴─────────────┘
          */
         final AttributeType<?> groupResult = GroupAsPolylineOperation.getResult(geometries);
         GroupAsPolylineOperation groupOp = new GroupAsPolylineOperation(geomInfo, Tags.ROUTE_POINTS,
groupResult);
@@ -258,21 +258,21 @@ final class Types {
         trackSegment = create(builder, resources);
         /*
          * Track ⇾ GPXEntity
-         * ┌────────────────┬────────────────┬────────────────────────┬─────────────┐
-         * │ Name           │ Type           │ XML type               │ Cardinality
│
-         * ├────────────────┼────────────────┼────────────────────────┼─────────────┤
-         * │ sis:identifier │ Integer        │                        │   [1 …
1]   │
-         * │ sis:envelope   │ Envelope       │                        │   [1 …
1]   │
-         * │ sis:geometry   │ Polyline       │                        │   [1 …
1]   │
-         * │ name           │ String         │ xsd:string             │   [0 …
1]   │
-         * │ cmt            │ String         │ xsd:string             │   [0 …
1]   │
-         * │ desc           │ String         │ xsd:string             │   [0 …
1]   │
-         * │ src            │ String         │ xsd:string             │   [0 …
1]   │
-         * │ link           │ OnlineResource │ gpx:linkType           │   [0 …
∞]   │
-         * │ number         │ Integer        │ xsd:nonNegativeInteger │   [0 …
1]   │
-         * │ type           │ String         │ xsd:string             │   [0 …
1]   │
-         * │ trkseg         │ TrackSegment   │ gpx:trksegType         │   [0 …
∞]   │
-         * └────────────────┴────────────────┴────────────────────────┴─────────────┘
+         * ┌────────────────┬────────────────┬───────────────────────┬─────────────┐
+         * │ Name           │ Type           │ XML type              │ Cardinality
│
+         * ├────────────────┼────────────────┼───────────────────────┼─────────────┤
+         * │ sis:identifier │ Integer        │                       │   [1 … 1]
  │
+         * │ sis:envelope   │ Envelope       │                       │   [1 … 1]
  │
+         * │ sis:geometry   │ Polyline       │                       │   [1 … 1]
  │
+         * │ name           │ String         │ xs:string             │   [0 … 1]
  │
+         * │ cmt            │ String         │ xs:string             │   [0 … 1]
  │
+         * │ desc           │ String         │ xs:string             │   [0 … 1]
  │
+         * │ src            │ String         │ xs:string             │   [0 … 1]
  │
+         * │ link           │ OnlineResource │ gpx:linkType          │   [0 … ∞]
  │
+         * │ number         │ Integer        │ xs:nonNegativeInteger │   [0 … 1]
  │
+         * │ type           │ String         │ xs:string             │   [0 … 1]
  │
+         * │ trkseg         │ TrackSegment   │ gpx:trksegType        │   [0 … ∞]
  │
+         * └────────────────┴────────────────┴───────────────────────┴─────────────┘
          */
         groupOp = new GroupAsPolylineOperation(geomInfo, Tags.TRACK_SEGMENTS, groupResult);
         builder.clear().setSuperTypes(parent).setNameSpace(Tags.PREFIX).setName("Track");



Mime
View raw message