/** * 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 = "reference") private Collection<Citation> getReference() { return FilterByVersion.CURRENT_METADATA.accept() ? getReferences() : 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(ProcessStep) */ public DefaultProcessStep(final ProcessStep object) { super(object); if (object != null) { description = object.getDescription(); rationale = object.getRationale(); stepDateTime = TemporalUtilities.createInstant(object.getDate()); processors = copyCollection(object.getProcessors(), ResponsibleParty.class); sources = copyCollection(object.getSources(), Source.class); outputs = copyCollection(object.getOutputs(), Source.class); processingInformation = object.getProcessingInformation(); reports = copyCollection(object.getReports(), ProcessStepReport.class); if (object instanceof DefaultProcessStep) { references = copyCollection(((DefaultProcessStep) object).getReferences(), Citation.class); scope = ((DefaultProcessStep) object).getScope(); } } }
/** * 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(ProcessStep) */ public DefaultProcessStep(final ProcessStep object) { super(object); if (object != null) { description = object.getDescription(); rationale = object.getRationale(); date = toMilliseconds(object.getDate()); processors = copyCollection(object.getProcessors(), ResponsibleParty.class); sources = copyCollection(object.getSources(), Source.class); outputs = copyCollection(object.getOutputs(), Source.class); processingInformation = object.getProcessingInformation(); reports = copyCollection(object.getReports(), ProcessStepReport.class); if (object instanceof DefaultProcessStep) { references = copyCollection(((DefaultProcessStep) object).getReferences(), Citation.class); scope = ((DefaultProcessStep) object).getScope(); } } }