Tabnine Logo
DefaultDistribution
Code IndexAdd Tabnine to your IDE (free)

How to use
DefaultDistribution
in
org.apache.sis.metadata.iso.distribution

Best Java code snippets using org.apache.sis.metadata.iso.distribution.DefaultDistribution (Showing top 14 results out of 315)

origin: apache/sis

/**
 * Creates the distribution information object if it does not already exists, then returns it.
 *
 * @return the distribution information (never {@code null}).
 * @see #newDistribution()
 */
private DefaultDistribution distribution() {
  if (distribution == null) {
    distribution = new DefaultDistribution();
  }
  return distribution;
}
origin: org.apache.sis.core/sis-metadata

/**
 * Invoked by JAXB at marshalling time for getting the actual metadata to write
 * inside the {@code <gmd:MD_Distribution>} 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 DefaultDistribution getElement() {
  return DefaultDistribution.castOrCopy(metadata);
}
origin: org.apache.sis.core/sis-metadata

/**
 * Sets a brief description of a set of distribution options.
 *
 * @param  newValue  the new description.
 *
 * @since 0.5
 */
public void setDescription(final InternationalString newValue) {
  checkWritePermission();
  description = newValue;
}
origin: apache/sis

final DefaultDistribution distributionInfo = new DefaultDistribution();
distributor.setRole(Role.DISTRIBUTOR);
distributionInfo.setDistributors(singleton(new DefaultDistributor(distributor)));
specification.setEdition(new SimpleInternationalString("1.0"));
format.setFormatSpecificationCitation(specification);
distributionInfo.setDistributionFormats(singleton(format));
onlines.setProtocol("http");
transfer.setOnLines(singleton(onlines));
distributionInfo.setTransferOptions(singleton(transfer));
metadata.setDistributionInfo(distributionInfo);
origin: Geomatys/geotoolkit

/**
 * Creates the metadata object corresponding to the {@link #JSON} string.
 */
static DefaultMetadata createMetadata() {
  final AbstractIdentification identification = new AbstractIdentification();
  identification.setCitation(new DefaultCitation("Data \"title\""));
  identification.setExtents(singleton(new DefaultExtent(null,
      new DefaultGeographicBoundingBox(-11.4865013, -4.615912, 43.165467, 49.9990223), null, null)));
  final DefaultDistribution distribution = new DefaultDistribution();
  distribution.setDistributors(asList(
      new DefaultDistributor(new DefaultResponsibility(Role.AUTHOR, null, null)),
      new DefaultDistributor(new DefaultResponsibility(Role.COLLABORATOR, null, null))));
  final DefaultMetadata metadata = new DefaultMetadata();
  metadata.setFileIdentifier("An archive");
  metadata.setLanguage(Locale.ENGLISH);
  metadata.setCharacterSets(singleton(StandardCharsets.UTF_8));
  metadata.setMetadataStandardName("ISO19115");
  metadata.setMetadataStandardVersion("2003/Cor.1:2006");
  metadata.setIdentificationInfo(singleton(identification));
  metadata.setDistributionInfo(singleton(distribution));
  return metadata;
}
origin: org.apache.sis.core/sis-metadata

/**
 * 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(Distribution)
 */
public DefaultDistribution(final Distribution object) {
  super(object);
  if (object != null) {
    distributionFormats = copyCollection(object.getDistributionFormats(), Format.class);
    distributors        = copyCollection(object.getDistributors(), Distributor.class);
    transferOptions     = copyCollection(object.getTransferOptions(), DigitalTransferOptions.class);
    if (object instanceof DefaultDistribution) {
      description = ((DefaultDistribution) object).getDescription();
    }
  }
}
origin: org.apache.sis.storage/sis-storage

/**
 * Adds a distributor. This is often the same than the above responsible party.
 * Storage location is:
 *
 * <ul>
 *   <li>{@code metadata/distributionInfo/distributor/distributorContact}</li>
 * </ul>
 *
 * @param  distributor  the distributor, or {@code null} for no-operation.
 */
public final void addDistributor(final ResponsibleParty distributor) {
  if (distributor != null) {
    addIfNotPresent(distribution().getDistributors(), new DefaultDistributor(distributor));
  }
}
origin: apache/sis

/**
 * 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(Distribution)
 */
public DefaultDistribution(final Distribution object) {
  super(object);
  if (object != null) {
    distributionFormats = copyCollection(object.getDistributionFormats(), Format.class);
    distributors        = copyCollection(object.getDistributors(), Distributor.class);
    transferOptions     = copyCollection(object.getTransferOptions(), DigitalTransferOptions.class);
    if (object instanceof DefaultDistribution) {
      description = ((DefaultDistribution) object).getDescription();
    }
  }
}
origin: apache/sis

/**
 * Adds a distributor. This is often the same than the above responsible party.
 * Storage location is:
 *
 * <ul>
 *   <li>{@code metadata/distributionInfo/distributor/distributorContact}</li>
 * </ul>
 *
 * @param  distributor  the distributor, or {@code null} for no-operation.
 */
public final void addDistributor(final ResponsibleParty distributor) {
  if (distributor != null) {
    addIfNotPresent(distribution().getDistributors(), new DefaultDistributor(distributor));
  }
}
origin: org.apache.sis.storage/sis-storage

/**
 * Creates the distribution information object if it does not already exists, then returns it.
 *
 * @return the distribution information (never {@code null}).
 * @see #newDistribution()
 */
private DefaultDistribution distribution() {
  if (distribution == null) {
    distribution = new DefaultDistribution();
  }
  return distribution;
}
origin: apache/sis

/**
 * Sets a brief description of a set of distribution options.
 *
 * @param  newValue  the new description.
 *
 * @since 0.5
 */
public void setDescription(final InternationalString newValue) {
  checkWritePermission(description);
  description = newValue;
}
origin: apache/sis

/**
 * Invoked by JAXB at marshalling time for getting the actual metadata to write
 * inside the {@code <mrd:MD_Distribution>} 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 DefaultDistribution getElement() {
  return DefaultDistribution.castOrCopy(metadata);
}
origin: org.apache.sis.core/sis-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 already an instance of
 *       {@code DefaultDistribution}, then it is returned unchanged.</li>
 *   <li>Otherwise a new {@code DefaultDistribution} instance is created using the
 *       {@linkplain #DefaultDistribution(Distribution) 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 DefaultDistribution castOrCopy(final Distribution object) {
  if (object == null || object instanceof DefaultDistribution) {
    return (DefaultDistribution) object;
  }
  return new DefaultDistribution(object);
}
origin: apache/sis

/**
 * 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 already an instance of
 *       {@code DefaultDistribution}, then it is returned unchanged.</li>
 *   <li>Otherwise a new {@code DefaultDistribution} instance is created using the
 *       {@linkplain #DefaultDistribution(Distribution) 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 DefaultDistribution castOrCopy(final Distribution object) {
  if (object == null || object instanceof DefaultDistribution) {
    return (DefaultDistribution) object;
  }
  return new DefaultDistribution(object);
}
org.apache.sis.metadata.iso.distributionDefaultDistribution

Javadoc

Information about the distributor of and options for obtaining the resource. The following properties are mandatory or conditional (i.e. mandatory under some circumstances) in a well-formed metadata according ISO 19115:
MD_Distribution └─distributionFormat……………………………………… Description of the format of the data to be distributed. └─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 org.apache.sis.xml.XML instead.

Most used methods

  • <init>
    Constructs a new instance initialized with the values from the specified metadata object. This is a
  • setDistributors
    Sets information about the distributor.
  • castOrCopy
    Returns a SIS metadata implementation with the values of the given arbitrary implementation. This me
  • checkWritePermission
  • copyCollection
  • getDescription
    Returns a brief description of a set of distribution options.
  • getDistributors
    Provides information about the distributor.
  • nonNullCollection
  • setDistributionFormats
    Sets a description of the format of the data to be distributed.
  • setTransferOptions
    Sets information about technical means and media by which a resource is obtained from the distributo
  • writeCollection
  • writeCollection

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Collectors (java.util.stream)
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Table (org.hibernate.mapping)
    A relational table
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now