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 2017/08/09 16:45:11 UTC
svn commit: r1804583 - in /sis/branches/ISO-19115-3: ./
core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/
core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/
core/sis-utility/src/main/java/org/apache/sis/internal/util/ core/...
Author: desruisseaux
Date: Wed Aug 9 16:45:10 2017
New Revision: 1804583
URL: http://svn.apache.org/viewvc?rev=1804583&view=rev
Log:
Merge from JDK8 branch.
Modified:
sis/branches/ISO-19115-3/ (props changed)
sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java
sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java
sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java
sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/Anchor.java
sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java
sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java
sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java
sis/branches/ISO-19115-3/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/Proj4FactoryTest.java
sis/branches/ISO-19115-3/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
Propchange: sis/branches/ISO-19115-3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 9 16:45:10 2017
@@ -1,4 +1,5 @@
/sis/branches/Android:1430670-1480699
/sis/branches/JDK6:1394913-1508480
+/sis/branches/JDK8:1804459-1804582
/sis/branches/JDK9:1773327-1803064
/sis/trunk:1394364-1508466,1519089-1519674
Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/DateAdapter.java [UTF-8] Wed Aug 9 16:45:10 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/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/Measure.java [UTF-8] Wed Aug 9 16:45:10 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/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/UniversalTimeAdapter.java [UTF-8] Wed Aug 9 16:45:10 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/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/Anchor.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/Anchor.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/Anchor.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gmx/Anchor.java [UTF-8] Wed Aug 9 16:45:10 2017
@@ -21,6 +21,7 @@ import java.util.Locale;
import java.util.Objects;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.XmlRootElement;
import org.opengis.util.InternationalString;
import org.apache.sis.xml.XLink;
@@ -36,11 +37,13 @@ import org.apache.sis.xml.XLink;
*
* @author Guilhem Legal (Geomatys)
* @author Martin Desruisseaux (Geomatys)
- * @version 0.3
+ * @author Cullen Rombach (Image Matters)
+ * @version 0.8
* @since 0.3
* @module
*/
@XmlType(name = "Anchor_Type")
+@XmlRootElement(name = "Anchor")
public final class Anchor extends XLink implements InternationalString {
/**
* Defined as a matter of principle (this class is not expected to be serialized).
Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/util/Utilities.java [UTF-8] Wed Aug 9 16:45:10 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/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java [UTF-8] Wed Aug 9 16:45:10 2017
@@ -46,7 +46,8 @@ import static org.apache.sis.util.collec
* }
*
* @author Martin Desruisseaux (IRD, Geomatys)
- * @version 0.4
+ * @author Cullen Rombach (Image Matters)
+ * @version 0.8
* @since 0.3
* @module
*/
@@ -275,11 +276,11 @@ filter: for (final Locale locale : local
return unique(new Locale.Builder().setLanguageTag(code).build());
}
/*
- * Old syntax (e.g. "en_US"). Split in (language, country, variant) components,
+ * Old syntax (e.g. "en_US" or "eng; USA"). Split in (language, country, variant) components,
* then convert the 3-letters codes to the 2-letters ones.
*/
String language, country = "", variant = "";
- if (p1 < 0) {
+ if (p1 < 0 && (p1 = code.indexOf(';', fromIndex)) < 0) {
p1 = code.length();
} else {
final int s = p1 + 1;
Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java [UTF-8] Wed Aug 9 16:45:10 2017
@@ -53,7 +53,8 @@ import org.apache.sis.internal.util.Abst
* </ul>
*
* @author Martin Desruisseaux (Geomatys)
- * @version 0.5
+ * @author Cullen Rombach (Image Matters)
+ * @version 0.8
*
* @see DefaultRecordType
* @see DefaultRecordSchema
@@ -96,6 +97,59 @@ public class DefaultRecord implements Re
}
/**
+ * Creates a new record initialized to a shallow copy of the given record.
+ * The members contained in the given record are <strong>not</strong> recursively copied.
+ *
+ * @param record the record to copy (can not be null).
+ *
+ * @since 0.8
+ */
+ public DefaultRecord(final Record record) {
+ this(record.getRecordType());
+ for (final Map.Entry<MemberName,Integer> entry : definition.memberIndices().entrySet()) {
+ final MemberName name = entry.getKey();
+ final Object value = record.locate(name);
+ if (value != null) {
+ final int index = entry.getValue();
+ final Class<?> valueClass = definition.getValueClass(index);
+ if (valueClass != null && !valueClass.isInstance(value)) {
+ throw new ClassCastException(Errors.format(Errors.Keys.IllegalPropertyValueClass_3,
+ name, valueClass, value.getClass()));
+ }
+ Array.set(values, index, value);
+ }
+ }
+ }
+
+ /**
+ * Returns a SIS implementation with the name and members of the given arbitrary implementation.
+ * This method performs the first applicable action in the following choices:
+ *
+ * <ul>
+ * <li>If the given object is {@code null}, then this method returns {@code null}.</li>
+ * <li>Otherwise if the given object is already an instance of {@code DefaultRecord},
+ * then it is returned unchanged.</li>
+ * <li>Otherwise a new {@code DefaultRecord} instance is created using the
+ * {@linkplain #DefaultRecord(Record) copy constructor} and returned.
+ * Note that this is a shallow copy operation, since the members contained
+ * in the given object are not recursively copied.</li>
+ * </ul>
+ *
+ * @param other The object to get as a SIS implementation, or {@code null} if none.
+ * @return A SIS implementation containing the members of the given object
+ * (may be the given object itself), or {@code null} if the argument was {@code null}.
+ *
+ * @since 0.8
+ */
+ public static DefaultRecord castOrCopy(final Record other) {
+ if (other == null || other instanceof DefaultRecord) {
+ return (DefaultRecord) other;
+ } else {
+ return new DefaultRecord(other);
+ }
+ }
+
+ /**
* Returns the type definition of this record.
*
* @return the type definition of this record.
Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java [UTF-8] Wed Aug 9 16:45:10 2017
@@ -446,6 +446,7 @@ public class DefaultRecordType extends R
/**
* Empty constructor only used by JAXB.
*/
+ @SuppressWarnings("unused")
private DefaultRecordType() {
typeName = null;
container = null;
Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/xml/Namespaces.java [UTF-8] Wed Aug 9 16:45:10 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/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/util/LocalesTest.java [UTF-8] Wed Aug 9 16:45:10 2017
@@ -30,7 +30,7 @@ import static org.junit.Assert.*;
* Tests the {@link Locales} class.
*
* @author Martin Desruisseaux (Geomatys)
- * @version 0.4
+ * @version 0.8
* @since 0.3
* @module
*/
@@ -82,6 +82,7 @@ public final strictfp class LocalesTest
assertSame(Locale.CANADA_FRENCH, Locales.parse("fr_CAN"));
assertSame(Locale.CANADA_FRENCH, Locales.parse("fra_CAN"));
assertSame(Locale.JAPAN, Locales.parse("ja_JP"));
+ assertSame(Locale.US, Locales.parse("en; USA"));
assertEquals(new Locale("de", "DE"), Locales.parse("de_DE"));
assertEquals(new Locale("", "GB"), Locales.parse("_GB"));
Modified: sis/branches/ISO-19115-3/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/Proj4FactoryTest.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/Proj4FactoryTest.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/Proj4FactoryTest.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-gdal/src/test/java/org/apache/sis/storage/gdal/Proj4FactoryTest.java [UTF-8] Wed Aug 9 16:45:10 2017
@@ -64,8 +64,10 @@ public final strictfp class Proj4Factory
@Test
public void testGetAuthorityCodes() throws FactoryException {
final Proj4Factory factory = Proj4Factory.INSTANCE;
- assertTrue(factory.getAuthorityCodes(GeographicCRS.class).containsAll(Arrays.asList("+init=", "+proj=latlon")));
- assertTrue(factory.getAuthorityCodes(CoordinateReferenceSystem.class).containsAll(Arrays.asList("+init=", "+proj=")));
+ assertTrue(factory.getAuthorityCodes(GeographicCRS.class).containsAll(Arrays.asList("+proj=latlon")));
+ assertTrue(factory.getAuthorityCodes(ProjectedCRS.class).containsAll(Arrays.asList("+proj=merc", "+proj=lcc")));
+ assertTrue(factory.getAuthorityCodes(CoordinateReferenceSystem.class).containsAll(
+ Arrays.asList("+proj=latlon", "+proj=merc", "+proj=lcc")));
}
/**
Modified: sis/branches/ISO-19115-3/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java [UTF-8] Wed Aug 9 16:45:10 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/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java?rev=1804583&r1=1804582&r2=1804583&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java [UTF-8] (original)
+++ sis/branches/ISO-19115-3/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Types.java [UTF-8] Wed Aug 9 16:45:10 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");