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

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

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

origin: apache/sis

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

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

/**
 * Sets the type of resource and / or extents to which the lineage information applies.
 *
 * @param  newValue  the new type of resource.
 *
 * @since 0.5
 */
public void setScope(final Scope newValue) {
  checkWritePermission();
  scope = newValue;
}
origin: org.apache.sis.storage/sis-netcdf

String value = stringValue(HISTORY);
if (value != null) {
  lineage = new DefaultLineage();
  lineage.setStatement(new SimpleInternationalString(value));
  if (lineage == null) lineage = new DefaultLineage();
  addIfAbsent(lineage.getSources(), new DefaultSource(value));
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

/**
 * Verifies the unmarshalling result.
 */
private static void verify(final DefaultLineage lineage) {
  final Source source = TestUtilities.getSingleton(lineage.getSources());
  assertEquals("source.description", "Description of source data level.", String.valueOf(source.getDescription()));
}
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(Lineage)
 */
public DefaultLineage(final Lineage object) {
  super(object);
  if (object != null) {
    statement               = object.getStatement();
    processSteps            = copyCollection(object.getProcessSteps(), ProcessStep.class);
    sources                 = copyCollection(object.getSources(), Source.class);
    if (object instanceof DefaultLineage) {
      scope                   = ((DefaultLineage) object).getScope();
      additionalDocumentation = copyCollection(((DefaultLineage) object).getAdditionalDocumentation(), Citation.class);
    }
  }
}
origin: apache/sis

/**
 * Adds a general explanation of the data producer's knowledge about the lineage of a dataset.
 * If a statement already exists, the new one will be appended after a new line.
 * Storage location is:
 *
 * <ul>
 *   <li>{@code metadata/resourceLineage/statement}</li>
 * </ul>
 *
 * @param statement  explanation of the data producer's knowledge about the lineage, or {@code null} for no-operation.
 *
 * @see #addProcessDescription(CharSequence)
 */
public final void addLineage(final CharSequence statement) {
  final InternationalString i18n = trim(statement);
  if (i18n != null) {
    final DefaultLineage lineage = lineage();
    lineage.setStatement(append(lineage.getStatement(), i18n));
  }
}
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 = "additionalDocumentation")
  private Collection<Citation> getDocumentation() {
    return FilterByVersion.CURRENT_METADATA.accept() ? getAdditionalDocumentation() : null;
  }
}
origin: apache/sis

addIfNotPresent(lineage().getSources(), source);
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(Lineage)
 */
public DefaultLineage(final Lineage object) {
  super(object);
  if (object != null) {
    statement               = object.getStatement();
    processSteps            = copyCollection(object.getProcessSteps(), ProcessStep.class);
    sources                 = copyCollection(object.getSources(), Source.class);
    if (object instanceof DefaultLineage) {
      scope                   = ((DefaultLineage) object).getScope();
      additionalDocumentation = copyCollection(((DefaultLineage) object).getAdditionalDocumentation(), Citation.class);
    }
  }
}
origin: org.apache.sis.storage/sis-storage

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

/**
 * Sets the general explanation of the data producer’s knowledge about the lineage of a dataset.
 *
 * @param  newValue  the new statement.
 */
public void setStatement(final InternationalString newValue) {
  checkWritePermission();
  statement = newValue;
}
origin: apache/sis

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

/**
 * Sets the general explanation of the data producer’s knowledge about the lineage of a dataset.
 *
 * @param  newValue  the new statement.
 */
public void setStatement(final InternationalString newValue) {
  checkWritePermission(statement);
  statement = newValue;
}
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 DefaultLineage}, then it is returned unchanged.</li>
 *   <li>Otherwise a new {@code DefaultLineage} instance is created using the
 *       {@linkplain #DefaultLineage(Lineage) 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 DefaultLineage castOrCopy(final Lineage object) {
  if (object == null || object instanceof DefaultLineage) {
    return (DefaultLineage) object;
  }
  return new DefaultLineage(object);
}
origin: apache/sis

/**
 * Sets the type of resource and / or extents to which the lineage information applies.
 *
 * @param  newValue  the new type of resource.
 *
 * @since 0.5
 */
public void setScope(final Scope newValue) {
  checkWritePermission(scope);
  scope = newValue;
}
org.apache.sis.metadata.iso.lineageDefaultLineage

Javadoc

Information about the events or source data used in constructing the data specified by the scope or lack of knowledge about lineage. The following properties are mandatory or conditional (i.e. mandatory under some circumstances) in a well-formed metadata according ISO 19115:
LI_Lineage ├─statement…………………………………………………………… General explanation of the data producer's knowledge about the lineage of a dataset. ├─processStep……………………………………………………… Information about an event in the creation process for the data specified by the scope. │ └─description…………………………………………… Description of the event, including related parameters or tolerances. └─source…………………………………………………………………… Information about the source data used in creating the data specified by the scope. ├─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.
At least one of #getStatement, #getProcessSteps()and #getSources() 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
  • getSources
    Returns information about the source data used in creating the data specified by the scope.
  • setStatement
    Sets the general explanation of the data producer’s knowledge about the lineage of a dataset.
  • castOrCopy
    Returns a SIS metadata implementation with the values of the given arbitrary implementation. This me
  • checkWritePermission
  • copyCollection
  • getAdditionalDocumentation
    Returns additional documentation.
  • getProcessSteps
    Returns the information about about events in the life of a resource specified by the scope.
  • getScope
    Returns the type of resource and / or extents to which the lineage information applies.
  • getStatement
    Returns the general explanation of the data producer's knowledge about the lineage of a dataset. Can
  • nonNullCollection
  • writeCollection
  • nonNullCollection,
  • writeCollection

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • Menu (java.awt)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top plugins for Android Studio
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