Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultExtendedElementInformation.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -57,6 +57,7 @@ import static org.opengis.annotation.Spe * @version 0.5 * @module */ +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. @XmlType(name = "MD_ExtendedElementInformation_Type", propOrder = { "name", "shortName", @@ -73,9 +74,7 @@ import static org.opengis.annotation.Spe "sources" }) @XmlRootElement(name = "MD_ExtendedElementInformation") -public class DefaultExtendedElementInformation extends ISOMetadata - implements ExtendedElementInformation -{ +public class DefaultExtendedElementInformation extends ISOMetadata implements ExtendedElementInformation { /** * Serial number for inter-operability with different versions. */ @@ -170,13 +169,13 @@ public class DefaultExtendedElementInfor /** * Create an extended element information initialized to the given values. * - * @param name The name of the extended metadata element. - * @param definition The definition of the extended element. - * @param condition The condition under which the extended element is mandatory. - * @param dataType The code which identifies the kind of value provided in the extended element. - * @param parentEntity The name of the metadata entity(s) under which this extended metadata element may appear. - * @param rule How the extended element relates to other existing elements and entities. - * @param source The name of the person or organization creating the extended element. + * @param name the name of the extended metadata element. + * @param definition the definition of the extended element. + * @param condition the condition under which the extended element is mandatory. + * @param dataType the code which identifies the kind of value provided in the extended element. + * @param parentEntity the name of the metadata entity(s) under which this extended metadata element may appear. + * @param rule how the extended element relates to other existing elements and entities. + * @param source the name of the person or organization creating the extended element. */ public DefaultExtendedElementInformation(final String name, final CharSequence definition, @@ -207,7 +206,7 @@ public class DefaultExtendedElementInfor * metadata instances can also be obtained by unmarshalling an invalid XML document. * </div> * - * @param object The metadata to copy values from, or {@code null} if none. + * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(ExtendedElementInformation) */ @@ -245,8 +244,8 @@ public class DefaultExtendedElementInfor * metadata contained in the given object are not recursively copied.</li> * </ul> * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultExtendedElementInformation castOrCopy(final ExtendedElementInformation object) { @@ -259,7 +258,7 @@ public class DefaultExtendedElementInfor /** * Name of the extended metadata element. * - * @return Name of the extended metadata element, or {@code null}. + * @return name of the extended metadata element, or {@code null}. */ @Override @XmlElement(name = "name", required = true) @@ -270,7 +269,7 @@ public class DefaultExtendedElementInfor /** * Sets the name of the extended metadata element. * - * @param newValue The new name. + * @param newValue the new name. */ public void setName(final String newValue) { checkWritePermission(); @@ -280,7 +279,7 @@ public class DefaultExtendedElementInfor /** * Short form suitable for use in an implementation method such as XML or SGML. * - * @return Short form suitable for use in an implementation method such as XML or SGML, or {@code null}. + * @return short form suitable for use in an implementation method such as XML or SGML, or {@code null}. * * @deprecated Removed as of ISO 19115:2014. */ @@ -294,7 +293,7 @@ public class DefaultExtendedElementInfor /** * Sets a short form suitable for use in an implementation method such as XML or SGML. * - * @param newValue The new short name. + * @param newValue the new short name. * * @deprecated Removed as of ISO 19115:2014. */ @@ -309,7 +308,7 @@ public class DefaultExtendedElementInfor * Returns a non-null value only if the {@linkplain #getDataType() data type} * is {@linkplain Datatype#CODE_LIST_ELEMENT code list element}. * - * @return Three digit code assigned to the extended element, or {@code null}. + * @return three digit code assigned to the extended element, or {@code null}. * * @deprecated Removed as of ISO 19115:2014. */ @@ -323,7 +322,7 @@ public class DefaultExtendedElementInfor /** * Sets a three digit code assigned to the extended element. * - * @param newValue The new domain code. + * @param newValue the new domain code. * * @deprecated Removed as of ISO 19115:2014. */ @@ -336,7 +335,7 @@ public class DefaultExtendedElementInfor /** * Definition of the extended element. * - * @return Definition of the extended element, or {@code null}. + * @return definition of the extended element, or {@code null}. */ @Override @XmlElement(name = "definition", required = true) @@ -347,7 +346,7 @@ public class DefaultExtendedElementInfor /** * Sets the definition of the extended element. * - * @param newValue The new definition. + * @param newValue the new definition. */ public void setDefinition(final InternationalString newValue) { checkWritePermission(); @@ -357,7 +356,7 @@ public class DefaultExtendedElementInfor /** * Obligation of the extended element. * - * @return Obligation of the extended element, or {@code null}. + * @return obligation of the extended element, or {@code null}. */ @Override @XmlElement(name = "obligation") @@ -368,7 +367,7 @@ public class DefaultExtendedElementInfor /** * Sets the obligation of the extended element. * - * @param newValue The new obligation. + * @param newValue the new obligation. */ public void setObligation(final Obligation newValue) { checkWritePermission(); @@ -380,7 +379,7 @@ public class DefaultExtendedElementInfor * Returns a non-null value only if the {@linkplain #getObligation() obligation} * is {@linkplain Obligation#CONDITIONAL conditional}. * - * @return The condition under which the extended element is mandatory, or {@code null}. + * @return the condition under which the extended element is mandatory, or {@code null}. */ @Override @XmlElement(name = "condition") @@ -391,7 +390,7 @@ public class DefaultExtendedElementInfor /** * Sets the condition under which the extended element is mandatory. * - * @param newValue The new condition. + * @param newValue the new condition. */ public void setCondition(final InternationalString newValue) { checkWritePermission(); @@ -401,7 +400,7 @@ public class DefaultExtendedElementInfor /** * Code which identifies the kind of value provided in the extended element. * - * @return The kind of value provided in the extended element, or {@code null}. + * @return the kind of value provided in the extended element, or {@code null}. */ @Override @XmlElement(name = "dataType", required = true) @@ -412,7 +411,7 @@ public class DefaultExtendedElementInfor /** * Sets the code which identifies the kind of value provided in the extended element. * - * @param newValue The new data type. + * @param newValue the new data type. */ public void setDataType(final Datatype newValue) { checkWritePermission(); @@ -426,7 +425,7 @@ public class DefaultExtendedElementInfor * {@linkplain Datatype#CODE_LIST code list} or {@linkplain Datatype#CODE_LIST_ELEMENT * code list element}. * - * @return Maximum occurrence of the extended element, or {@code null}. + * @return maximum occurrence of the extended element, or {@code null}. */ @Override @ValueRange(minimum = 0) @@ -438,7 +437,7 @@ public class DefaultExtendedElementInfor /** * Sets the maximum occurrence of the extended element. * - * @param newValue The new maximum occurrence, or {@code null}. + * @param newValue the new maximum occurrence, or {@code null}. * @throws IllegalArgumentException if the given value is negative. */ public void setMaximumOccurrence(final Integer newValue) { @@ -455,7 +454,7 @@ public class DefaultExtendedElementInfor * {@linkplain Datatype#CODE_LIST code list} or {@linkplain Datatype#CODE_LIST_ELEMENT * code list element}. * - * @return Valid values that can be assigned to the extended element, or {@code null}. + * @return valid values that can be assigned to the extended element, or {@code null}. */ @Override @XmlElement(name = "domainValue") @@ -466,7 +465,7 @@ public class DefaultExtendedElementInfor /** * Sets the valid values that can be assigned to the extended element. * - * @param newValue The new domain value. + * @param newValue the new domain value. */ public void setDomainValue(final InternationalString newValue) { checkWritePermission(); @@ -477,7 +476,7 @@ public class DefaultExtendedElementInfor * Name of the metadata entity(s) under which this extended metadata element may appear. * The name(s) may be standard metadata element(s) or other extended metadata element(s). * - * @return Name of the metadata entity(s) under which this extended metadata element may appear. + * @return name of the metadata entity(s) under which this extended metadata element may appear. */ @Override @XmlElement(name = "parentEntity", required = true) @@ -488,7 +487,7 @@ public class DefaultExtendedElementInfor /** * Sets the name of the metadata entity(s) under which this extended metadata element may appear. * - * @param newValues The new parent entity. + * @param newValues the new parent entity. */ public void setParentEntity(final Collection<? extends String> newValues) { parentEntity = writeCollection(newValues, parentEntity, String.class); @@ -497,7 +496,7 @@ public class DefaultExtendedElementInfor /** * Specifies how the extended element relates to other existing elements and entities. * - * @return How the extended element relates to other existing elements and entities, or {@code null}. + * @return how the extended element relates to other existing elements and entities, or {@code null}. */ @Override @XmlElement(name = "rule", required = true) @@ -508,7 +507,7 @@ public class DefaultExtendedElementInfor /** * Sets how the extended element relates to other existing elements and entities. * - * @param newValue The new rule. + * @param newValue the new rule. */ public void setRule(final InternationalString newValue) { checkWritePermission(); @@ -518,7 +517,7 @@ public class DefaultExtendedElementInfor /** * Returns the reason for creating the extended element. * - * @return Reason for creating the extended element, or {@code null}. + * @return reason for creating the extended element, or {@code null}. * * @since 0.5 */ @@ -531,7 +530,7 @@ public class DefaultExtendedElementInfor /** * Sets the reason for creating the extended element. * - * @param newValue The new rationale. + * @param newValue the new rationale. * * @since 0.5 */ @@ -542,7 +541,7 @@ public class DefaultExtendedElementInfor /** * @deprecated As of ISO 19115:2014, replaced by {@link #getRationale()}. * - * @return Reason for creating the extended element. + * @return reason for creating the extended element. */ @Override @Deprecated @@ -554,7 +553,7 @@ public class DefaultExtendedElementInfor /** * @deprecated As of ISO 19115:2014, replaced by {@link #setRationale(InternationalString)}. * - * @param newValues The new rationales. + * @param newValues the new rationales. */ @Deprecated public void setRationales(final Collection<? extends InternationalString> newValues) { @@ -569,7 +568,7 @@ public class DefaultExtendedElementInfor * This change may be applied in GeoAPI 4.0. * </div> * - * @return Name of the person or organization creating the extended element. + * @return name of the person or organization creating the extended element. */ @Override @XmlElement(name = "source", required = true) @@ -585,7 +584,7 @@ public class DefaultExtendedElementInfor * This change may be applied in GeoAPI 4.0. * </div> * - * @param newValues The new sources. + * @param newValues the new sources. */ public void setSources(final Collection<? extends ResponsibleParty> newValues) { sources = writeCollection(newValues, sources, ResponsibleParty.class);
Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultFeatureTypeList.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -41,6 +41,7 @@ import org.opengis.metadata.FeatureTypeL * @version 0.3 * @module */ +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. @XmlType(propOrder = { "spatialObject", "spatialSchemaName" @@ -71,7 +72,7 @@ public class DefaultFeatureTypeList exte /** * Creates a feature type list initialized to the given values. * - * @param spatialObject the instance of a type defined in the spatial schema, or {@code null} if none. + * @param spatialObject the instance of a type defined in the spatial schema, or {@code null} if none. * @param spatialSchemaName the name of the spatial schema used, or {@code null} if none. */ public DefaultFeatureTypeList(final String spatialObject, final String spatialSchemaName) { @@ -84,7 +85,7 @@ public class DefaultFeatureTypeList exte * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * - * @param object the metadata to copy values from, or {@code null} if none. + * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(FeatureTypeList) */ @@ -135,7 +136,7 @@ public class DefaultFeatureTypeList exte /** * Sets the instance of a type defined in the spatial schema. * - * @param newValue the new spatial object. + * @param newValue the new spatial object. */ public void setSpatialObject(final String newValue) { checkWritePermission(); @@ -156,7 +157,7 @@ public class DefaultFeatureTypeList exte /** * Sets the name of the spatial schema used. * - * @param newValue the new spatial schema. + * @param newValue the new spatial schema. */ public void setSpatialSchemaName(final String newValue) { checkWritePermission(); Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultIdentifier.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -88,6 +88,7 @@ import static org.opengis.annotation.Spe * @see ImmutableIdentifier * @see org.apache.sis.referencing.IdentifiedObjects#toURN(Class, Identifier) */ +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. @XmlType(name = "MD_Identifier_Type", propOrder = { "authority", "code" @@ -145,8 +146,7 @@ public class DefaultIdentifier extends I /** * Creates an identifier initialized to the given code. * - * @param code The alphanumeric value identifying an instance in the namespace, - * or {@code null} if none. + * @param code the alphanumeric value identifying an instance in the namespace, or {@code null} if none. */ public DefaultIdentifier(final String code) { this.code = code; @@ -169,8 +169,8 @@ public class DefaultIdentifier extends I * {@linkplain org.apache.sis.util.CharSequences#isUnicodeIdentifier(CharSequence) unicode identifier}.</li> * </ol> * - * @param authority The the person or party responsible for maintenance of the namespace, or {@code null} if none. - * @param code The alphanumeric value identifying an instance in the namespace, or {@code null} if none. + * @param authority the the person or party responsible for maintenance of the namespace, or {@code null} if none. + * @param code the alphanumeric value identifying an instance in the namespace, or {@code null} if none. * * @see org.apache.sis.metadata.iso.citation.Citations#getUnicodeIdentifier(Citation) */ @@ -185,7 +185,7 @@ public class DefaultIdentifier extends I * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * - * @param object The metadata to copy values from, or {@code null} if none. + * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(Identifier) */ @@ -221,8 +221,8 @@ public class DefaultIdentifier extends I * metadata contained in the given object are not recursively copied.</li> * </ul> * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultIdentifier castOrCopy(final Identifier object) { @@ -237,7 +237,7 @@ public class DefaultIdentifier extends I * The organization's abbreviation is often the same than this identifier * {@linkplain #getCodeSpace() code space}, but not necessarily. * - * @return Person or party responsible for maintenance of the namespace, or {@code null} if not available. + * @return person or party responsible for maintenance of the namespace, or {@code null} if not available. */ @Override @XmlElement(name = "authority") @@ -248,7 +248,7 @@ public class DefaultIdentifier extends I /** * Sets the person or party responsible for maintenance of the namespace. * - * @param newValue The new authority. + * @param newValue the new authority. */ public void setAuthority(final Citation newValue) { checkWritePermission(); @@ -264,7 +264,7 @@ public class DefaultIdentifier extends I * The code is mandatory according ISO specification, but this {@code DefaultIdentifier} * implementation does not enforce this restriction. * - * @return Value identifying an instance in the namespace. + * @return value identifying an instance in the namespace. */ @Override @XmlElement(name = "code", required = true) @@ -276,7 +276,7 @@ public class DefaultIdentifier extends I * Sets the alphanumeric value identifying an instance in the namespace. * Should avoid characters that are not legal in URLs. * - * @param newValue The new code, or {@code null}. + * @param newValue the new code, or {@code null}. */ public void setCode(final String newValue) { checkWritePermission(); @@ -289,7 +289,7 @@ public class DefaultIdentifier extends I * * <div class="note"><b>Example:</b> {@code "EPSG"}.</div> * - * @return The identifier or namespace in which the code is valid, or {@code null} if none. + * @return the identifier or namespace in which the code is valid, or {@code null} if none. * * @since 0.5 */ @@ -301,7 +301,7 @@ public class DefaultIdentifier extends I /** * Sets the identifier or namespace in which the code is valid. * - * @param newValue The new code space, or {@code null} if none. + * @param newValue the new code space, or {@code null} if none. * * @since 0.5 */ @@ -317,7 +317,7 @@ public class DefaultIdentifier extends I * * <div class="note"><b>Example:</b> the version of the underlying EPSG database.</div> * - * @return The version identifier for the namespace, or {@code null} if none. + * @return the version identifier for the namespace, or {@code null} if none. */ @UML(identifier="version", obligation=OPTIONAL, specification=ISO_19115) public String getVersion() { @@ -327,7 +327,7 @@ public class DefaultIdentifier extends I /** * Sets the version identifier for the namespace. * - * @param newValue The new version, or {@code null} if none. + * @param newValue the new version, or {@code null} if none. */ public void setVersion(final String newValue) { checkWritePermission(); @@ -339,7 +339,7 @@ public class DefaultIdentifier extends I * * <div class="note"><b>Example:</b> "World Geodetic System 1984".</div> * - * @return The natural language description, or {@code null} if none. + * @return the natural language description, or {@code null} if none. * * @since 0.5 */ @@ -351,7 +351,7 @@ public class DefaultIdentifier extends I /** * Sets the natural language description of the meaning of the code value. * - * @param newValue The new natural language description, or {@code null} if none. + * @param newValue the new natural language description, or {@code null} if none. * * @since 0.5 */ Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -102,6 +102,7 @@ import static org.opengis.annotation.Spe * @version 0.8 * @module */ +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. @XmlType(name = "MD_Metadata_Type", propOrder = { "fileIdentifier", "language", @@ -266,9 +267,9 @@ public class DefaultMetadata extends ISO /** * Creates a meta data initialized to the specified values. * - * @param contact Party responsible for the metadata information. - * @param dateStamp Date that the metadata was created. - * @param identificationInfo Basic information about the resource to which the metadata applies. + * @param contact party responsible for the metadata information. + * @param dateStamp date that the metadata was created. + * @param identificationInfo basic information about the resource to which the metadata applies. */ public DefaultMetadata(final ResponsibleParty contact, final Date dateStamp, @@ -286,7 +287,7 @@ public class DefaultMetadata extends ISO * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * - * @param object The metadata to copy values from, or {@code null} if none. + * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(Metadata) */ @@ -353,8 +354,8 @@ public class DefaultMetadata extends ISO * metadata contained in the given object are not recursively copied.</li> * </ul> * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultMetadata castOrCopy(final Metadata object) { @@ -380,7 +381,7 @@ public class DefaultMetadata extends ISO * of a UUID (Universal Unique Identifier) as specified by <a href="http://www.ietf.org">IETF</a> * to ensure identifier’s uniqueness.</div> * - * @return Unique identifier for this metadata record, or {@code null}. + * @return unique identifier for this metadata record, or {@code null}. * * @since 0.5 */ @@ -392,7 +393,7 @@ public class DefaultMetadata extends ISO /** * Sets the unique identifier for this metadata record. * - * @param newValue The new identifier, or {@code null} if none. + * @param newValue the new identifier, or {@code null} if none. * * @since 0.5 */ @@ -404,7 +405,7 @@ public class DefaultMetadata extends ISO /** * Returns the unique identifier for this metadata file. * - * @return Unique identifier for this metadata file, or {@code null}. + * @return unique identifier for this metadata file, or {@code null}. * * @deprecated As of ISO 19115:2014, replaced by {@link #getMetadataIdentifier()} * in order to include the codespace attribute. @@ -420,7 +421,7 @@ public class DefaultMetadata extends ISO /** * Sets the unique identifier for this metadata file. * - * @param newValue The new identifier, or {@code null} if none. + * @param newValue the new identifier, or {@code null} if none. * * @deprecated As of ISO 19115:2014, replaced by {@link #setMetadataIdentifier(Identifier)} */ @@ -448,7 +449,7 @@ public class DefaultMetadata extends ISO * for marshalling {@link org.opengis.util.InternationalString} and {@link org.opengis.util.CodeList} instances * in ISO 19115-2 compliant XML documents. * - * @return Language(s) used for documenting metadata. + * @return language(s) used for documenting metadata. * * @since 0.5 */ @@ -462,7 +463,7 @@ public class DefaultMetadata extends ISO * The first element in iteration order shall be the default language. * All other elements, if any, are alternate language(s) used within the resource. * - * @param newValues The new languages. + * @param newValues the new languages. * * @see org.apache.sis.xml.XML#LOCALE * @@ -477,7 +478,7 @@ public class DefaultMetadata extends ISO /** * Returns the default language used for documenting metadata. * - * @return Language used for documenting metadata, or {@code null}. + * @return language used for documenting metadata, or {@code null}. * * @deprecated As of GeoAPI 3.1, replaced by {@link #getLanguages()}. */ @@ -486,8 +487,10 @@ public class DefaultMetadata extends ISO @XmlElement(name = "language") public Locale getLanguage() { return CollectionsExt.first(getLanguages()); - // No warning if the collection contains more than one locale, because - // this is allowed by the "getLanguage() + getLocales()" contract. + /* + * No warning if the collection contains more than one locale, because + * this is allowed by the "getLanguage() + getLocales()" contract. + */ } /** @@ -499,7 +502,7 @@ public class DefaultMetadata extends ISO * <li>Otherwise the first element in the languages collection is replaced by the given {@code newValue}.</li> * </ul> * - * @param newValue The new language. + * @param newValue the new language. * * @deprecated As of GeoAPI 3.1, replaced by {@link #setLanguages(Collection)}. */ @@ -512,7 +515,7 @@ public class DefaultMetadata extends ISO /** * Provides information about an alternatively used localized character string for a linguistic extension. * - * @return Alternatively used localized character string for a linguistic extension. + * @return alternatively used localized character string for a linguistic extension. * * @deprecated As of GeoAPI 3.1, replaced by {@link #getLanguages()}. */ @@ -527,7 +530,7 @@ public class DefaultMetadata extends ISO /** * Sets information about an alternatively used localized character string for a linguistic extension. * - * @param newValues The new locales. + * @param newValues the new locales. * * @deprecated As of GeoAPI 3.1, replaced by {@link #setLanguages(Collection)}. */ @@ -551,7 +554,7 @@ public class DefaultMetadata extends ISO * {@code Big5}, {@code GB2312}. * </div> * - * @return Character coding standards used for the metadata. + * @return character coding standards used for the metadata. * * @see #getLanguages() * @see org.opengis.metadata.identification.DataIdentification#getCharacterSets() @@ -567,7 +570,7 @@ public class DefaultMetadata extends ISO /** * Sets the character coding standard used for the metadata set. * - * @param newValues The new character coding standards. + * @param newValues the new character coding standards. * * @since 0.5 */ @@ -578,7 +581,7 @@ public class DefaultMetadata extends ISO /** * Returns the character coding standard used for the metadata set. * - * @return Character coding standard used for the metadata, or {@code null}. + * @return character coding standard used for the metadata, or {@code null}. * * @deprecated As of GeoAPI 3.1, replaced by {@link #getCharacterSets()}. */ @@ -605,7 +608,7 @@ public class DefaultMetadata extends ISO /** * Sets the character coding standard used for the metadata set. * - * @param newValue The new character set. + * @param newValue the new character set. * * @deprecated As of GeoAPI 3.1, replaced by {@link #setCharacterSets(Collection)}. */ @@ -618,7 +621,7 @@ public class DefaultMetadata extends ISO * Returns an identification of the parent metadata record. * This is non-null if this metadata is a subset (child) of another metadata that is described elsewhere. * - * @return Identification of the parent metadata record, or {@code null} if none. + * @return identification of the parent metadata record, or {@code null} if none. * * @since 0.5 */ @@ -630,7 +633,7 @@ public class DefaultMetadata extends ISO /** * Sets an identification of the parent metadata record. * - * @param newValue The new identification of the parent metadata record. + * @param newValue the new identification of the parent metadata record. * * @since 0.5 */ @@ -642,7 +645,7 @@ public class DefaultMetadata extends ISO /** * Returns the file identifier of the metadata to which this metadata is a subset (child). * - * @return Identifier of the metadata to which this metadata is a subset, or {@code null}. + * @return identifier of the metadata to which this metadata is a subset, or {@code null}. * * @deprecated As of ISO 19115:2014, replaced by {@link #getParentMetadata()}. */ @@ -663,7 +666,7 @@ public class DefaultMetadata extends ISO /** * Sets the file identifier of the metadata to which this metadata is a subset (child). * - * @param newValue The new parent identifier. + * @param newValue the new parent identifier. * * @deprecated As of ISO 19115:2014, replaced by {@link #getParentMetadata()}. */ @@ -686,7 +689,7 @@ public class DefaultMetadata extends ISO * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * - * @return Scope or type of resource for which metadata is provided. + * @return scope or type of resource for which metadata is provided. * * @since 0.5 */ @@ -703,7 +706,7 @@ public class DefaultMetadata extends ISO * when GeoAPI will provide it (tentatively in GeoAPI 3.1). * </div> * - * @param newValues The new scope or type of resource. + * @param newValues the new scope or type of resource. * * @since 0.5 */ @@ -714,7 +717,7 @@ public class DefaultMetadata extends ISO /** * Returns the scope to which the metadata applies. * - * @return Scope to which the metadata applies. + * @return scope to which the metadata applies. * * @deprecated As of ISO 19115:2014, replaced by {@link #getMetadataScopes()} * followed by {@link DefaultMetadataScope#getResourceScope()}. @@ -745,7 +748,7 @@ public class DefaultMetadata extends ISO /** * Sets the scope to which the metadata applies. * - * @param newValues The new hierarchy levels. + * @param newValues the new hierarchy levels. * * @deprecated As of ISO 19115:2014, replaced by {@link #setMetadataScopes(Collection)} * and {@link DefaultMetadataScope#setResourceScope(ScopeCode)}. @@ -759,7 +762,7 @@ public class DefaultMetadata extends ISO /** * Returns the name of the hierarchy levels for which the metadata is provided. * - * @return Hierarchy levels for which the metadata is provided. + * @return hierarchy levels for which the metadata is provided. * * @deprecated As of ISO 19115:2014, replaced by {@link #getMetadataScopes()} * followed by {@link DefaultMetadataScope#getName()}. @@ -791,7 +794,7 @@ public class DefaultMetadata extends ISO /** * Sets the name of the hierarchy levels for which the metadata is provided. * - * @param newValues The new hierarchy level names. + * @param newValues the new hierarchy level names. * * @deprecated As of ISO 19115:2014, replaced by {@link #setMetadataScopes(Collection)} * and {@link DefaultMetadataScope#setName(InternationalString)}. @@ -810,7 +813,7 @@ public class DefaultMetadata extends ISO * This change will be tentatively applied in GeoAPI 4.0. * </div> * - * @return Parties responsible for the metadata information. + * @return parties responsible for the metadata information. */ @Override @XmlElement(name = "contact", required = true) @@ -821,7 +824,7 @@ public class DefaultMetadata extends ISO /** * Sets the parties responsible for the metadata information. * - * @param newValues The new contacts. + * @param newValues the new contacts. */ public void setContacts(final Collection<? extends ResponsibleParty> newValues) { checkWritePermission(); @@ -831,7 +834,7 @@ public class DefaultMetadata extends ISO /** * Returns the date(s) associated with the metadata. * - * @return Date(s) associated with the metadata. + * @return date(s) associated with the metadata. * * @see Citation#getDates() * @@ -846,7 +849,7 @@ public class DefaultMetadata extends ISO * Sets the date(s) associated with the metadata. * The collection should contains at least an element for {@link DateType#CREATION}. * - * @param newValues New dates associated with the metadata. + * @param newValues new dates associated with the metadata. * * @since 0.5 */ @@ -857,7 +860,7 @@ public class DefaultMetadata extends ISO /** * Returns the date that the metadata was created. * - * @return Date that the metadata was created, or {@code null}. + * @return date that the metadata was created, or {@code null}. * * @deprecated As of ISO 19115:2014, replaced by {@link #getDateInfo()}. */ @@ -879,14 +882,14 @@ public class DefaultMetadata extends ISO /** * Sets the date that the metadata was created. * - * @param newValue The new date stamp. + * @param newValue the new date stamp. * * @deprecated As of ISO 19115:2014, replaced by {@link #setDateInfo(Collection)}. */ @Deprecated public void setDateStamp(final Date newValue) { checkWritePermission(); - Collection<CitationDate> newValues = dateInfo; // See "Note about deprecated methods implementation" + Collection<CitationDate> newValues = dateInfo; // See "Note about deprecated methods implementation" if (newValues == null) { if (newValue == null) { return; @@ -919,7 +922,7 @@ public class DefaultMetadata extends ISO * The collection returned by this method typically contains elements from the * {@link org.apache.sis.metadata.iso.citation.Citations#ISO_19115} list. * - * @return The standard(s) to which the metadata conform. + * @return the standard(s) to which the metadata conform. * * @see #getMetadataProfiles() * @@ -934,7 +937,7 @@ public class DefaultMetadata extends ISO * Sets the citation(s) for the standard(s) to which the metadata conform. * Metadata standard citations should include an identifier. * - * @param newValues The new standard(s) to which the metadata conform. + * @param newValues the new standard(s) to which the metadata conform. * * @since 0.5 */ @@ -945,7 +948,7 @@ public class DefaultMetadata extends ISO /** * Returns the citation(s) for the profile(s) of the metadata standard to which the metadata conform. * - * @return The profile(s) to which the metadata conform. + * @return the profile(s) to which the metadata conform. * * @see #getMetadataStandards() * @see #getMetadataExtensionInfo() @@ -961,7 +964,7 @@ public class DefaultMetadata extends ISO * Set the citation(s) for the profile(s) of the metadata standard to which the metadata conform. * Metadata profile standard citations should include an identifier. * - * @param newValues The new profile(s) to which the metadata conform. + * @param newValues the new profile(s) to which the metadata conform. * * @since 0.5 */ @@ -972,7 +975,7 @@ public class DefaultMetadata extends ISO /** * Returns reference(s) to alternative metadata or metadata in a non-ISO standard for the same resource. * - * @return Reference(s) to alternative metadata (e.g. Dublin core, FGDC). + * @return reference(s) to alternative metadata (e.g. Dublin core, FGDC). * * @since 0.5 */ @@ -984,7 +987,7 @@ public class DefaultMetadata extends ISO /** * Set reference(s) to alternative metadata or metadata in a non-ISO standard for the same resource. * - * @param newValues The new reference(s) to alternative metadata (e.g. Dublin core, FGDC). + * @param newValues the new reference(s) to alternative metadata (e.g. Dublin core, FGDC). * * @since 0.5 */ @@ -1037,7 +1040,7 @@ public class DefaultMetadata extends ISO /** * Returns the name of the metadata standard (including profile name) used. * - * @return Name of the metadata standard used, or {@code null}. + * @return name of the metadata standard used, or {@code null}. * * @deprecated As of ISO 19115:2014, replaced by {@link #getMetadataStandards()} * followed by {@link DefaultCitation#getTitle()}. @@ -1052,7 +1055,7 @@ public class DefaultMetadata extends ISO /** * Name of the metadata standard (including profile name) used. * - * @param newValue The new metadata standard name. + * @param newValue the new metadata standard name. * * @deprecated As of ISO 19115:2014, replaced by {@link #getMetadataStandards()} * followed by {@link DefaultCitation#setTitle(InternationalString)}. @@ -1065,7 +1068,7 @@ public class DefaultMetadata extends ISO /** * Returns the version (profile) of the metadata standard used. * - * @return Version of the metadata standard used, or {@code null}. + * @return version of the metadata standard used, or {@code null}. * * @deprecated As of ISO 19115:2014, replaced by {@link #getMetadataStandards()} * followed by {@link DefaultCitation#getEdition()}. @@ -1080,7 +1083,7 @@ public class DefaultMetadata extends ISO /** * Sets the version (profile) of the metadata standard used. * - * @param newValue The new metadata standard version. + * @param newValue the new metadata standard version. * * @deprecated As of ISO 19115:2014, replaced by {@link #getMetadataStandards()} * followed by {@link DefaultCitation#setEdition(InternationalString)}. @@ -1093,7 +1096,7 @@ public class DefaultMetadata extends ISO /** * Returns the online location(s) where the metadata is available. * - * @return Online location(s) where the metadata is available. + * @return online location(s) where the metadata is available. * * @since 0.5 */ @@ -1105,7 +1108,7 @@ public class DefaultMetadata extends ISO /** * Sets the online location(s) where the metadata is available. * - * @param newValues The new online location(s). + * @param newValues the new online location(s). * * @since 0.5 */ @@ -1116,7 +1119,7 @@ public class DefaultMetadata extends ISO /** * Provides the URI of the dataset to which the metadata applies. * - * @return Uniformed Resource Identifier of the dataset, or {@code null}. + * @return Uniform Resource Identifier of the dataset, or {@code null}. * * @deprecated As of ISO 19115:2014, replaced by {@link #getIdentificationInfo()} followed by * {@link DefaultDataIdentification#getCitation()} followed by {@link DefaultCitation#getOnlineResources()}. @@ -1156,8 +1159,8 @@ public class DefaultMetadata extends ISO * Sets the URI of the dataset to which the metadata applies. * This method sets the linkage of the first online resource in the citation of the first identification info. * - * @param newValue The new data set URI. - * @throws URISyntaxException If the given value can not be parsed as a URI. + * @param newValue the new data set URI. + * @throws URISyntaxException if the given value can not be parsed as a URI. * * @deprecated As of ISO 19115:2014, replaced by {@link #getIdentificationInfo()} * followed by {@link DefaultDataIdentification#getCitation()} @@ -1192,7 +1195,7 @@ public class DefaultMetadata extends ISO /** * Returns the digital representation of spatial information in the dataset. * - * @return Digital representation of spatial information in the dataset. + * @return digital representation of spatial information in the dataset. */ @Override @XmlElement(name = "spatialRepresentationInfo") @@ -1203,7 +1206,7 @@ public class DefaultMetadata extends ISO /** * Sets the digital representation of spatial information in the dataset. * - * @param newValues The new spatial representation info. + * @param newValues the new spatial representation info. */ public void setSpatialRepresentationInfo(final Collection<? extends SpatialRepresentation> newValues) { spatialRepresentationInfo = writeCollection(newValues, spatialRepresentationInfo, SpatialRepresentation.class); @@ -1212,7 +1215,7 @@ public class DefaultMetadata extends ISO /** * Returns the description of the spatial and temporal reference systems used in the dataset. * - * @return Spatial and temporal reference systems used in the dataset. + * @return spatial and temporal reference systems used in the dataset. */ @Override @XmlElement(name = "referenceSystemInfo") @@ -1223,7 +1226,7 @@ public class DefaultMetadata extends ISO /** * Sets the description of the spatial and temporal reference systems used in the dataset. * - * @param newValues The new reference system info. + * @param newValues the new reference system info. */ public void setReferenceSystemInfo(final Collection<? extends ReferenceSystem> newValues) { referenceSystemInfo = writeCollection(newValues, referenceSystemInfo, ReferenceSystem.class); @@ -1232,7 +1235,7 @@ public class DefaultMetadata extends ISO /** * Returns information describing metadata extensions. * - * @return Metadata extensions. + * @return metadata extensions. */ @Override @XmlElement(name = "metadataExtensionInfo") @@ -1243,7 +1246,7 @@ public class DefaultMetadata extends ISO /** * Sets information describing metadata extensions. * - * @param newValues The new metadata extension info. + * @param newValues the new metadata extension info. */ public void setMetadataExtensionInfo(final Collection<? extends MetadataExtensionInformation> newValues) { metadataExtensionInfo = writeCollection(newValues, metadataExtensionInfo, MetadataExtensionInformation.class); @@ -1252,7 +1255,7 @@ public class DefaultMetadata extends ISO /** * Returns basic information about the resource(s) to which the metadata applies. * - * @return The resource(s) to which the metadata applies. + * @return the resource(s) to which the metadata applies. */ @Override @XmlElement(name = "identificationInfo", required = true) @@ -1263,7 +1266,7 @@ public class DefaultMetadata extends ISO /** * Sets basic information about the resource(s) to which the metadata applies. * - * @param newValues The new identification info. + * @param newValues the new identification info. */ public void setIdentificationInfo(final Collection<? extends Identification> newValues) { identificationInfo = writeCollection(newValues, identificationInfo, Identification.class); @@ -1273,7 +1276,7 @@ public class DefaultMetadata extends ISO * Returns information about the feature catalogue and describes the coverage and * image data characteristics. * - * @return The feature catalogue, coverage descriptions and image data characteristics. + * @return the feature catalogue, coverage descriptions and image data characteristics. */ @Override @XmlElement(name = "contentInfo") @@ -1285,7 +1288,7 @@ public class DefaultMetadata extends ISO * Sets information about the feature catalogue and describes the coverage and * image data characteristics. * - * @param newValues The new content info. + * @param newValues the new content info. */ public void setContentInfo(final Collection<? extends ContentInformation> newValues) { contentInfo = writeCollection(newValues, contentInfo, ContentInformation.class); @@ -1299,7 +1302,7 @@ public class DefaultMetadata extends ISO * This change will tentatively be applied in GeoAPI 4.0. * </div> * - * @return The distributor of and options for obtaining the resource(s). + * @return the distributor of and options for obtaining the resource(s). */ @Override @XmlElement(name = "distributionInfo") @@ -1315,7 +1318,7 @@ public class DefaultMetadata extends ISO * This change will tentatively be applied in GeoAPI 4.0. * </div> * - * @param newValue The new distribution info. + * @param newValue the new distribution info. */ public void setDistributionInfo(final Distribution newValue) { checkWritePermission(); @@ -1325,7 +1328,7 @@ public class DefaultMetadata extends ISO /** * Returns overall assessment of quality of a resource(s). * - * @return Overall assessment of quality of a resource(s). + * @return overall assessment of quality of a resource(s). */ @Override @XmlElement(name = "dataQualityInfo") @@ -1336,7 +1339,7 @@ public class DefaultMetadata extends ISO /** * Sets overall assessment of quality of a resource(s). * - * @param newValues The new data quality info. + * @param newValues the new data quality info. */ public void setDataQualityInfo(final Collection<? extends DataQuality> newValues) { dataQualityInfo = writeCollection(newValues, dataQualityInfo, DataQuality.class); @@ -1345,7 +1348,7 @@ public class DefaultMetadata extends ISO /** * Returns information about the catalogue of rules defined for the portrayal of a resource(s). * - * @return The catalogue of rules defined for the portrayal of a resource(s). + * @return the catalogue of rules defined for the portrayal of a resource(s). */ @Override @XmlElement(name = "portrayalCatalogueInfo") @@ -1356,7 +1359,7 @@ public class DefaultMetadata extends ISO /** * Sets information about the catalogue of rules defined for the portrayal of a resource(s). * - * @param newValues The new portrayal catalog info. + * @param newValues the new portrayal catalog info. */ public void setPortrayalCatalogueInfo(final Collection<? extends PortrayalCatalogueReference> newValues) { portrayalCatalogueInfo = writeCollection(newValues, portrayalCatalogueInfo, PortrayalCatalogueReference.class); @@ -1365,7 +1368,7 @@ public class DefaultMetadata extends ISO /** * Returns restrictions on the access and use of data. * - * @return Restrictions on the access and use of data. + * @return restrictions on the access and use of data. */ @Override @XmlElement(name = "metadataConstraints") @@ -1376,7 +1379,7 @@ public class DefaultMetadata extends ISO /** * Sets restrictions on the access and use of data. * - * @param newValues The new metadata constraints. + * @param newValues the new metadata constraints. */ public void setMetadataConstraints(final Collection<? extends Constraints> newValues) { metadataConstraints = writeCollection(newValues, metadataConstraints, Constraints.class); @@ -1385,7 +1388,7 @@ public class DefaultMetadata extends ISO /** * Returns information about the conceptual schema of a dataset. * - * @return The conceptual schema of a dataset. + * @return the conceptual schema of a dataset. */ @Override @XmlElement(name = "applicationSchemaInfo") @@ -1396,7 +1399,7 @@ public class DefaultMetadata extends ISO /** * Returns information about the conceptual schema of a dataset. * - * @param newValues The new application schema info. + * @param newValues the new application schema info. */ public void setApplicationSchemaInfo(final Collection<? extends ApplicationSchemaInformation> newValues) { applicationSchemaInfo = writeCollection(newValues, applicationSchemaInfo, ApplicationSchemaInformation.class); @@ -1405,7 +1408,7 @@ public class DefaultMetadata extends ISO /** * Returns information about the acquisition of the data. * - * @return The acquisition of data. + * @return the acquisition of data. */ @Override @XmlElement(name = "acquisitionInformation", namespace = Namespaces.GMI) @@ -1416,7 +1419,7 @@ public class DefaultMetadata extends ISO /** * Sets information about the acquisition of the data. * - * @param newValues The new acquisition information. + * @param newValues the new acquisition information. */ public void setAcquisitionInformation(final Collection<? extends AcquisitionInformation> newValues) { acquisitionInformation = writeCollection(newValues, acquisitionInformation, AcquisitionInformation.class); @@ -1425,7 +1428,7 @@ public class DefaultMetadata extends ISO /** * Returns information about the frequency of metadata updates, and the scope of those updates. * - * @return The frequency of metadata updates and their scope, or {@code null}. + * @return the frequency of metadata updates and their scope, or {@code null}. */ @Override @XmlElement(name = "metadataMaintenance") @@ -1436,7 +1439,7 @@ public class DefaultMetadata extends ISO /** * Sets information about the frequency of metadata updates, and the scope of those updates. * - * @param newValue The new metadata maintenance. + * @param newValue the new metadata maintenance. */ public void setMetadataMaintenance(final MaintenanceInformation newValue) { checkWritePermission(); @@ -1446,7 +1449,7 @@ public class DefaultMetadata extends ISO /** * Returns information about the provenance, sources and/or the production processes applied to the resource. * - * @return Information about the provenance, sources and/or the production processes. + * @return information about the provenance, sources and/or the production processes. * * @since 0.5 */ @@ -1458,7 +1461,7 @@ public class DefaultMetadata extends ISO /** * Sets information about the provenance, sources and/or the production processes applied to the resource. * - * @param newValues New information about the provenance, sources and/or the production processes. + * @param newValues new information about the provenance, sources and/or the production processes. * * @since 0.5 */ Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataExtensionInformation.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataExtensionInformation.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataExtensionInformation.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataExtensionInformation.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -44,14 +44,13 @@ import org.opengis.metadata.MetadataExte * @version 0.3 * @module */ +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. @XmlType(name = "MD_MetadataExtensionInformation_Type", propOrder = { "extensionOnLineResource", "extendedElementInformation" }) @XmlRootElement(name = "MD_MetadataExtensionInformation") -public class DefaultMetadataExtensionInformation extends ISOMetadata - implements MetadataExtensionInformation -{ +public class DefaultMetadataExtensionInformation extends ISOMetadata implements MetadataExtensionInformation { /** * Serial number for compatibility with different versions. */ @@ -80,7 +79,7 @@ public class DefaultMetadataExtensionInf * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * - * @param object The metadata to copy values from, or {@code null} if none. + * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(MetadataExtensionInformation) */ @@ -106,8 +105,8 @@ public class DefaultMetadataExtensionInf * metadata contained in the given object are not recursively copied.</li> * </ul> * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultMetadataExtensionInformation castOrCopy(final MetadataExtensionInformation object) { @@ -121,7 +120,7 @@ public class DefaultMetadataExtensionInf * Information about on-line sources containing the community profile name and * the extended metadata elements and information for all new metadata elements. * - * @return Online sources to community profile name and extended metadata elements, or {@code null}. + * @return online sources to community profile name and extended metadata elements, or {@code null}. */ @Override @XmlElement(name = "extensionOnLineResource") @@ -132,7 +131,7 @@ public class DefaultMetadataExtensionInf /** * Sets information about on-line sources. * - * @param newValue The new extension online resource. + * @param newValue the new extension online resource. */ public void setExtensionOnLineResource(final OnlineResource newValue) { checkWritePermission(); @@ -143,7 +142,7 @@ public class DefaultMetadataExtensionInf * Provides information about a new metadata element, not found in ISO 19115, * which is required to describe resource. * - * @return New metadata elements not found in ISO 19115. + * @return new metadata elements not found in ISO 19115. */ @Override @XmlElement(name = "extendedElementInformation") @@ -154,7 +153,7 @@ public class DefaultMetadataExtensionInf /** * Sets information about a new metadata element. * - * @param newValues The new extended element information. + * @param newValues the new extended element information. */ public void setExtendedElementInformation(final Collection<? extends ExtendedElementInformation> newValues) { extendedElementInformation = writeCollection(newValues, extendedElementInformation, ExtendedElementInformation.class); Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataScope.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataScope.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataScope.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadataScope.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -56,6 +56,7 @@ import static org.opengis.annotation.Spe * @version 0.5 * @module */ +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. @XmlType(name = "MD_MetadataScope_Type", propOrder = { "resourceScope", "name" @@ -88,7 +89,7 @@ public class DefaultMetadataScope extend * Constructs a metadata scope initialized to the given value. * * @param resourceScope code for the scope. - * @param name description of the scope, or {@code null} if none. + * @param name description of the scope, or {@code null} if none. */ public DefaultMetadataScope(final ScopeCode resourceScope, final CharSequence name) { this.resourceScope = resourceScope; Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultPortrayalCatalogueReference.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -43,11 +43,10 @@ import org.opengis.metadata.PortrayalCat * @version 0.3 * @module */ +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. @XmlType(name = "MD_PortrayalCatalogueReference_Type") @XmlRootElement(name = "MD_PortrayalCatalogueReference") -public class DefaultPortrayalCatalogueReference extends ISOMetadata - implements PortrayalCatalogueReference -{ +public class DefaultPortrayalCatalogueReference extends ISOMetadata implements PortrayalCatalogueReference { /** * Serial number for compatibility with different versions. */ @@ -67,7 +66,7 @@ public class DefaultPortrayalCatalogueRe /** * Creates a portrayal catalogue reference initialized to the given reference. * - * @param portrayalCatalogueCitation The bibliographic reference, or {@code null} if none. + * @param portrayalCatalogueCitation the bibliographic reference, or {@code null} if none. */ public DefaultPortrayalCatalogueReference(final Citation portrayalCatalogueCitation) { portrayalCatalogueCitations = singleton(portrayalCatalogueCitation, Citation.class); @@ -78,7 +77,7 @@ public class DefaultPortrayalCatalogueRe * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * - * @param object The metadata to copy values from, or {@code null} if none. + * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(PortrayalCatalogueReference) */ @@ -103,8 +102,8 @@ public class DefaultPortrayalCatalogueRe * metadata contained in the given object are not recursively copied.</li> * </ul> * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultPortrayalCatalogueReference castOrCopy(final PortrayalCatalogueReference object) { @@ -117,7 +116,7 @@ public class DefaultPortrayalCatalogueRe /** * Bibliographic reference to the portrayal catalogue cited. * - * @return References to the portrayal catalogue cited. + * @return references to the portrayal catalogue cited. */ @Override @XmlElement(name = "portrayalCatalogueCitation", required = true) @@ -128,7 +127,7 @@ public class DefaultPortrayalCatalogueRe /** * Sets bibliographic reference to the portrayal catalogue cited. * - * @param newValues The new portrayal catalogue citations. + * @param newValues the new portrayal catalogue citations. */ public void setPortrayalCatalogueCitations(Collection<? extends Citation> newValues) { portrayalCatalogueCitations = writeCollection(newValues, portrayalCatalogueCitations, Citation.class); Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ISOMetadata.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -33,6 +33,7 @@ import org.apache.sis.metadata.Modifiabl import org.apache.sis.internal.jaxb.IdentifierMapAdapter; import org.apache.sis.internal.jaxb.ModifiableIdentifierMap; import org.apache.sis.internal.metadata.MetadataUtilities; +import org.apache.sis.internal.util.CollectionsExt; import org.apache.sis.internal.system.Modules; import org.apache.sis.util.collection.Containers; @@ -54,10 +55,11 @@ import static org.apache.sis.util.collec * * @author Martin Desruisseaux (Geomatys) * @since 0.3 - * @version 0.7 + * @version 0.8 * @module */ @XmlTransient +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. public class ISOMetadata extends ModifiableMetadata implements IdentifiedObject, Serializable { /** * Serial number for inter-operability with different versions. @@ -124,7 +126,7 @@ public class ISOMetadata extends Modifia // -------------------------------------------------------------------------------------- - // Code below this point also appears in other IdentifiedObject implementations. + // Identifier methods below also appear in other IdentifiedObject implementations. // If this code is modified, consider revisiting also the following classes: // // * org.apache.sis.metadata.iso.identification.DefaultRepresentativeFraction @@ -163,6 +165,34 @@ public class ISOMetadata extends Modifia : new IdentifierMapAdapter(identifiers); } + // -------------------------------------------------------------------------------------- + // End of identifier methods. + // -------------------------------------------------------------------------------------- + + /** + * Declares this metadata and all its properties as unmodifiable. Any attempt to modify a + * property after this method call will throw an {@link UnmodifiableMetadataException}. + * If this metadata is already unmodifiable, then this method does nothing. + * + * <p>Subclasses usually do not need to override this method since the default implementation + * performs most of its work using Java reflection.</p> + */ + @Override + public void freeze() { + if (isModifiable()) { + final Collection<Identifier> p = identifiers; + super.freeze(); + /* + * The 'identifiers' collection will have been replaced by an unmodifiable collection if + * subclass has an "identifiers" property. If this is not the case, then the collection + * is unchanged (or null) so we have to make it unmodifiable here. + */ + if (p == identifiers) { + identifiers = CollectionsExt.unmodifiableOrCopy(p); // Null safe. + } + } + } + @@ -182,7 +212,7 @@ public class ISOMetadata extends Modifia * This method is invoked automatically by JAXB and should never be invoked explicitely. */ @XmlID - @XmlAttribute // Defined in "gco" as unqualified attribute. + @XmlAttribute // Defined in "gco" as unqualified attribute. @XmlSchemaType(name = "ID") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) private String getID() { @@ -201,7 +231,7 @@ public class ISOMetadata extends Modifia * Returns an unique identifier, or {@code null} if none. * This method is invoked automatically by JAXB and should never be invoked explicitely. */ - @XmlAttribute // Defined in "gco" as unqualified attribute. + @XmlAttribute // Defined in "gco" as unqualified attribute. @XmlJavaTypeAdapter(CollapsedStringAdapter.class) private String getUUID() { /* Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -18,6 +18,7 @@ package org.apache.sis.metadata.iso; import java.util.Map; import java.util.Locale; +import java.util.Objects; import java.io.Serializable; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlElement; @@ -40,9 +41,6 @@ import static org.apache.sis.util.Argume import static org.apache.sis.util.CharSequences.trimWhitespaces; import static org.apache.sis.util.collection.Containers.property; -// Branch-dependent imports -import java.util.Objects; - /** * Immutable value uniquely identifying an object within a namespace, together with a version. Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultAcquisitionInformation.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultAcquisitionInformation.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultAcquisitionInformation.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultAcquisitionInformation.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -50,6 +50,7 @@ import org.apache.sis.metadata.iso.ISOMe * @version 0.3 * @module */ +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. @XmlType(name = "MI_AcquisitionInformation_Type", propOrder = { "acquisitionPlans", "acquisitionRequirements", @@ -112,7 +113,7 @@ public class DefaultAcquisitionInformati * This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the * given object are not recursively copied. * - * @param object The metadata to copy values from, or {@code null} if none. + * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(AcquisitionInformation) */ @@ -143,8 +144,8 @@ public class DefaultAcquisitionInformati * metadata contained in the given object are not recursively copied.</li> * </ul> * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultAcquisitionInformation castOrCopy(final AcquisitionInformation object) { @@ -157,7 +158,7 @@ public class DefaultAcquisitionInformati /** * Returns the plan as implemented by the acquisition. * - * @return Plan as implemented by the acquisition. + * @return plan as implemented by the acquisition. */ @Override @XmlElement(name = "acquisitionPlan") @@ -168,7 +169,7 @@ public class DefaultAcquisitionInformati /** * Sets the plan as implemented by the acquisition. * - * @param newValues The new plan values. + * @param newValues the new plan values. */ public void setAcquisitionPlans(final Collection<? extends Plan> newValues) { acquisitionPlans = writeCollection(newValues, acquisitionPlans, Plan.class); @@ -177,7 +178,7 @@ public class DefaultAcquisitionInformati /** * Returns the requirement the data acquisition intends to satisfy. * - * @return Requirement the data acquisition intends to satisfy. + * @return requirement the data acquisition intends to satisfy. */ @Override @XmlElement(name = "acquisitionRequirement") @@ -188,7 +189,7 @@ public class DefaultAcquisitionInformati /** * Sets the requirement the data acquisition intends to satisfy. * - * @param newValues The new acquisition requirements values. + * @param newValues the new acquisition requirements values. */ public void setAcquisitionRequirements(final Collection<? extends Requirement> newValues) { acquisitionRequirements = writeCollection(newValues, acquisitionRequirements, Requirement.class); @@ -198,7 +199,7 @@ public class DefaultAcquisitionInformati * Returns a record of the environmental circumstances during the data acquisition. * {@code null} if unspecified. * - * @return Record of the environmental circumstances, or {@code null}. + * @return record of the environmental circumstances, or {@code null}. */ @Override @XmlElement(name = "environmentalConditions") @@ -209,7 +210,7 @@ public class DefaultAcquisitionInformati /** * Sets the record of the environmental circumstances during the data acquisition. * - * @param newValue The new environmental record value. + * @param newValue the new environmental record value. */ public void setEnvironmentalConditions(final EnvironmentalRecord newValue) { checkWritePermission(); @@ -219,7 +220,7 @@ public class DefaultAcquisitionInformati /** * Returns the general information about the instrument used in data acquisition. * - * @return Instrument used in data acquisition. + * @return instrument used in data acquisition. */ @Override @XmlElement(name = "instrument") @@ -230,7 +231,7 @@ public class DefaultAcquisitionInformati /** * Sets the general information about the instrument used in data acquisition. * - * @param newValues The new instruments values. + * @param newValues the new instruments values. */ public void setInstruments(final Collection<? extends Instrument> newValues) { instruments = writeCollection(newValues, instruments, Instrument.class); @@ -239,7 +240,7 @@ public class DefaultAcquisitionInformati /** * Returns the area or object to be sensed. * - * @return Area or object to be sensed. + * @return area or object to be sensed. */ @Override @XmlElement(name = "objective") @@ -250,7 +251,7 @@ public class DefaultAcquisitionInformati /** * Sets the area or object to be sensed. * - * @param newValues The new objectives values. + * @param newValues the new objectives values. */ public void setObjectives(final Collection<? extends Objective> newValues) { objectives = writeCollection(newValues, objectives, Objective.class); @@ -259,7 +260,7 @@ public class DefaultAcquisitionInformati /** * Returns the general information about an identifiable activity which provided the data. * - * @return Identifiable activity which provided the data. + * @return identifiable activity which provided the data. */ @Override @XmlElement(name = "operation") @@ -270,7 +271,7 @@ public class DefaultAcquisitionInformati /** * Sets the general information about an identifiable activity which provided the data. * - * @param newValues The new operations values. + * @param newValues the new operations values. */ public void setOperations(final Collection<? extends Operation> newValues) { operations = writeCollection(newValues, operations, Operation.class); @@ -279,7 +280,7 @@ public class DefaultAcquisitionInformati /** * Returns the general information about the platform from which the data were taken. * - * @return Platform from which the data were taken. + * @return platform from which the data were taken. */ @Override @XmlElement(name = "platform") @@ -290,7 +291,7 @@ public class DefaultAcquisitionInformati /** * Sets the general information about the platform from which the data were taken. * - * @param newValues The new platforms values. + * @param newValues the new platforms values. */ public void setPlatforms(final Collection<? extends Platform> newValues) { platforms = writeCollection(newValues, platforms, Platform.class); Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEnvironmentalRecord.java URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEnvironmentalRecord.java?rev=1779559&r1=1779558&r2=1779559&view=diff ============================================================================== --- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEnvironmentalRecord.java [UTF-8] (original) +++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/acquisition/DefaultEnvironmentalRecord.java [UTF-8] Fri Jan 20 04:34:26 2017 @@ -45,6 +45,7 @@ import static org.apache.sis.internal.me * @version 0.5 * @module */ +@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones. @XmlType(name = "MI_EnvironmentalRecord_Type", propOrder = { "averageAirTemperature", "maxRelativeHumidity", @@ -96,7 +97,7 @@ public class DefaultEnvironmentalRecord * metadata instances can also be obtained by unmarshalling an invalid XML document. * </div> * - * @param object The metadata to copy values from, or {@code null} if none. + * @param object the metadata to copy values from, or {@code null} if none. * * @see #castOrCopy(EnvironmentalRecord) */ @@ -124,8 +125,8 @@ public class DefaultEnvironmentalRecord * metadata contained in the given object are not recursively copied.</li> * </ul> * - * @param object The object to get as a SIS implementation, or {@code null} if none. - * @return A SIS implementation containing the values of the given object (may be the + * @param object the object to get as a SIS implementation, or {@code null} if none. + * @return a SIS implementation containing the values of the given object (may be the * given object itself), or {@code null} if the argument was null. */ public static DefaultEnvironmentalRecord castOrCopy(final EnvironmentalRecord object) { @@ -138,7 +139,7 @@ public class DefaultEnvironmentalRecord /** * Returns the average air temperature along the flight pass during the photo flight. * - * @return Average air temperature along the flight pass during the photo flight, or {@code null}. + * @return average air temperature along the flight pass during the photo flight, or {@code null}. */ @Override @XmlElement(name = "averageAirTemperature", required = true) @@ -149,7 +150,7 @@ public class DefaultEnvironmentalRecord /** * Sets the average air temperature along the flight pass during the photo flight. * - * @param newValue The new average air temperature value. + * @param newValue the new average air temperature value. */ public void setAverageAirTemperature(final Double newValue) { checkWritePermission(); @@ -159,7 +160,7 @@ public class DefaultEnvironmentalRecord /** * Returns the maximum relative humidity along the flight pass during the photo flight. * - * @return Maximum relative humidity along the flight pass during the photo flight, or {@code null}. + * @return maximum relative humidity along the flight pass during the photo flight, or {@code null}. */ @Override @ValueRange(minimum = 0, maximum = 100) @@ -171,7 +172,7 @@ public class DefaultEnvironmentalRecord /** * Sets the maximum relative humidity along the flight pass during the photo flight. * - * @param newValue The new maximum relative humidity, or {@code null}. + * @param newValue the new maximum relative humidity, or {@code null}. * @throws IllegalArgumentException if the given value is out of range. */ public void setMaxRelativeHumidity(final Double newValue) { @@ -184,7 +185,7 @@ public class DefaultEnvironmentalRecord /** * Returns the maximum altitude during the photo flight. * - * @return Maximum altitude during the photo flight, or {@code null}. + * @return maximum altitude during the photo flight, or {@code null}. */ @Override @XmlElement(name = "maxAltitude", required = true) @@ -195,7 +196,7 @@ public class DefaultEnvironmentalRecord /** * Sets the maximum altitude value. * - * @param newValue The new maximum altitude value. + * @param newValue the new maximum altitude value. */ public void setMaxAltitude(final Double newValue) { checkWritePermission(); @@ -205,7 +206,7 @@ public class DefaultEnvironmentalRecord /** * Returns the meteorological conditions in the photo flight area, in particular clouds, snow and wind. * - * @return Meteorological conditions in the photo flight area, or {@code null}. + * @return meteorological conditions in the photo flight area, or {@code null}. */ @Override @XmlElement(name = "meteorologicalConditions", required = true) @@ -216,7 +217,7 @@ public class DefaultEnvironmentalRecord /** * Sets the meteorological conditions in the photo flight area, in particular clouds, snow and wind. * - * @param newValue The meteorological conditions value. + * @param newValue the meteorological conditions value. */ public void setMeteorologicalConditions(final InternationalString newValue) { checkWritePermission();
