/** * Sets the description of the attribute. * * @param newValue the new description. * * @since 0.5 */ public void setDescription(final InternationalString newValue) { checkWritePermission(); description = newValue; }
/** * Sets the description of the range of a cell measurement value. * This method stores the value in the {@linkplain #setDescription(InternationalString) description}. * * @param newValue the new descriptor. * * @deprecated As of ISO 19115:2014, renamed {@link #setDescription(InternationalString)}. */ @Deprecated public void setDescriptor(final InternationalString newValue) { setDescription(newValue); }
/** * Sets the identifiers for each attribute included in the resource. * * @param newValues the new identifiers for each attribute. * * @since 0.5 */ public void setNames(final Collection<? extends Identifier> newValues) { names = writeCollection(newValues, names, Identifier.class); } }
/** * Constructs a new instance initialized with the values from the specified metadata object. * 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. * * @see #castOrCopy(RangeDimension) */ public DefaultRangeDimension(final RangeDimension object) { super(object); if (object != null) { sequenceIdentifier = object.getSequenceIdentifier(); description = object.getDescriptor(); if (object instanceof DefaultRangeDimension) { names = copyCollection(((DefaultRangeDimension) object).getNames(), Identifier.class); } } }
/** * Returns the identifiers for each attribute included in the resource. * These identifiers can be use to provide names for the attribute from a standard set of names. * * @return identifiers for each attribute included in the resource. * * @since 0.5 */ /// @XmlElement(name = "name") @UML(identifier="name", obligation=OPTIONAL, specification=ISO_19115) public Collection<Identifier> getNames() { return names = nonNullCollection(names, Identifier.class); }
/** * Returns the description of the range of a cell measurement value. * This method fetches the value from the {@linkplain #getDescription() description}. * * @return description of the range of a cell measurement value, or {@code null}. * * @deprecated As of ISO 19115:2014, renamed {@link #getDescription()}. */ @Override @Deprecated @XmlElement(name = "descriptor") @Dependencies("getDescription") public InternationalString getDescriptor() { return getDescription(); }
/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <mrc:MD_RangeDimension>} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return the metadata to be marshalled. */ @XmlElementRef public DefaultRangeDimension getElement() { final RangeDimension metadata = this.metadata; if (metadata instanceof Band) { return MI_Band.castOrCopy((Band) metadata); } return DefaultRangeDimension.castOrCopy(metadata); }
/** * Returns a SIS metadata implementation with the values of the given arbitrary implementation. * This method performs the first applicable action in the following choices: * * <ul> * <li>If the given object is {@code null}, then this method returns {@code null}.</li> * <li>Otherwise if the given object is an instance of {@code SampleDimension}, then this method * delegates to the {@code castOrCopy(…)} method of the corresponding SIS subclass.</li> * <li>Otherwise if the given object is already an instance of * {@code DefaultRangeDimension}, then it is returned unchanged.</li> * <li>Otherwise a new {@code DefaultRangeDimension} instance is created using the * {@linkplain #DefaultRangeDimension(RangeDimension) copy constructor} * and returned. Note that this is a <cite>shallow</cite> copy operation, since the other * 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 * given object itself), or {@code null} if the argument was null. */ public static DefaultRangeDimension castOrCopy(final RangeDimension object) { if (object instanceof Band) { return DefaultBand.castOrCopy((Band) object); } // Intentionally tested after the sub-interfaces. if (object == null || object instanceof DefaultRangeDimension) { return (DefaultRangeDimension) object; } return new DefaultRangeDimension(object); }
/** * Invoked by JAXB at both marshalling and unmarshalling time. * This attribute has been added by ISO 19115:2014 standard. * If (and only if) marshalling an older standard version, we omit this attribute. */ @XmlElement(name = "name") private Collection<Identifier> getName() { return FilterByVersion.CURRENT_METADATA.accept() ? getNames() : null; } }
/** * Constructs a new instance initialized with the values from the specified metadata object. * 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. * * @see #castOrCopy(RangeDimension) */ public DefaultRangeDimension(final RangeDimension object) { super(object); if (object != null) { sequenceIdentifier = object.getSequenceIdentifier(); description = object.getDescriptor(); if (object instanceof DefaultRangeDimension) { names = copyCollection(((DefaultRangeDimension) object).getNames(), Identifier.class); } } }
/** * Returns the identifiers for each attribute included in the resource. * These identifiers can be use to provide names for the attribute from a standard set of names. * * @return identifiers for each attribute included in the resource. * * @since 0.5 */ // @XmlElement at the end of this class. @UML(identifier="name", obligation=OPTIONAL, specification=ISO_19115) public Collection<Identifier> getNames() { return names = nonNullCollection(names, Identifier.class); }
/** * Returns the description of the range of a cell measurement value. * This method fetches the value from the {@linkplain #getDescription() description}. * * @return description of the range of a cell measurement value, or {@code null}. * * @deprecated As of ISO 19115:2014, renamed {@link #getDescription()}. */ @Override @Deprecated @Dependencies("getDescription") @XmlElement(name = "descriptor", namespace = LegacyNamespaces.GMD) public InternationalString getDescriptor() { return FilterByVersion.LEGACY_METADATA.accept() ? getDescription() : null; }
/** * Invoked by JAXB at marshalling time for getting the actual metadata to write * inside the {@code <gmd:MD_RangeDimension>} XML element. * This is the value or a copy of the value given in argument to the {@code wrap} method. * * @return the metadata to be marshalled. */ @XmlElementRef public DefaultRangeDimension getElement() { final RangeDimension metadata = this.metadata; if (metadata instanceof Band) { return MI_Band.castOrCopy((Band) metadata); } return DefaultRangeDimension.castOrCopy(metadata); }
/** * Returns a SIS metadata implementation with the values of the given arbitrary implementation. * This method performs the first applicable action in the following choices: * * <ul> * <li>If the given object is {@code null}, then this method returns {@code null}.</li> * <li>Otherwise if the given object is an instance of {@code SampleDimension}, then this method * delegates to the {@code castOrCopy(…)} method of the corresponding SIS subclass.</li> * <li>Otherwise if the given object is already an instance of * {@code DefaultRangeDimension}, then it is returned unchanged.</li> * <li>Otherwise a new {@code DefaultRangeDimension} instance is created using the * {@linkplain #DefaultRangeDimension(RangeDimension) copy constructor} * and returned. Note that this is a <cite>shallow</cite> copy operation, since the other * 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 * given object itself), or {@code null} if the argument was null. */ public static DefaultRangeDimension castOrCopy(final RangeDimension object) { if (object instanceof Band) { return DefaultBand.castOrCopy((Band) object); } // Intentionally tested after the sub-interfaces. if (object == null || object instanceof DefaultRangeDimension) { return (DefaultRangeDimension) object; } return new DefaultRangeDimension(object); }
/** * Sets the name or number that uniquely identifies instances of bands of wavelengths on which a sensor operates. * * @param newValue the new sequence identifier. */ public void setSequenceIdentifier(final MemberName newValue) { checkWritePermission(); sequenceIdentifier = newValue; }
/** * Sets the description of the range of a cell measurement value. * This method stores the value in the {@linkplain #setDescription(InternationalString) description}. * * @param newValue the new descriptor. * * @deprecated As of ISO 19115:2014, renamed {@link #setDescription(InternationalString)}. */ @Deprecated public void setDescriptor(final InternationalString newValue) { setDescription(newValue); }
/** * Sets the identifiers for each attribute included in the resource. * * @param newValues the new identifiers for each attribute. * * @since 0.5 */ public void setNames(final Collection<? extends Identifier> newValues) { names = writeCollection(newValues, names, Identifier.class); }
/** * Sets the name or number that uniquely identifies instances of bands of wavelengths on which a sensor operates. * * @param newValue the new sequence identifier. */ public void setSequenceIdentifier(final MemberName newValue) { checkWritePermission(sequenceIdentifier); sequenceIdentifier = newValue; }
/** * Sets the description of the attribute. * * @param newValue the new description. * * @since 0.5 */ public void setDescription(final InternationalString newValue) { checkWritePermission(description); description = newValue; }