/** * Sets the date or range of dates on which a data quality measure was applied. * The collection size is 1 for a single date, or 2 for a range. * * @param newValues the new dates, or {@code null}. */ public void setDates(final Collection<? extends Date> newValues) { checkWritePermission(); if (newValues != dates) { // Mandatory check for avoiding the call to 'dates.clear()'. writeDates(newValues); } }
/** * Sets the date or range of dates on which a data quality measure was applied. * The collection size is 1 for a single date, or 2 for a range. * * @param newValues the new dates, or {@code null}. */ public void setDates(final Collection<? extends Date> newValues) { if (newValues != dates) { // Mandatory check for avoiding the call to 'dates.clear()'. checkWritePermission(valueIfDefined(dates)); writeDates(newValues); } }
/** * 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(Element) */ public AbstractElement(final Element object) { super(object); if (object != null) { namesOfMeasure = copyCollection(object.getNamesOfMeasure(), InternationalString.class); measureIdentification = object.getMeasureIdentification(); measureDescription = object.getMeasureDescription(); evaluationMethodType = object.getEvaluationMethodType(); evaluationMethodDescription = object.getEvaluationMethodDescription(); evaluationProcedure = object.getEvaluationProcedure(); results = copyCollection(object.getResults(), Result.class); writeDates(object.getDates()); } }
/** * 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(Element) */ public AbstractElement(final Element object) { super(object); if (object != null) { namesOfMeasure = copyCollection(object.getNamesOfMeasure(), InternationalString.class); measureIdentification = object.getMeasureIdentification(); measureDescription = object.getMeasureDescription(); evaluationMethodType = object.getEvaluationMethodType(); evaluationMethodDescription = object.getEvaluationMethodDescription(); evaluationProcedure = object.getEvaluationProcedure(); results = copyCollection(object.getResults(), Result.class); writeDates(object.getDates()); } }