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

How to use
DefaultSource
in
org.apache.sis.metadata.iso.lineage

Best Java code snippets using org.apache.sis.metadata.iso.lineage.DefaultSource (Showing top 20 results out of 315)

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 DefaultSource}, then it is returned unchanged.</li>
 *   <li>Otherwise a new {@code DefaultSource} instance is created using the
 *       {@linkplain #DefaultSource(Source) 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 DefaultSource castOrCopy(final Source object) {
  if (object == null || object instanceof DefaultSource) {
    return (DefaultSource) object;
  }
  return new DefaultSource(object);
}
origin: apache/sis

/**
 * Sets the recommended reference to be used for the source data.
 *
 * @param  newValue  the new source citation.
 */
public void setSourceCitation(final Citation newValue) {
  checkWritePermission(sourceCitation);
  sourceCitation = newValue;
}
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(Source)
 */
public DefaultSource(final Source object) {
  super(object);
  if (object != null) {
    description             = object.getDescription();
    sourceReferenceSystem   = object.getSourceReferenceSystem();
    sourceCitation          = object.getSourceCitation();
    sourceSteps             = copyCollection(object.getSourceSteps(), ProcessStep.class);
    processedLevel          = object.getProcessedLevel();
    resolution              = object.getResolution();
    if (object instanceof DefaultSource) {
      sourceSpatialResolution = ((DefaultSource) object).getSourceSpatialResolution();
      sourceMetadata          = copyCollection(((DefaultSource) object).getSourceMetadata(), Citation.class);
      scope                   = ((DefaultSource) object).getScope();
    } else {
      setScaleDenominator(object.getScaleDenominator());
      setSourceExtents(object.getSourceExtents());
    }
  }
}
origin: apache/sis

/**
 * Create a lineage to marshal. If {@code extension} is {@code false}, then this method uses
 * only properties defined in ISO 19115-1. If {@code extension} is {@code true}, then this
 * method adds an ISO 19115-2 property.
 */
private static DefaultLineage create(final boolean extension) {
  final DefaultLineage lineage = new DefaultLineage();
  final DefaultSource source = new DefaultSource();
  source.setDescription(new SimpleInternationalString("Description of source data level."));
  lineage.getSources().add(source);
  if (extension) {
    source.setProcessedLevel(new DefaultIdentifier("DummyLevel"));
  }
  return lineage;
}
origin: apache/sis

/**
 * Information about the spatial, vertical and temporal extent of the source data.
 * This method stores the values in the {@linkplain #setScope(Scope) scope}.
 *
 * @param  newValues  the new source extents.
 *
 * @deprecated As of ISO 19115:2014, moved to {@link DefaultScope#setExtents(Collection)}.
 */
@Deprecated
public void setSourceExtents(final Collection<? extends Extent> newValues) {
  checkWritePermission(scope);
  Scope scope = this.scope;
  if (!(scope instanceof DefaultScope)) {
    scope = new DefaultScope(scope);
    setScope(scope);
  }
  ((DefaultScope) scope).setExtents(newValues);
}
origin: org.apache.sis.core/sis-metadata

/**
 * Sets the denominator of the representative fraction on a source map.
 * This method stores the value in the
 * {@linkplain #setSourceSpatialResolution(Resolution) source spatial resolution}.
 *
 * @param  newValue  the new scale denominator.
 *
 * @deprecated As of ISO 19115:2014, moved to {@link DefaultResolution#setEquivalentScale(RepresentativeFraction)}.
 */
@Deprecated
public void setScaleDenominator(final RepresentativeFraction newValue)  {
  checkWritePermission();
  Resolution resolution = null;
  if (newValue != null) {
    resolution = sourceSpatialResolution;
    if (resolution instanceof DefaultResolution) {
      ((DefaultResolution) resolution).setEquivalentScale(newValue);
    } else {
      resolution = new DefaultResolution(newValue);
    }
  }
  /*
   * Invoke the non-deprecated setter method only if the reference changed,
   * for consistency with other deprecated setter methods in metadata module.
   */
  if (resolution != sourceSpatialResolution) {
    setSourceSpatialResolution(resolution);
  }
}
origin: org.apache.sis.core/sis-metadata

/**
 * Returns the information about the spatial, vertical and temporal extent of the source data.
 * This method fetches the values from the {@linkplain #getScope() scope}.
 *
 * @return information about the extent of the source data.
 *
 * @deprecated As of ISO 19115:2014, moved to {@link DefaultScope#getExtents()}.
 */
@Override
@Deprecated
@XmlElement(name = "sourceExtent")
@Dependencies("getScope")
public Collection<Extent> getSourceExtents() {
  Scope scope = getScope();
  if (!(scope instanceof DefaultScope)) {
    if (isModifiable()) {
      scope = new DefaultScope(scope);
      this.scope = scope;
    } else {
      return Collections.singleton(scope.getExtent());
    }
  }
  return ((DefaultScope) scope).getExtents();
}
origin: org.apache.sis.core/sis-metadata

  /**
   * Wraps the given metadata into a SIS implementation that can be marshalled,
   * using the {@code "gmi"} namespace if necessary.
   *
   * @param  original  the original metadata provided by the user.
   * @return the metadata to marshall.
   */
  public static DefaultSource castOrCopy(final Source original) {
    if (original != null && !(original instanceof LE_Source)) {
      if (original.getProcessedLevel() != null || original.getResolution() != null) {
        return new LE_Source(original);
      }
    }
    return DefaultSource.castOrCopy(original);
  }
}
origin: org.apache.sis.core/sis-metadata

/**
 * Returns the denominator of the representative fraction on a source map.
 * This method fetches the value from the
 * {@linkplain #getSourceSpatialResolution() source spatial resolution}.
 *
 * @return representative fraction on a source map, or {@code null}.
 *
 * @deprecated As of ISO 19115:2014, moved to {@link DefaultResolution#getEquivalentScale()}.
 */
@Override
@Deprecated
@XmlElement(name = "scaleDenominator")
@Dependencies("getSourceSpatialResolution")
public RepresentativeFraction getScaleDenominator() {
  final Resolution resolution = getSourceSpatialResolution();
  return (resolution != null) ? resolution.getEquivalentScale() : null;
}
origin: apache/sis

  /**
   * 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 = "sourceMetadata")
  private Collection<Citation> getSources() {
    return FilterByVersion.CURRENT_METADATA.accept() ? getSourceMetadata() : null;
  }
}
origin: apache/sis

/**
 * Returns the information about the spatial, vertical and temporal extent of the source data.
 * This method fetches the values from the {@linkplain #getScope() scope}.
 *
 * @return information about the extent of the source data.
 *
 * @deprecated As of ISO 19115:2014, moved to {@link DefaultScope#getExtents()}.
 */
@Override
@Deprecated
@Dependencies("getScope")
@XmlElement(name = "sourceExtent", namespace = LegacyNamespaces.GMD)
public Collection<Extent> getSourceExtents() {
  if (FilterByVersion.LEGACY_METADATA.accept()) {
    Scope scope = getScope();
    if (scope != null) {
      if (!(scope instanceof DefaultScope)) {
        if (super.state() != State.FINAL) {
          scope = new DefaultScope(scope);
          this.scope = scope;
        } else {
          return Collections.singleton(scope.getExtent());
        }
      }
      return ((DefaultScope) scope).getExtents();
    }
  }
  return null;
}
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(Source)
 */
public DefaultSource(final Source object) {
  super(object);
  if (object != null) {
    description             = object.getDescription();
    sourceReferenceSystem   = object.getSourceReferenceSystem();
    sourceCitation          = object.getSourceCitation();
    sourceSteps             = copyCollection(object.getSourceSteps(), ProcessStep.class);
    processedLevel          = object.getProcessedLevel();
    resolution              = object.getResolution();
    if (object instanceof DefaultSource) {
      sourceSpatialResolution = ((DefaultSource) object).getSourceSpatialResolution();
      sourceMetadata          = copyCollection(((DefaultSource) object).getSourceMetadata(), Citation.class);
      scope                   = ((DefaultSource) object).getScope();
    } else {
      setScaleDenominator(object.getScaleDenominator());
      setSourceExtents(object.getSourceExtents());
    }
  }
}
origin: org.apache.sis.core/sis-metadata

/**
 * Information about the spatial, vertical and temporal extent of the source data.
 * This method stores the values in the {@linkplain #setScope(Scope) scope}.
 *
 * @param  newValues  the new source extents.
 *
 * @deprecated As of ISO 19115:2014, moved to {@link DefaultScope#setExtents(Collection)}.
 */
@Deprecated
public void setSourceExtents(final Collection<? extends Extent> newValues) {
  checkWritePermission();
  Scope scope = this.scope;
  if (!(scope instanceof DefaultScope)) {
    scope = new DefaultScope(scope);
    setScope(scope);
  }
  ((DefaultScope) scope).setExtents(newValues);
}
origin: apache/sis

/**
 * Sets the denominator of the representative fraction on a source map.
 * This method stores the value in the
 * {@linkplain #setSourceSpatialResolution(Resolution) source spatial resolution}.
 *
 * @param  newValue  the new scale denominator.
 *
 * @deprecated As of ISO 19115:2014, moved to {@link DefaultResolution#setEquivalentScale(RepresentativeFraction)}.
 */
@Deprecated
public void setScaleDenominator(final RepresentativeFraction newValue)  {
  checkWritePermission(sourceSpatialResolution);
  Resolution resolution = null;
  if (newValue != null) {
    resolution = sourceSpatialResolution;
    if (resolution instanceof DefaultResolution) {
      ((DefaultResolution) resolution).setEquivalentScale(newValue);
    } else {
      resolution = new DefaultResolution(newValue);
    }
  }
  /*
   * Invoke the non-deprecated setter method only if the reference changed,
   * for consistency with other deprecated setter methods in metadata module.
   */
  if (resolution != sourceSpatialResolution) {
    setSourceSpatialResolution(resolution);
  }
}
origin: apache/sis

  /**
   * Wraps the given metadata into a SIS implementation that can be marshalled,
   * using the {@code "gmi"} namespace if necessary.
   *
   * @param  original  the original metadata provided by the user.
   * @return the metadata to marshall.
   */
  public static DefaultSource castOrCopy(final Source original) {
    if (original != null && !(original instanceof LE_Source)) {
      if (original.getProcessedLevel() != null || original.getResolution() != null) {
        return new LE_Source(original);
      }
    }
    return DefaultSource.castOrCopy(original);
  }
}
origin: apache/sis

/**
 * Returns the denominator of the representative fraction on a source map.
 * This method fetches the value from the
 * {@linkplain #getSourceSpatialResolution() source spatial resolution}.
 *
 * @return representative fraction on a source map, or {@code null}.
 *
 * @deprecated As of ISO 19115:2014, moved to {@link DefaultResolution#getEquivalentScale()}.
 */
@Override
@Deprecated
@Dependencies("getSourceSpatialResolution")
@XmlElement(name = "scaleDenominator", namespace = LegacyNamespaces.GMD)
public RepresentativeFraction getScaleDenominator() {
  if (FilterByVersion.LEGACY_METADATA.accept()) {
    final Resolution resolution = getSourceSpatialResolution();
    if (resolution != null) {
      return resolution.getEquivalentScale();
    }
  }
  return null;
}
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 DefaultSource}, then it is returned unchanged.</li>
 *   <li>Otherwise a new {@code DefaultSource} instance is created using the
 *       {@linkplain #DefaultSource(Source) 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 DefaultSource castOrCopy(final Source object) {
  if (object == null || object instanceof DefaultSource) {
    return (DefaultSource) object;
  }
  return new DefaultSource(object);
}
origin: apache/sis

/**
 * Sets the spatial resolution expressed as a scale factor, an angle or a level of detail.
 *
 * @param  newValue  the new spatial resolution.
 *
 * @since 0.5
 */
public void setSourceSpatialResolution(final Resolution newValue) {
  checkWritePermission(sourceSpatialResolution);
  sourceSpatialResolution = newValue;
}
origin: apache/sis

final InternationalString i18n = trim(description);
if (i18n != null) {
  final DefaultSource source = new DefaultSource(description);
  if (level != null || feature != null) {
    DefaultScope scope = new DefaultScope(level);
origin: apache/sis

/**
 * Sets the type and / or extent of the source.
 *
 * @param  newValue  the new type and / or extent of the source.
 *
 * @since 0.5
 */
public void setScope(final Scope newValue){
  checkWritePermission(scope);
  scope = newValue;
}
org.apache.sis.metadata.iso.lineageDefaultSource

Javadoc

Information about the source data used in creating the data specified by the scope. The following properties are mandatory or conditional (i.e. mandatory under some circumstances) in a well-formed metadata according ISO 19115:
LI_Source ├─description…………………………………………… Detailed description of the level of the source data. └─scope…………………………………………………………… Type and / or extent of the source. ├─level………………………………………………… Hierarchical level of the data specified by the scope. └─levelDescription…………………… Detailed description about the level of the data specified by the scope. ├─attributeInstances…… Attribute instances to which the information applies. ├─attributes………………………… Attributes to which the information applies. ├─dataset………………………………… Dataset to which the information applies. ├─featureInstances………… Feature instances to which the information applies. ├─features……………………………… Features to which the information applies. └─other……………………………………… Class of information that does not fall into the other categories to which the information applies.
According ISO 19115, at least one of #getDescription() and #getSourceExtents() shall be provided.
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
  • castOrCopy
    Returns a SIS metadata implementation with the values of the given arbitrary implementation. This me
  • checkWritePermission
  • copyCollection
  • getScope
    Return the type and / or extent of the source. This information should be provided if the #getDescri
  • getSourceMetadata
    Returns the references to metadata for the source.
  • getSourceSpatialResolution
    Returns the spatial resolution expressed as a scale factor, an angle or a level of detail.
  • isModifiable
  • nonNullCollection
  • setDescription
    Sets a detailed description of the level of the source data.
  • setProcessedLevel
    Sets the processing level of the source data.
  • setScaleDenominator
    Sets the denominator of the representative fraction on a source map. This method stores the value in
  • setProcessedLevel,
  • setScaleDenominator,
  • setScope,
  • setSourceExtents,
  • setSourceSpatialResolution,
  • writeCollection

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JButton (javax.swing)
  • Top Sublime Text plugins
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