Package org.geotools.validation.xml

Examples of org.geotools.validation.xml.ValidationException


    }
    //ensure that a plugin is present
    if (plugin == null) {
      String errorMsg = "Validation plugin '"+validation.getName()+"' not found"; //$NON-NLS-1$ //$NON-NLS-2$
      MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),"Problem Occurred", errorMsg); //$NON-NLS-1$
      ValidationPlugin.log(errorMsg, new ValidationException());
      return;
    }
    //create a testDTO containing the new validation test and args
    TestDTO newTest = new TestDTO();
    //set the name, desc, plugin, and args
View Full Code Here


              try {
                property.getWriteMethod().invoke(validation,
                      new Object[] { arg.getValue() });
              } catch (IllegalArgumentException e) {
                String val = arg.getValue() == null? arg.getValue().toString():"null"; //$NON-NLS-1$
                  throw new ValidationException("test failed to configure " //$NON-NLS-1$
                      + validation.getClass().getSimpleName() + " " + arg.getName()+ " "+val, e); //$NON-NLS-1$ //$NON-NLS-2$
              } catch (IllegalAccessException e) {
            String val = arg.getValue() == null? arg.getValue().toString():"null"; //$NON-NLS-1$
            throw new ValidationException("test failed to configure " //$NON-NLS-1$
              + validation.getClass().getSimpleName() + " " + arg.getName()+ " "+val, e); //$NON-NLS-1$ //$NON-NLS-2$
              } catch (InvocationTargetException e) {
            String val = arg.getValue() == null? arg.getValue().toString():"null"; //$NON-NLS-1$
            throw new ValidationException("test failed to configure " //$NON-NLS-1$
              + validation.getClass().getSimpleName() + " " + arg.getName()+ " "+val, e); //$NON-NLS-1$ //$NON-NLS-2$
              }
        }
      }
    }
View Full Code Here

    public PlugIn(String name, Class type, String description, Map config)
        throws ValidationException {
        if ((type == null)
                || (!Validation.class.isAssignableFrom(type)
                && type.isInterface())) {
            throw new ValidationException("Not a validation test '" + name
                + "' plugIn:" + type);
        }

        try {
            beanInfo = Introspector.getBeanInfo(type);
        } catch (Exception e) {
            e.printStackTrace();
            throw new ValidationException("Could not use the '" + name
                + "' plugIn:" + type.getName());
        }

        if (config != null) {
            defaults = transArgs(config);
View Full Code Here

        Constructor create;

        try {
            create = type.getConstructor(new Class[0]);
        } catch (SecurityException e) {
            throw new ValidationException("Could not create '" + plugInName
                + "' as " + type.getName(), e);
        } catch (NoSuchMethodException e) {
            throw new ValidationException("Could not create '" + plugInName
                + "' as " + type.getName(), e);
        } catch (IllegalArgumentException e) {
            throw new ValidationException("Could not create '" + plugInName
                + "' as " + type.getName(), e);
        }

        Validation validate;

        try {
            validate = (Validation) create.newInstance(new Object[0]);
        } catch (InstantiationException e) {
            throw new ValidationException("Could not create '" + name
                + "' as plugIn " + plugInName, e);
        } catch (IllegalAccessException e) {
            throw new ValidationException("Could not create '" + name
                + "' as plugIn " + plugInName, e);
        } catch (InvocationTargetException e) {
            throw new ValidationException("Could not create '" + name
                + "' as plugIn " + plugInName, e);
        }

        validate.setName(name);
        validate.setDescription(description);
View Full Code Here

            try {
                property.getWriteMethod().invoke(bean,
                    new Object[] { entry.getValue() });
            } catch (IllegalArgumentException e) {
              String val = entry.getValue() == null? entry.getValue().toString():"null";
                throw new ValidationException("test failed to configure "
                    + plugInName + " " + entry.getKey()+ " "+val, e);
            } catch (IllegalAccessException e) {
        String val = entry.getValue() == null? entry.getValue().toString():"null";
        throw new ValidationException("test failed to configure "
          + plugInName + " " + entry.getKey()+ " "+val, e);
            } catch (InvocationTargetException e) {
        String val = entry.getValue() == null? entry.getValue().toString():"null";
        throw new ValidationException("test failed to configure "
          + plugInName + " " + entry.getKey()+ " "+val, e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.geotools.validation.xml.ValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.