quality.getReports().add(report);
quality.getReports().add(report);
/** * 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()); } } }
/** * 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()); } } }