Examples of Validation


Examples of org.apache.sqoop.validation.Validation

*/
public class FrameworkValidator extends Validator {

  @Override
  public Validation validateConnection(Object connectionConfiguration) {
    Validation validation = new Validation(ConnectionConfiguration.class);
    // No validation on connection object
    return validation;
  }
View Full Code Here

Examples of org.apache.xmlbeans.samples.validation.Validation

     */
    public static void main(String[] args)
    {
        // all we're checking for is that the sample doesn't throw anything.
        // a real sample test might assert something more interesting.
        Validation sample = new Validation();
        // Use the validate method to validate an instance after
        // updates.
        boolean isValidAfterChanges = sample.isValidAfterChanges(args[0]);
        assert !isValidAfterChanges;
       
        // Use the VALIDATE_ON_SET option to validate an instance
        // as updates are made.
        boolean isValidOnTheFly = sample.isValidOnTheFly(args[0]);       
        assert !isValidOnTheFly;
    }
View Full Code Here

Examples of org.eweb4j.mvc.action.Validation

      request.setAttribute(f.getName(), value);

    }

    Validation validation = new Validation();
    if (!valError.isEmpty())
      validation.getErrors().put(val.getName(), valError);
   
    return validation;
  }
View Full Code Here

Examples of org.fcrepo.server.storage.types.Validation

            String msg =
                    "DOValidatorXMLSchema returned validation exception.\n"
                            + "The underlying exception was a "
                            + e.getClass().getName() + ".\n"
                            + "The message was " + "\"" + e.getMessage() + "\"";
            Validation validation = new Validation("unknown");
            List<String> problems = new ArrayList<String>();
            problems.add(msg);
            validation.setObjectProblems(problems);
            throw new ObjectValidityException(msg, validation, e);
        } catch (Exception e) {
            String msg =
                    "DOValidatorXMLSchema returned error.\n"
                            + "The underlying error was a "
View Full Code Here

Examples of org.fcrepo.server.types.gen.Validation

                apia.findObjects(TypeUtility.convertStringtoAOS(resultFields), maxResults, query);
        List<ObjectFields> fields = result.getResultList().getObjectFields();
        for (ObjectFields objectFields : fields) {
            String pid = objectFields.getPid().getValue();
            System.out.println("Validating object '" + pid + "'");
            Validation validation = apim.validate(pid, null);
            if (!validation.isValid()) {
                System.out.println("PID " + validation.getPid());
                System.out.println("Valid " + validation.isValid());
                System.out.println("Problems");
                for (String problem : validation.getObjProblems().getProblem()) {
                    System.out.println(problem);
                }
                System.out.println("Datastream Problems");
                for (DatastreamProblem datastreamProblem : validation
                        .getDatastreamProblems().getDatastream()) {
                    System.out.println("DS ID "
                            + datastreamProblem.getDatastreamID());
                    for (String problem : datastreamProblem.getProblem()) {
                        System.out.println(problem);
                    }
                }
            }
            assertTrue(validation.isValid());
        }
    }
View Full Code Here

Examples of org.geotools.validation.Validation

        TestDTO thisTest = null;
        //plugin is selected?
        if (selection instanceof PlugInDTO) {
            // create a new validation test object
            PlugInDTO plugin = (PlugInDTO) selection;
            Validation newTest = null;
            try {
                newTest = processor.createValidation(plugin);
            } catch (Exception e1) {
                // log the exception and return
                MessageDialog
                        .openError(
                                PlatformUI.getWorkbench()
                                        .getActiveWorkbenchWindow()
                                        .getShell(),
                                "Exception Occurred", e1.getClass().toString() + " " + e1.getMessage())//$NON-NLS-1$//$NON-NLS-2$
                ValidationPlugin.log(e1.getMessage(), e1);
                return null;
            }
            // determine which TestSuiteDTO to use (for now, use the default)
            String testSuiteDTOKey = defaultTestSuite;
            // add the validation to the processor (creates a testDTO
            // and adds the validation to the appropriate lookup)
            processor.addValidation(newTest, plugin, testSuiteDTOKey);
            // if a defaultTypeRef exists, set any typeRefs to that value
            if ((defaultTypeRef != null) && defaultTypeRef.length() > 0) {
                thisTest = (TestDTO) processor.getTests().get(newTest.getName());
                Map args = thisTest.getArgs();
                for (Iterator i = args.keySet().iterator(); i.hasNext();) {
                    ArgumentDTO arg = (ArgumentDTO) args.get(i.next());
                    String argName = arg.getName();
                    //is it a typeRef?
View Full Code Here

Examples of org.geotools.validation.Validation

            Object currentItem = i.next();
      something = FVLookup.get(currentItem);
      if (something != null) {
        ArrayList tests = (ArrayList) something;
        for (Object thisTest : tests) {
          Validation thisValidation = (Validation) thisTest;
          if (thisValidation.getName().equalsIgnoreCase(testName)) {
            featureLookup.remove(currentItem);
          }
        }
      }
    }
    //remove from IVLookup
    Map IVLookup = integrityLookup;
    for (Iterator i = IVLookup.keySet().iterator(); i.hasNext();) {
            Object something;
            Object currentItem = i.next();
      something = IVLookup.get(currentItem);
      if (something != null) {
        ArrayList tests = (ArrayList) something;
        for (Object thisTest : tests) {
          Validation thisValidation = (Validation) thisTest;
          if (thisValidation.getName().equalsIgnoreCase(testName)) {
            integrityLookup.remove(currentItem);
          }
        }
      }
    }
View Full Code Here

Examples of org.geotools.validation.Validation

    // (navigate through the featureLookup until we find an instance of the test)
    for (Iterator i = featureLookup.keySet().iterator(); i.hasNext();) {
      ArrayList testList = (ArrayList) featureLookup.get(i.next());
      // iterate through each item in the list
      for (Object thisTest : testList) {
        Validation test = (Validation) thisTest;
        // this is the matching validation for the given test
        if (test.getName().equals(testName)) {
          validator = (FeatureValidation) test;
          break;
        }
      }
    }
View Full Code Here

Examples of org.geotools.validation.Validation

    // (navigate through the featureLookup until we find an instance of the test)
    for (Iterator i = integrityLookup.keySet().iterator(); i.hasNext();) {
      ArrayList testList = (ArrayList) integrityLookup.get(i.next());
      // iterate through each item in the list
      for (Object thisTest : testList) {
        Validation test = (Validation) thisTest;
        // this is the matching validation for the given test
        if (test.getName().equals(testName)) {
          validator = (IntegrityValidation) test;
          break;
        }
      }
    }
View Full Code Here

Examples of org.geotools.validation.Validation

      }
    }   
    //store the complete list of Args for future use (will be overwritten by the latest test creation)
    this.allArgs = newArgs;
    //create a new validation
    Validation validation = plugIn.createValidation(getUniqueName(getTests(), "Test"),dto.getDescription(), newArgs); //$NON-NLS-1$
    return validation;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.