/** * Validates the given transformation. * * @param object the object to validate, or {@code null}. */ public void validate(final Transformation object) { if (object == null) { return; } validateOperation(object); mandatory("Transformation: operationVersion is a mandatory attribute.", object.getOperationVersion()); mandatory("Transformation: sourceCRS is a mandatory attribute.", object.getSourceCRS()); mandatory("Transformation: targetCRS is a mandatory attribute.", object.getTargetCRS()); mandatory("Transformation: MathTransform is a mandatory attribute.", object.getMathTransform()); }
/** * Verifies the properties of the transformation given by {@link #getIdentifiedObject()}. */ private void verifyTransformation() throws FactoryException { final Transformation transformation = getIdentifiedObject(); assertNotNull("Transformation", transformation); validators.validate(transformation); // Transformation identifier. assertContainsCode("Transformation.getIdentifiers()", "EPSG", code, transformation.getIdentifiers()); // Transformation name. if (isStandardNameSupported) { configurationTip = Configuration.Key.isStandardNameSupported; assertEquals("Transformation.getName()", name, getVerifiableName(transformation)); configurationTip = null; } // Operation method. final OperationMethod m = transformation.getMethod(); assertNotNull("Transformation.getMethod()", m); // Operation method name. if (isStandardNameSupported) { configurationTip = Configuration.Key.isStandardNameSupported; assertEquals("Transformation.getMethod().getName()", methodName, getVerifiableName(m)); configurationTip = null; } }
/** * Verifies the properties of the transformation given by {@link #getIdentifiedObject()}. */ private void verifyTransformation() throws FactoryException { final Transformation transformation = getIdentifiedObject(); assertNotNull("Transformation", transformation); validators.validate(transformation); // Transformation identifier. assertContainsCode("Transformation.getIdentifiers()", "EPSG", code, transformation.getIdentifiers()); // Transformation name. if (isStandardNameSupported) { configurationTip = Configuration.Key.isStandardNameSupported; assertEquals("Transformation.getName()", name, getVerifiableName(transformation)); configurationTip = null; } // Operation method. final OperationMethod m = transformation.getMethod(); assertNotNull("Transformation.getMethod()", m); // Operation method name. if (isStandardNameSupported) { configurationTip = Configuration.Key.isStandardNameSupported; assertEquals("Transformation.getMethod().getName()", methodName, getVerifiableName(m)); configurationTip = null; } }
/** * Validates the given transformation. * * @param object The object to validate, or {@code null}. */ public void validate(final Transformation object) { if (object == null) { return; } validateOperation(object); mandatory("Transformation: operationVersion is a mandatory attribute.", object.getOperationVersion()); mandatory("Transformation: sourceCRS is a mandatory attribute.", object.getSourceCRS()); mandatory("Transformation: targetCRS is a mandatory attribute.", object.getTargetCRS()); mandatory("Transformation: MathTransform is a mandatory attribute.", object.getMathTransform()); }