/** * 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 DefaultConformanceResult}, then it is returned unchanged.</li> * <li>Otherwise a new {@code DefaultConformanceResult} instance is created using the * {@linkplain #DefaultConformanceResult(ConformanceResult) 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 DefaultConformanceResult castOrCopy(final ConformanceResult object) { if (object == null || object instanceof DefaultConformanceResult) { return (DefaultConformanceResult) object; } return new DefaultConformanceResult(object); }
/** * 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 DefaultConformanceResult}, then it is returned unchanged.</li> * <li>Otherwise a new {@code DefaultConformanceResult} instance is created using the * {@linkplain #DefaultConformanceResult(ConformanceResult) 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 DefaultConformanceResult castOrCopy(final ConformanceResult object) { if (object == null || object instanceof DefaultConformanceResult) { return (DefaultConformanceResult) object; } return new DefaultConformanceResult(object); }
/** * Creates an positional accuracy initialized to the given result. */ private PositionalAccuracyConstant(final InternationalString measureDescription, final InternationalString evaluationMethodDescription, final boolean pass) { DefaultConformanceResult result = new DefaultConformanceResult(Citations.SIS, evaluationMethodDescription, pass); setResults(Collections.singleton(result)); setMeasureDescription(measureDescription); setEvaluationMethodDescription(evaluationMethodDescription); setEvaluationMethodType(EvaluationMethodType.DIRECT_INTERNAL); transition(State.FINAL); }
/** * Creates an positional accuracy initialized to the given result. */ @SuppressWarnings("OverridableMethodCallDuringObjectConstruction") // Safe because this class is final. private PositionalAccuracyConstant(final InternationalString measureDescription, final InternationalString evaluationMethodDescription, final boolean pass) { DefaultConformanceResult result = new DefaultConformanceResult(Citations.SIS, evaluationMethodDescription, pass); result.freeze(); setResults(Collections.singleton(result)); setMeasureDescription(measureDescription); setEvaluationMethodDescription(evaluationMethodDescription); setEvaluationMethodType(EvaluationMethodType.DIRECT_INTERNAL); freeze(); }
quality.getReports().add(report); report.getResults().add(new DefaultConformanceResult(null, explanation, false)); return report;
quality.getReports().add(report); report.getResults().add(new DefaultConformanceResult(null, explanation, false)); return report;
final DefaultConformanceResult result = new DefaultConformanceResult( descriptor.getName().getAuthority(), EXPLAIN, true); final GeneralParameterValue failure = isValid(value, descriptor, result);