Examples of IRIFactory


Examples of org.apache.jena.iri.IRIFactory

    IRI back = base.resolve(rel);
    assertEquals(frag,back);
  }

  public void testRelativizeFrag2() {
    IRIFactory f = IRIFactory.jenaImplementation();
    IRI base = f.create("http://example.org/somefolder/mybase.rdf");
    IRI frag = f.create("http://example.org/#foo");
    IRI rel = base.relativize(frag);
    assertEquals("/#foo",rel.toString());
    IRI back = base.resolve(rel);
    assertEquals(frag,back);
  }
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

    IRI back = base.resolve(rel);
    assertEquals(frag,back);
  }
 
  public void testXPointer() {
    IRIFactory f = IRIFactory.jenaImplementation();
    IRI base = f.create("http://example.org/");
    IRI frag = base.resolve("http://eg.com/test.txt#xpointer(/unit[5])");
    Iterator<Violation> it = frag.violations(false);
        assertTrue(it.hasNext()) ;

//    while (it.hasNext()) {
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

//      System.err.println(it.next().getLongMessage());
//    }
   
  }
  public void testNotIDN() {
    IRIFactory f = IRIFactory.jenaImplementation();
    IRI base = f.create("http://example.org/");
    IRI frag = base.resolve("outbind://4-00000000C45F478BF9F2A048A7A59DE"+
        "3AE35F7230700D3E3AEE226D20A49A390BCD779EC5D4700"+
        "00003DB3650000D3E3AEE226D20A49A390BCD779EC5D470"+
          "00001182DB0000/www.uconnectevent.org");
    Iterator <Violation>it = frag.violations(false);
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

        else
            runTestSpec();
    }

    private void runTestJustSpec() {
        IRIFactory f =
            specs[specID].isSchemeSpec()?
                    IRIFactory.iriImplementation():
                    all[specID][Force.MUST];
       
        IRI iri = f.create(uri);
        if (iri.hasViolation(false)) {
            if (good) fail("Unexpected violation found: "+
            ((iri.violations(false).next())).codeName()
           
            );
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

    }

 

    private void runTestErrorCode() {
        IRIFactory f = new IRIFactory();
        f.setIsError(violation.getCode(), true);

        runTest(f,
                true,
                false,
                "Just this error");
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

        else
            runTestSpec();
    }

    private void runTestJustSpec() {
        IRIFactory f =
            specs[specID].isSchemeSpec()?
                    IRIFactory.iriImplementation():
                    all[specID][Force.MUST];
       
        IRI iri = f.create(uri);
        if (iri.hasViolation(false)) {
            if (good) fail("Unexpected violation found: "+
            ((iri.violations(false).next())).codeName()
           
            );
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

    }

 

    private void runTestErrorCode() {
        IRIFactory f = new IRIFactory();
        f.setIsError(violation.getCode(), true);

        runTest(f,
                true,
                false,
                "Just this error");
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

        return new JUnit4TestAdapter(Additional.class) ;
    }
   
    @Test public void relDotSlash1() throws MalformedURLException
    {
       IRIFactory f = IRIFactory.iriImplementation() ;
       IRI iri = f.construct("http://a/b/c/dddd;pppp?qqqqq") ;
       IRI iri2 = iri.resolve("./") ;
       test(iri2, "http://a/b/c/") ;
    }
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

       test(iri2, "http://a/b/c/") ;
    }
   
    @Test public void relDotSlash2() throws MalformedURLException
    {
       IRIFactory f = IRIFactory.iriImplementation() ;
       IRI iri = f.construct("http://a/b/c/dddd;pppp?qqqqq") ;
       IRI iri2 = iri.resolve("./foo") ;
       test(iri2, "http://a/b/c/foo") ;
    }
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

            }
        }
       
        if ( str.equals("IRI-RULES") )
        {
            IRIFactory old = options.getIRIFactory() ;
            if ( v.equals("STRICT") )   { options.setIRIFactory(IRIFactory.semanticWebImplementation()) ; }
            else if ( v.equals("IRI") ) { options.setIRIFactory(IRIFactory.iriImplementation()) ; }
            else if ( v.equals("LAX") ) { options.setIRIFactory(IRIFactory.jenaImplementation()) ; }
            else
                eh.error(new IllegalArgumentException(
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.