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

How to use
DefaultDataQuality
in
org.apache.sis.metadata.iso.quality

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

origin: org.apache.sis.core/sis-feature

/**
 * Creates a new validator.
 *
 * @param scope  {@code FEATURE} if the object to validate is a feature, or
 *               {@code ATTRIBUTE} for an attribute, or {@code null} otherwise.
 */
Validator(final ScopeCode scope) {
  quality = new DefaultDataQuality();
  if (scope != null) {
    quality.setScope(new DefaultScope(scope));
  }
}
origin: org.apache.sis.core/sis-metadata

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

  /**
   * Sets the non-quantitative quality information about the lineage of the data specified by the scope.
   *
   * @param  newValue  the new lineage.
   */
  public void setLineage(final Lineage newValue) {
    checkWritePermission(lineage);
    lineage = newValue;
  }
}
origin: org.apache.sis.storage/sis-netcdf

final DefaultDataQuality quality = new DefaultDataQuality(ScopeCode.DATASET);
quality.setLineage(lineage);
addIfAbsent(metadata.getDataQualityInfo(), quality);
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 DefaultDataQuality}, then it is returned unchanged.</li>
 *   <li>Otherwise a new {@code DefaultDataQuality} instance is created using the
 *       {@linkplain #DefaultDataQuality(DataQuality) 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 DefaultDataQuality castOrCopy(final DataQuality object) {
  if (object == null || object instanceof DefaultDataQuality) {
    return (DefaultDataQuality) object;
  }
  return new DefaultDataQuality(object);
}
origin: apache/sis

quality.getReports().add(report);
origin: apache/sis

/**
 * Returns the quantitative quality information for the data specified by the scope.
 *
 * @return quantitative quality information for the data.
 */
@Override
@XmlElement(name = "report", required = true)
public Collection<Element> getReports() {
  return reports = nonNullCollection(reports, Element.class);
}
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(DataQuality)
 */
public DefaultDataQuality(final DataQuality object) {
  super(object);
  if (object != null) {
    scope   = object.getScope();
    reports = copyCollection(object.getReports(), Element.class);
    lineage = object.getLineage();
  }
}
origin: apache/sis

  /**
   * Evaluates the quality of this attribute with a custom rule.
   */
  @Override
  public DataQuality quality() {
    final DefaultDataQuality        quality = (DefaultDataQuality) super.quality();
    final DefaultDomainConsistency  report  = new DefaultDomainConsistency();
    final DefaultQuantitativeResult result  = new DefaultQuantitativeResult();
    result.setErrorStatistic(new SimpleInternationalString(ADDITIONAL_QUALITY_INFO));
    report.setMeasureIdentification(NamedIdentifier.castOrCopy(getName()));
    report .setResults(singleton(result));
    quality.setReports(singleton(report));
    return quality;
  }
}
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 DefaultDataQuality}, then it is returned unchanged.</li>
 *   <li>Otherwise a new {@code DefaultDataQuality} instance is created using the
 *       {@linkplain #DefaultDataQuality(DataQuality) 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 DefaultDataQuality castOrCopy(final DataQuality object) {
  if (object == null || object instanceof DefaultDataQuality) {
    return (DefaultDataQuality) object;
  }
  return new DefaultDataQuality(object);
}
origin: org.apache.sis.core/sis-feature

quality.getReports().add(report);
origin: org.apache.sis.core/sis-metadata

/**
 * Returns the quantitative quality information for the data specified by the scope.
 *
 * @return quantitative quality information for the data.
 */
@Override
@XmlElement(name = "report")
public Collection<Element> getReports() {
  return reports = nonNullCollection(reports, Element.class);
}
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(DataQuality)
 */
public DefaultDataQuality(final DataQuality object) {
  super(object);
  if (object != null) {
    scope   = object.getScope();
    reports = copyCollection(object.getReports(), Element.class);
    lineage = object.getLineage();
  }
}
origin: apache/sis

/**
 * Creates a new validator.
 *
 * @param scope  {@code FEATURE} if the object to validate is a feature, or
 *               {@code ATTRIBUTE} for an attribute, or {@code null} otherwise.
 */
Validator(final ScopeCode scope) {
  quality = new DefaultDataQuality();
  if (scope != null) {
    quality.setScope(new DefaultScope(scope));
  }
}
origin: org.apache.sis.core/sis-metadata

/**
 * Sets the specific data to which the data quality information applies.
 *
 * @param  newValue  the new scope.
 */
public void setScope(final Scope newValue) {
  checkWritePermission();
  scope = newValue;
}
origin: apache/sis

/**
 * Implementation of {@link AbstractFeature#quality()}, also shared by {@link Features} static method.
 *
 * @param type     the type of the {@code feature} argument, provided explicitly for protecting from user overriding.
 * @param feature  the feature to validate.
 */
void validate(final FeatureType type, final AbstractFeature feature) {
  for (final AbstractIdentifiedType pt : type.getProperties(true)) {
    final Object property = feature.getProperty(pt.getName().toString());
    final DataQuality pq;
    if (property instanceof AbstractAttribute<?>) {
      pq = ((AbstractAttribute<?>) property).quality();
    } else if (property instanceof AbstractAssociation) {
      pq = ((AbstractAssociation) property).quality();
    } else if (property instanceof AbstractAttribute<?>) {
      validate(((AbstractAttribute<?>) property).getType(), ((AbstractAttribute<?>) property).getValues());
      continue;
    } else if (property instanceof AbstractAssociation) {
      validate(((AbstractAssociation) property).getRole(), ((AbstractAssociation) property).getValues());
      continue;
    } else {
      continue;
    }
    if (pq != null) {                                          // Should not be null, but let be safe.
      quality.getReports().addAll(pq.getReports());
    }
  }
}
origin: apache/sis

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

  /**
   * Sets the non-quantitative quality information about the lineage of the data specified by the scope.
   *
   * @param  newValue  the new lineage.
   */
  public void setLineage(final Lineage newValue) {
    checkWritePermission();
    lineage = newValue;
  }
}
origin: org.apache.sis.core/sis-feature

/**
 * Implementation of {@link AbstractFeature#quality()}, also shared by {@link Features} static method.
 *
 * @param type     the type of the {@code feature} argument, provided explicitely for protecting from user overriding.
 * @param feature  the feature to validate.
 */
void validate(final FeatureType type, final AbstractFeature feature) {
  for (final AbstractIdentifiedType pt : type.getProperties(true)) {
    final Object property = feature.getProperty(pt.getName().toString());
    final DataQuality pq;
    if (property instanceof AbstractAttribute<?>) {
      pq = ((AbstractAttribute<?>) property).quality();
    } else if (property instanceof AbstractAssociation) {
      pq = ((AbstractAssociation) property).quality();
    } else if (property instanceof AbstractAttribute<?>) {
      validate(((AbstractAttribute<?>) property).getType(), ((AbstractAttribute<?>) property).getValues());
      continue;
    } else if (property instanceof AbstractAssociation) {
      validate(((AbstractAssociation) property).getRole(), ((AbstractAssociation) property).getValues());
      continue;
    } else {
      continue;
    }
    if (pq != null) {                                          // Should not be null, but let be safe.
      quality.getReports().addAll(pq.getReports());
    }
  }
}
origin: apache/sis

/**
 * Sets the specific data to which the data quality information applies.
 *
 * @param  newValue  the new scope.
 */
public void setScope(final Scope newValue) {
  checkWritePermission(scope);
  scope = newValue;
}
org.apache.sis.metadata.iso.qualityDefaultDataQuality

Javadoc

Quality information for the data specified by a data quality scope. The following properties are mandatory in a well-formed metadata according ISO 19115:
DQ_DataQuality └─scope……………… The specific data to which the data quality information applies. └─level…… Hierarchical level of the data specified by the scope.
In addition, ISO requires that at least one of #getLineage()and #getReports() is provided. Those properties are declared org.opengis.annotation.Obligation#CONDITIONAL.
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>
    Creates a data quality initialized to the given scope.
  • castOrCopy
    Returns a SIS metadata implementation with the values of the given arbitrary implementation. This me
  • checkWritePermission
  • copyCollection
  • getReports
    Returns the quantitative quality information for the data specified by the scope.
  • nonNullCollection
  • setLineage
    Sets the non-quantitative quality information about the lineage of the data specified by the scope.
  • setReports
    Sets the quantitative quality information for the data specified by the scope.
  • setScope
    Sets the specific data to which the data quality information applies.
  • writeCollection

Popular in Java

  • Updating database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Collectors (java.util.stream)
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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