Feature Validator Runner custom Java class extension

This sample demonstrates how to create, deploy, and use a custom class extension tool in Java. The class extension featured in this sample is associated with a new feature class and is used to validate features that are added to the feature class. For example, an e-mail address must adhere to a certain pattern (<email_id>@<domain.com>). If the editor adds a feature that has an e-mail address that does not follow this pattern, the class extension outputs appropriate error messages indicating violation of the pattern.
This sample creates a file geodatabase (GDB) and a feature class inside the file GDB. The output is a message returned by the class extension. This sample can be modified to test invalid e-mail addresses, and the validator will output appropriate messages. No message is returned by the class extension if the correct pattern for the e-mail ID is provided.

How to use

See How to use ArcGIS samples for help on running the sample.

Deploy extension to ArcGIS Desktop
  1. Navigate to this sample's lib folder (featurevalidation/lib) and copy FeatureValidationExt.jar into the <ArcGIS Desktop Install Dir>/java/lib/ext folder to deploy the custom feature class extension. The extension functionality becomes available to you when you start the runner application.
  2. Navigate to this sample's bin folder (featurevalidation/bin) and execute the FeatureValidation.jar to start the application (Eclipse can also be used to execute the application - ValidatorRunner.java).
  3. Review the output messages on the command prompt or in Eclipse's output window.
  4. Use ArcCatalog or ArcMap to review the data in the output location.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

geodatabase/FeatureValidationRunner.java Main class.
geodatabase/classextension/FeatureValidator.java Class extension class.

See Also:

Getting started with class extensions

Additional Requirements
  • ArcGIS Desktop Installation

Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced
Engine Developer Kit