Examples of IRIFactory


Examples of org.apache.jena.iri.IRIFactory

public class iri
{

    public static void main(String[] args)
    {
        IRIFactory iriFactory = IRIFactory.iriImplementation() ;
        iriFactory = IRIResolver.iriFactory ;
       
        boolean first = true ;
        for ( String iriStr : args )
        {
            if ( ! first )
                System.out.println() ;
            first = false ;
           
            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) ;
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

  }
 
  public void testIRIRules_2()
  {
        Model model = ModelFactory.createDefaultModel() ;
      IRIFactory f = ARPOptions.getIRIFactoryGlobal() ;
      try {
          ARPOptions.setIRIFactoryGlobal(IRIFactory.iriImplementation()) ;
          RDFReader r =  model.getReader("RDF/XML") ;
            expected = new int[] { WARN_MALFORMED_URI , WARN_MALFORMED_URI };
          r.setErrorHandler(this);
View Full Code Here

Examples of org.apache.jena.iri.IRIFactory

    super(s);
  }

 
  public void testRelativizeFrag1() {
    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(frag,rel);
//    System.err.println(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 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

    super(s);
  }

 
  public void testRelativizeFrag1() {
    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(frag,rel);
//    System.err.println(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 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
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.