Package org.apache.sis.metadata.iso.distribution

# Class DefaultDistributor

Object
AbstractMetadata
ModifiableMetadata
ISOMetadata
DefaultDistributor

All Implemented Interfaces:
  `Serializable`, `Emptiable`, `LenientComparable`, `IdentifiedObject`, `Distributor`

public class DefaultDistributor extends ISOMetadata implements Distributor
Information about the distributor. The following properties are mandatory or conditional (i.e. mandatory under some circumstances) in a well-formed metadata according ISO 19115:
`MD_Distributor` `├─distributorContact………………………………………` Party from whom the resource may be obtained. This list need not be exhaustive. `│ ├─party………………………………………………………………` Information about the parties. `│ │ └─name………………………………………………………` Name of the party. `│ └─role…………………………………………………………………` Function performed by the responsible party. `└─distributorFormat…………………………………………` Information about the format used by the distributor. `└─formatSpecificationCitation……` Citation/URL of the specification format. `├─title……………………………………………………` Name by which the cited resource is known. `└─date………………………………………………………` Reference date for the cited resource.

## Limitations

- Instances of this class are not synchronized for multi-threading. Synchronization, if needed, is caller's responsibility.
- Serialized objects of this class are not guaranteed to be compatible with future Apache SIS releases. Serialization support is appropriate for short term storage or RMI between applications running the same version of Apache SIS. For long term storage, use `XML` instead.

Since:
  0.3
See Also:
  - Serialized Form

Defined in the `sis-metadata` module

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class ModifiableMetadata

  `ModifiableMetadata​.State`

- ## Field Summary

  ### Fields inherited from class ISOMetadata

  `identifiers`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultDistributor()`
  Constructs an initially empty distributor.
  `DefaultDistributor(ResponsibleParty distributorContact)`
  Creates a distributor with the specified contact.
  `DefaultDistributor(Distributor object)`
  Constructs a new instance initialized with the values from the specified metadata object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DefaultDistributor`
  `castOrCopy(Distributor object)`
  Returns a SIS metadata implementation with the values of the given arbitrary implementation.
  `Collection<StandardOrderProcess>`
  `getDistributionOrderProcesses()`
  Provides information about how the resource may be obtained, and related instructions and fee information.
  `ResponsibleParty`
  `getDistributorContact()`
  Party from whom the resource may be obtained.
  `Collection<Format>`
  `getDistributorFormats()`
  Provides information about the format used by the distributor.
  `Collection<DigitalTransferOptions>`
  `getDistributorTransferOptions()`
  Provides information about the technical means and media used by the distributor.
  `void`
  `setDistributionOrderProcesses(Collection<? extends StandardOrderProcess> newValues)`
  Sets information about how the resource may be obtained, and related instructions and fee information.
  `void`
  `setDistributorContact(ResponsibleParty newValue)`
  Sets the party from whom the resource may be obtained.
  `void`
  `setDistributorFormats(Collection<? extends Format> newValues)`
  Sets information about the format used by the distributor.
  `void`
  `setDistributorTransferOptions(Collection<? extends DigitalTransferOptions> newValues)`
  Provides information about the technical means and media used by the distributor.

  ### Methods inherited from class ISOMetadata

  `getIdentifier, getIdentifierMap, getIdentifiers, getStandard, setIdentifier, transitionTo`

  ### Methods inherited from class ModifiableMetadata

  `checkWritePermission, collectionType, copyCollection, copyList, copyMap, copySet, deepCopy, nonNullCollection, nonNullList, nonNullMap, nonNullSet, singleton, state, writeCollection, writeList, writeMap, writeSet`

  ### Methods inherited from class AbstractMetadata

  `asMap, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, prune, toString`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### DefaultDistributor

    public DefaultDistributor()
    Constructs an initially empty distributor.

  - ### DefaultDistributor

    public DefaultDistributor(ResponsibleParty distributorContact)
    Creates a distributor with the specified contact.
    Parameters:
      `distributorContact` - party from whom the resource may be obtained, or `null`.

  - ### DefaultDistributor

    public DefaultDistributor(Distributor object)
    Constructs a new instance initialized with the values from the specified metadata object. This is a shallow copy constructor, since the other metadata contained in the given object are not recursively copied.
    Parameters:
      `object` - the metadata to copy values from, or `null` if none.
    See Also:
      - `castOrCopy(Distributor)`

- ## Method Details

  - ### castOrCopy

    public static DefaultDistributor castOrCopy(Distributor object)
    Returns a SIS metadata implementation with the values of the given arbitrary implementation. This method performs the first applicable action in the following choices:
    - If the given object is `null`, then this method returns `null`.
    - Otherwise if the given object is already an instance of `DefaultDistributor`, then it is returned unchanged.
    - Otherwise a new `DefaultDistributor` instance is created using the copy constructor and returned. Note that this is a shallow copy operation, since the other metadata contained in the given object are not recursively copied.
    Parameters:
      `object` - the object to get as a SIS implementation, or `null` if none.
    Returns:
      a SIS implementation containing the values of the given object (may be the given object itself), or `null` if the argument was null.

  - ### getDistributorContact

    public ResponsibleParty getDistributorContact()
    Party from whom the resource may be obtained.
    Upcoming API change — generalization
    As of ISO 19115:2014, `ResponsibleParty` is replaced by the `Responsibility` parent interface. This change may be applied in GeoAPI 4.0.
    Specified by:
      `getDistributorContact` in interface `Distributor`
    Returns:
      party from whom the resource may be obtained, or `null`.

  - ### setDistributorContact

    public void setDistributorContact(ResponsibleParty newValue)
    Sets the party from whom the resource may be obtained.
    Upcoming API change — generalization
    As of ISO 19115:2014, `ResponsibleParty` is replaced by the `Responsibility` parent interface. This change may be applied in GeoAPI 4.0.
    Parameters:
      `newValue` - the new distributor contact.

  - ### getDistributionOrderProcesses

    public Collection<StandardOrderProcess> getDistributionOrderProcesses()
    Provides information about how the resource may be obtained, and related instructions and fee information.
    Specified by:
      `getDistributionOrderProcesses` in interface `Distributor`
    Returns:
      information about how the resource may be obtained.

  - ### setDistributionOrderProcesses

    public void setDistributionOrderProcesses(Collection<? extends StandardOrderProcess> newValues)
    Sets information about how the resource may be obtained, and related instructions and fee information.
    Parameters:
      `newValues` - the new distribution order processes.

  - ### getDistributorFormats

    public Collection<Format> getDistributorFormats()
    Provides information about the format used by the distributor.
    Specified by:
      `getDistributorFormats` in interface `Distributor`
    Returns:
      information about the format used by the distributor.

  - ### setDistributorFormats

    public void setDistributorFormats(Collection<? extends Format> newValues)
    Sets information about the format used by the distributor.
    Parameters:
      `newValues` - the new distributor formats.

  - ### getDistributorTransferOptions

    public Collection<DigitalTransferOptions> getDistributorTransferOptions()
    Provides information about the technical means and media used by the distributor.
    Specified by:
      `getDistributorTransferOptions` in interface `Distributor`
    Returns:
      information about the technical means and media used by the distributor.

  - ### setDistributorTransferOptions

    public void setDistributorTransferOptions(Collection<? extends DigitalTransferOptions> newValues)
    Provides information about the technical means and media used by the distributor.
    Parameters:
      `newValues` - the new distributor transfer options.