/** * 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; } }
/** * 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()); } } }
/** * 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()); } } }