Package com.hp.hpl.jena.n3.turtle

Examples of com.hp.hpl.jena.n3.turtle.Turtle2NTriples


    IRIResolver resolver = new IRIResolver() ;
   
    protected String getBaseURI()       { return resolver.getBaseIRI() ; }
    public void setBaseURI(String u)
    {
        resolver = new IRIResolver(u) ;
    }
View Full Code Here


    this.reader = new BufferedReader(reader);
  }
 
  public TranslationTableParser(String url) {
    try {
      this.url = new IRIResolver().resolve(url);;
      this.reader = new BufferedReader(new FileReader(new File(new URI(this.url))));
    } catch (FileNotFoundException fnfex) {
      throw new D2RQException("File not found at URL: " + this.url);
    } catch (URISyntaxException usynex) {
      throw new D2RQException("Malformed URI: " + this.url);
View Full Code Here

    IRIResolver resolver = new IRIResolver() ;
   
    protected String getBaseURI()       { return resolver.getBaseIRI() ; }
    public void setBaseURI(String u)
    {
        resolver = new IRIResolver(u) ;
    }
View Full Code Here

        {
            // Sort out the baseURI - if that fails, dump in a dummy one and continue.
            try { baseURI = IRIResolver.chooseBaseURI(baseURI) ; }
            catch (Exception ex)
            { baseURI = "http://localhost/defaultBase#" ; }
            request.setResolver(new IRIResolver(baseURI)) ;
        }
       
        return parser ;
    }
View Full Code Here

            // Sort out the baseURI - if that fails, dump in a dummy one and continue.
            try { baseURI = IRIResolver.chooseBaseURI(baseURI) ; }
            catch (Exception ex)
            { baseURI = "http://localhost/defaultBase#" ; }
   
            query.setResolver(new IRIResolver(baseURI)) ;
        }
        return parser.parse(query, queryString) ;
    }
View Full Code Here

    public void usePrologueFrom(Prologue other)
    {
        prefixMap = new PrefixMapping2(other.prefixMap) ;
        seenBaseURI = false ;
        if ( other.resolver != null )
            resolver = new IRIResolver(other.resolver.getBaseIRI()) ;
    }
View Full Code Here

        // New prefix mappings
        PrefixMapping ext = getPrefixMapping() ;
        if ( newMappings != null )
            ext = new PrefixMapping2(ext, newMappings) ;
        // New base.
        IRIResolver r = resolver ;
        if ( base != null )
            r = new IRIResolver(base) ;
        return new Prologue(ext, r) ;
    }
View Full Code Here

     * @param baseURI The baseURI to set.
     */
    public void setBaseURI(String baseURI)
    {
        this.seenBaseURI = true ;
        this.resolver = new IRIResolver(baseURI) ;
    }
View Full Code Here

        return ts ;
    }
   
    public void testBase1()
    {
        IRIResolver resolver = new IRIResolver() ;
        assertNotNull(resolver.getBaseIRI()) ;
        String base = resolver.getBaseIRI() ;
        assertTrue(base.indexOf(':') > 0 ) ;
    }
View Full Code Here

        assertTrue(base.indexOf(':') > 0 ) ;
    }
   
    public void testBase2()
    {
        IRIResolver resolver = new IRIResolver("x") ;
        assertNotNull(resolver.getBaseIRI()) ;
        // Active when IRI library integrated - currently the resolver takes a raw base string.
//        String base = resolver.getBaseIRI() ;
//        assertTrue(base.indexOf(':') > 0 ) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.n3.turtle.Turtle2NTriples

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.