sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1625371 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/ sis...
Date Tue, 16 Sep 2014 20:15:51 GMT
Author: desruisseaux
Date: Tue Sep 16 20:15:51 2014
New Revision: 1625371

URL: http://svn.apache.org/r1625371
Log:
Minor adjustments as a side-effect of the ongoing "merge to trunk" work.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultCitation.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -139,7 +139,7 @@ public class DefaultCitation extends ISO
 
     /**
      * Roles, Name, contact, and position information for an individual or organization that
is responsible
-     * for the resource. Returns an empty collection if there is none.
+     * for the resource.
      */
     private Collection<Responsibility> citedResponsibleParties;
 

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibility.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -101,6 +101,7 @@ public class DefaultResponsibility exten
      * @see #castOrCopy(Responsibility)
      */
     public DefaultResponsibility(final Responsibility object) {
+        super(object);
         if (object != null) {
             this.role    = object.getRole();
             this.extents = copyCollection(object.getExtents(), Extent.class);

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -16,8 +16,8 @@
  */
 package org.apache.sis.metadata.iso.citation;
 
-import java.util.Collection;
 import java.util.Iterator;
+import java.util.Collection;
 import java.util.Collections;
 import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.XmlElement;

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/LegacyTelephones.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -53,10 +53,7 @@ final class LegacyTelephones extends Leg
      */
     @Override
     protected Telephone wrap(final String value) {
-        final DefaultTelephone telephone = new DefaultTelephone();
-        telephone.setNumber(value);
-        telephone.setNumberType(type);
-        return telephone;
+        return new DefaultTelephone(value, type);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultBand.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -247,7 +247,7 @@ public class DefaultBand extends Default
     }
 
     /**
-     * Set a new units in which sensor wavelengths are expressed.
+     * Sets a new units in which sensor wavelengths are expressed.
      *
      * @param newValue the new unit.
      *

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultSampleDimension.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -113,7 +113,7 @@ public class DefaultSampleDimension exte
     private RecordType otherPropertyType;
 
     /**
-     * Instance of other/attributeType that defines attributs not explicitly
+     * Instance of other/attributeType that defines attributes not explicitly
      * included in {@link CoverageContentType}.
      */
     private Record otherProperty;
@@ -220,7 +220,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set the maximum value of data values in each dimension included in the resource.
+     * Sets the maximum value of data values in each dimension included in the resource.
      *
      * @param newValue The new new maximum value.
      */
@@ -230,9 +230,9 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Returns the units of data in each dimension included in the resource.
+     * Returns the units of data in the dimension.
      *
-     * @return The units of data in each dimension included in the resource, or {@code null}
if unspecified.
+     * @return The units of data in the dimension, or {@code null} if unspecified.
      */
     @Override
     @XmlElement(name = "units")
@@ -241,9 +241,9 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Sets the units of data in each dimension included in the resource.
+     * Sets the units of data in the dimension.
      *
-     * @param newValue The new units of data in each dimension included in the resource.
+     * @param newValue The new units of data in the dimension.
      */
     public void setUnits(final Unit<?> newValue) {
         checkWritePermission();
@@ -262,7 +262,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set the scale factor which has been applied to the cell value.
+     * Sets the scale factor which has been applied to the cell value.
      *
      * @param newValue The new scale factor which has been applied to the cell value.
      */
@@ -325,7 +325,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set the number of values used in a thematic classification resource.
+     * Sets the number of values used in a thematic classification resource.
      *
      * @param newValues The new number of values used in a thematic classification resource.
      */
@@ -367,7 +367,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set a new type of other attribute description.
+     * Sets a new type of other attribute description.
      *
      * @param newValue The new type of other attribute description.
      */
@@ -389,7 +389,7 @@ public class DefaultSampleDimension exte
     }
 
     /**
-     * Set a new instance of other/attributeType that defines attributs not explicitly
+     * Sets a new instance of other/attributeType that defines attributes not explicitly
      * included in {@link CoverageContentType}.
      *
      * @param newValue The new instance of other/attributeType.

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/distribution/DefaultMedium.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -30,6 +30,7 @@ import org.opengis.metadata.distribution
 import org.opengis.metadata.distribution.MediumFormat;
 import org.apache.sis.measure.ValueRange;
 import org.apache.sis.metadata.iso.ISOMetadata;
+import org.apache.sis.internal.jaxb.NonMarshalledAuthority;
 import org.apache.sis.internal.metadata.LegacyPropertyAdapter;
 
 
@@ -99,11 +100,6 @@ public class DefaultMedium extends ISOMe
     private InternationalString mediumNote;
 
     /**
-     * Unique identifier for an instance of the medium.
-     */
-    private Identifier identifier;
-
-    /**
      * Constructs an initially empty medium.
      */
     public DefaultMedium() {
@@ -127,7 +123,7 @@ public class DefaultMedium extends ISOMe
             volumes       = object.getVolumes();
             mediumFormats = copyCollection(object.getMediumFormats(), MediumFormat.class);
             mediumNote    = object.getMediumNote();
-            identifier    = object.getIdentifier();
+            identifiers   = singleton(object.getIdentifier(), Identifier.class);
         }
     }
 
@@ -341,7 +337,7 @@ public class DefaultMedium extends ISOMe
     @Override
 /// @XmlElement(name = "identifier")
     public Identifier getIdentifier() {
-        return identifier;
+        return NonMarshalledAuthority.getMarshallable(identifiers);
     }
 
     /**
@@ -353,6 +349,7 @@ public class DefaultMedium extends ISOMe
      */
     public void setIdentifier(final Identifier newValue) {
         checkWritePermission();
-        identifier = newValue;
+        identifiers = nonNullCollection(identifiers, Identifier.class);
+        NonMarshalledAuthority.setMarshallable(identifiers, newValue);
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -47,46 +47,46 @@ import java.util.Objects;
  *   <caption>Main parameter properties</caption>
  *   <tr>
  *     <th>Getter method</th>
- *     <th>ISO 19111</th>
- *     <th>WPS</th>
- *     <th>ISO 19115</th>
+ *     <th class="sep">ISO 19111</th>
+ *     <th class="sep">WPS</th>
+ *     <th class="sep">ISO 19115</th>
  *     <th class="sep">Remarks</th>
  *   </tr>
  *   <tr>
- *      <td>{@link #getName() getName()}</td>
- *      <td>{@code name}</td>
- *      <td>{@code Identifier}</td>
- *      <td>{@code name}</td>
- *      <td class="sep">See {@link Parameters#getMemberName(ParameterDescriptor)} for
{@code MemberName} ↔ {@code Identifier} mapping.</td>
+ *     <td>{@link #getName() getName()}</td>
+ *     <td class="sep">{@code name}</td>
+ *     <td class="sep">{@code Identifier}</td>
+ *     <td class="sep">{@code name}</td>
+ *     <td class="sep">See {@link Parameters#getMemberName(ParameterDescriptor)} for
{@code MemberName} ↔ {@code Identifier} mapping.</td>
  *   </tr>
  *   <!-- "Title" (WPS) equivalent to "designation" (Feature), but not yet provided. -->
  *   <tr>
- *      <td>{@link #getDescription()}</td>
- *      <td></td>
- *      <td>{@code Abstract}</td>
- *      <td>{@code description}</td>
- *      <td class="sep">Also known as “definition”.</td>
+ *     <td>{@link #getDescription()}</td>
+ *     <td class="sep"></td>
+ *     <td class="sep">{@code Abstract}</td>
+ *     <td class="sep">{@code description}</td>
+ *     <td class="sep">Also known as “definition”.</td>
  *   </tr>
  *   <tr>
- *      <td>{@link #getDirection()}</td>
- *      <td></td>
- *      <td></td>
- *      <td>{@code direction}</td>
- *      <td class="sep">Tells if the parameter is a WPS {@code Input} or {@code Output}
structure.</td>
+ *     <td>{@link #getDirection()}</td>
+ *     <td class="sep"></td>
+ *     <td class="sep"></td>
+ *     <td class="sep">{@code direction}</td>
+ *     <td class="sep">Tells if the parameter is a WPS {@code Input} or {@code Output}
structure.</td>
  *   </tr>
  *   <tr>
- *      <td>{@link #getMinimumOccurs()}</td>
- *      <td>{@code minimumOccurs}</td>
- *      <td>{@code MinOccurs}</td>
- *      <td>{@code optionality}</td>
- *      <td class="sep">{@code optionality   = (minimumOccurs > 0)}</td>
+ *     <td>{@link #getMinimumOccurs()}</td>
+ *     <td class="sep">{@code minimumOccurs}</td>
+ *     <td class="sep">{@code MinOccurs}</td>
+ *     <td class="sep">{@code optionality}</td>
+ *     <td class="sep">{@code optionality   = (minimumOccurs > 0)}</td>
  *   </tr>
  *   <tr>
- *      <td>{@link #getMaximumOccurs()}</td>
- *      <td>{@code maximumOccurs}</td>
- *      <td>{@code MaxOccurs}</td>
- *      <td>{@code repeatability}</td>
- *      <td class="sep">{@code repeatability = (maximumOccurs > 1)}</td>
+ *     <td>{@link #getMaximumOccurs()}</td>
+ *     <td class="sep">{@code maximumOccurs}</td>
+ *     <td class="sep">{@code MaxOccurs}</td>
+ *     <td class="sep">{@code repeatability}</td>
+ *     <td class="sep">{@code repeatability = (maximumOccurs > 1)}</td>
  *   </tr>
  * </table>
  *

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -101,6 +101,22 @@ public class ParameterBuilder extends Bu
     }
 
     /**
+     * Sets the parameter description as a {@code String} or {@code InternationalString}
instance.
+     * Calls to this method overwrite any previous value.
+     *
+     * <p><b>Lifetime:</b>
+     * previous descriptions are discarded by calls to {@code setDescription(…)}.
+     * Descriptions are cleared after a {@code createXXX(…)} method has been invoked.</p>
+     *
+     * @param  description The description, or {@code null} if none.
+     * @return {@code this}, for method call chaining.
+     */
+    public ParameterBuilder setDescription(final CharSequence description) {
+        properties.put(AbstractParameterDescriptor.DESCRIPTION_KEY, description);
+        return this;
+    }
+
+    /**
      * Sets whether the parameter is mandatory or optional.
      * This property determines the {@linkplain DefaultParameterDescriptor#getMinimumOccurs()
minimum number
      * of times} that values are required, which will be 0 for an optional parameter and
1 for a mandatory one.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
[UTF-8] Tue Sep 16 20:15:51 2014
@@ -144,7 +144,7 @@ public final class Parameters extends St
      * This method performs the following checks:
      *
      * <ul>
-     *   <li>If the {@linkplain DefaultParameterDescriptor#getName()} primary name
is an instance of {@code MemberName},
+     *   <li>If the {@linkplain DefaultParameterDescriptor#getName() primary name}
is an instance of {@code MemberName},
      *       returns that primary name.</li>
      *   <li>Otherwise this method searches for the first {@linkplain DefaultParameterDescriptor#getAlias()
alias}
      *       which is an instance of {@code MemberName}. If found, that alias is returned.</li>

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java?rev=1625371&r1=1625370&r2=1625371&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8]
(original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java [UTF-8]
Tue Sep 16 20:15:51 2014
@@ -247,7 +247,7 @@ public final class Types extends Static 
      * @return The description, or {@code null} if none or if the given code is null.
      *
      * @see #getCodeTitle(Enumerated)
-     * @see #getDescription(Enumerated)
+     * @see #getDescription(Class)
      */
     public static InternationalString getDescription(final Enumerated code) {
         if (code != null) {



Mime
View raw message