Package org.fcrepo.server.types.gen

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

TOP

Related Classes of org.fcrepo.server.types.gen.Validation

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.