Examples of violations()


Examples of com.hp.hpl.jena.iri.IRI.violations()

                    all[specID][Force.MUST];
       
        IRI iri = f.create(uri);
        if (iri.hasViolation(false)) {
            if (good) fail("Unexpected violation found: "+
            ((Violation)(iri.violations(false).next())).codeName()
           
            );
        } else {
            if (!good) fail("Expected a violation, none found.");
        }
View Full Code Here

Examples of com.hp.hpl.jena.iri.IRI.violations()

        if (good) {
            expectError = expectWarning = false;
        }
        boolean hasError = false;
        boolean hasWarning = false;
        Iterator it = iri.violations(true);
        while (it.hasNext()) {
            Violation v = (Violation) it.next();
            if (v.getViolationCode() == violation.getCode()) {
                if (v.isError()) {
                    if (!expectError)
View Full Code Here

Examples of com.hp.hpl.jena.iri.IRI.violations()

    private void check(String string) {
        IRI iri = factory.create(string);
        if (iri.hasViolation(true)) {
            System.out.println("n: " + string);
            Iterator it = iri.violations(true);
            while (it.hasNext()) {
                Violation v = (Violation) it.next();
                System.out.println(v.getLongMessage());
            }
        } else {
View Full Code Here

Examples of com.hp.hpl.jena.iri.IRI.violations()

    static public IRIFactory f = IRIFactory.jenaImplementation();
  
    public void runTest() {
        IRI iri = f.create(uri);
        Iterator it = iri.violations(true);
        while (it.hasNext()) {
            Violation v = (Violation) it.next();
            printErrorMessages(v);
           
        }
View Full Code Here

Examples of com.hp.hpl.jena.iri.IRI.violations()

    private void check(String string) {
        IRI iri = factory.create(string);
        if (iri.hasViolation(true)) {
            System.out.println("n: " + string);
            Iterator<Violation> it = iri.violations(true);
            while (it.hasNext()) {
                Violation v = it.next();
                System.out.println(v.getLongMessage());
            }
        } else {
View Full Code Here

Examples of com.hp.hpl.jena.iri.IRI.violations()

   
    static void checkOne(String s)
    {
        IRI iri = IRIFactory.iriImplementation().create(s) ;
        System.out.println(">> "+iri) ;
        for ( Iterator<Violation> iter = iri.violations(true) ; iter.hasNext() ; )
        {
            Violation v = iter.next();
            System.out.println(v.getShortMessage()) ;
        }
        System.out.println("<< "+iri) ;
View Full Code Here

Examples of com.hp.hpl.jena.iri.IRI.violations()

    private void check(String string) {
        IRI iri = factory.create(string);
        if (iri.hasViolation(true)) {
            System.out.println("n: " + string);
            Iterator<Violation> it = iri.violations(true);
            while (it.hasNext()) {
                Violation v = it.next();
                System.out.println(v.getLongMessage());
            }
        } else {
View Full Code Here

Examples of com.hp.hpl.jena.iri.IRI.violations()

            IRI iri = iriFactory.create(iriStr) ;
            System.out.println(iriStr + " ==> "+iri) ;
            if ( iri.isRelative() )
                System.out.println("Relative: "+iri.isRelative()) ;

            Iterator<Violation> vIter = iri.violations(true) ;
            for ( ; vIter.hasNext() ; )
            {
                System.out.println(vIter.next().getShortMessage()) ;
            }
        }
View Full Code Here

Examples of com.hp.hpl.jena.iri.IRI.violations()

        if (demandGoodURIs) {
            IRI iri = factory.create( uri );
           
            if (iri.hasViolation(false) )
            throw new BadURIException( "Only well-formed absolute URIrefs can be included in RDF/XML output: "
                     + (iri.violations(false).next()).getShortMessage());
        }
            
           
        return uri;
    }
View Full Code Here

Examples of com.hp.hpl.jena.iri.IRI.violations()

    {
        IRI iri = IRIFactory.iriImplementation().create(iriStr) ;
        System.out.println(iri) ;
        System.out.println("Relative: "+iri.isRelative()) ;

        Iterator<Violation> vIter = iri.violations(true) ;
        for ( ; vIter.hasNext() ; )
        {
            System.out.println("** "+vIter.next().getShortMessage()) ;
        }
        System.out.println(iriStr + " ==> "+iri) ;
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.