org.geotoolkit.metadata.iso.distribution
Class DefaultMedium

Object
  extended by AbstractMetadata
      extended by ModifiableMetadata
          extended by MetadataEntity
              extended by DefaultMedium
All Implemented Interfaces:
Serializable, Cloneable, LenientComparable, IdentifiedObject, Medium

@ThreadSafe
public class DefaultMedium
extends MetadataEntity
implements Medium

Information about the media on which the resource can be distributed.

Since:
2.1
Version:
3.19
Author:
Martin Desruisseaux (IRD, Geomatys), Touraïvane (IRD), Cédric Briançon (Geomatys)
See Also:
Serialized Form
Module:
metadata/geotk-metadata (download)    View source code for this class

Field Summary
 
Fields inherited from class MetadataEntity
identifiers
 
Fields inherited from class AbstractMetadata
LOGGER
 
Constructor Summary
DefaultMedium()
          Constructs an initially empty medium.
DefaultMedium(Medium source)
          Constructs a metadata entity initialized with the values from the specified metadata.
 
Method Summary
static DefaultMedium castOrCopy(Medium object)
          Returns a Geotk metadata implementation with the same values than the given arbitrary implementation.
 Collection<Double> getDensities()
          Returns the density at which the data is recorded.
 Unit<?> getDensityUnits()
          Returns the units of measure for the recording density.
 Collection<MediumFormat> getMediumFormats()
          Returns the method used to write to the medium.
 InternationalString getMediumNote()
          Returns a description of other limitations or requirements for using the medium.
 MediumName getName()
          Returns the name of the medium on which the resource can be received.
 Integer getVolumes()
          Returns the number of items in the media identified.
 void setDensities(Collection<? extends Double> newValues)
          Sets density at which the data is recorded.
 void setDensityUnits(Unit<?> newValue)
          Sets the units of measure for the recording density.
 void setMediumFormats(Collection<? extends MediumFormat> newValues)
          Sets the method used to write to the medium.
 void setMediumNote(InternationalString newValue)
          Sets a description of other limitations or requirements for using the medium.
 void setName(MediumName newValue)
          Sets the name of the medium on which the resource can be received.
 void setVolumes(Integer newValue)
          Sets the number of items in the media identified.
 
Methods inherited from class MetadataEntity
getIdentifier, getIdentifierMap, getIdentifiers, getStandard
 
Methods inherited from class ModifiableMetadata
checkWritePermission, clone, collectionType, copyCollection, copyList, copySet, freeze, isModifiable, nonNullCollection, nonNullList, nonNullSet, prune, unmodifiable
 
Methods inherited from class AbstractMetadata
asMap, asTree, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, parse, toString
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultMedium

public DefaultMedium()
Constructs an initially empty medium.


DefaultMedium

public DefaultMedium(Medium source)
Constructs a metadata entity initialized with the values from the specified metadata.

Parameters:
source - The metadata to copy, or null if none.
Since:
2.4
Method Detail

castOrCopy

public static DefaultMedium castOrCopy(Medium object)
Returns a Geotk metadata implementation with the same values than the given arbitrary implementation. If the given object is null, then this method returns null. Otherwise if the given object is already a Geotk implementation, then the given object is returned unchanged. Otherwise a new Geotk implementation is created and initialized to the attribute values of the given object, using a shallow copy operation (i.e. attributes are not cloned).

Parameters:
object - The object to get as a Geotk implementation, or null if none.
Returns:
A Geotk implementation containing the values of the given object (may be the given object itself), or null if the argument was null.
Since:
3.18

getName

public MediumName getName()
Returns the name of the medium on which the resource can be received.

Specified by:
getName in interface Medium

setName

public void setName(MediumName newValue)
Sets the name of the medium on which the resource can be received.

Parameters:
newValue - The new name.

getDensities

public Collection<Double> getDensities()
Returns the density at which the data is recorded. The numbers should be greater than zero.

Specified by:
getDensities in interface Medium

setDensities

public void setDensities(Collection<? extends Double> newValues)
Sets density at which the data is recorded. The numbers should be greater than zero.

Parameters:
newValues - The new densities.

getDensityUnits

public Unit<?> getDensityUnits()
Returns the units of measure for the recording density.

Specified by:
getDensityUnits in interface Medium

setDensityUnits

public void setDensityUnits(Unit<?> newValue)
Sets the units of measure for the recording density.

Parameters:
newValue - The new density units.

getVolumes

@ValueRange(minimum=0.0)
public Integer getVolumes()
Returns the number of items in the media identified. Returns null if unknown.

Specified by:
getVolumes in interface Medium

setVolumes

public void setVolumes(Integer newValue)
Sets the number of items in the media identified. Returns null if unknown.

Parameters:
newValue - The new volumes.

getMediumFormats

public Collection<MediumFormat> getMediumFormats()
Returns the method used to write to the medium.

Specified by:
getMediumFormats in interface Medium

setMediumFormats

public void setMediumFormats(Collection<? extends MediumFormat> newValues)
Sets the method used to write to the medium.

Parameters:
newValues - The new medium formats.

getMediumNote

public InternationalString getMediumNote()
Returns a description of other limitations or requirements for using the medium.

Specified by:
getMediumNote in interface Medium

setMediumNote

public void setMediumNote(InternationalString newValue)
Sets a description of other limitations or requirements for using the medium.

Parameters:
newValue - The new medium note.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.