Package org.openjena.riot

Examples of org.openjena.riot.RiotException


    static Token create(String s)
    {
        PeekReader pr = PeekReader.readString(s) ;
        TokenizerText tt = new TokenizerText(pr) ;
        if ( ! tt.hasNext() )
            throw new RiotException("No token") ;
        Token t = tt.next() ;
        if ( tt.hasNext() )
            throw new RiotException("Extraneous charcaters") ;
        return t ;
    }
View Full Code Here


            case INTEGER:   return Node.createLiteral(tokenImage, null, XSDDatatype.XSDinteger) ;
            case LITERAL_DT :
            {
                Node n = getSubToken().asNode();
                if ( ! n.isURI() )
                    throw new RiotException("Invalid token: "+this) ;
                RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName(n.getURI()) ;
                return Node.createLiteral(tokenImage, null, dt;
            }
            case LITERAL_LANG : return Node.createLiteral(tokenImage, tokenImage2, null;
            case STRING:
View Full Code Here

        if ( lang == null )
            lang = Lang.RDFXML ;
        String name = mapLangToWriterName.get(lang) ;
       
        if ( name == null )
            throw new RiotException("Not a triples language: "+lang) ;
        return dummy.getWriter(name) ;
    }
View Full Code Here

            outStream.println("<p>Line and column numbers refer to original input</p>") ;
            outStream.println("<p>&nbsp;</p>") ;
            try {
                LangRIOT parser = setupParser(tokenizer, language, errorHandler, outStream) ;
                startFixed(outStream) ;
                RiotException exception = null ;
                try {
                    parser.parse() ;
                    System.out.flush() ;
                    System.err.flush() ;
                } catch (RiotException ex) { exception = ex ; }
View Full Code Here

            public void send(Quad quad)
            {
                super.send(quad) ;
                count++ ;
                if ( count > LIMIT )
                    throw new RiotException("Limit exceeded") ;
            }
        } ;
        // Language?
        LangRIOT parser = RiotReader.createParserQuads(tokenizer, language, null, sink) ;
        // Don't resolve IRIs.  Do checking.
View Full Code Here

        public void error(String message, long line, long col)
        { output(message, line, col, "Error", "error") ; }
   
        @Override
        public void fatal(String message, long line, long col)
        { output(message, line, col, "Fatal", "error") ; throw new RiotException(fmtMessage(message, line, col)) ; }
View Full Code Here

                bw.write(" ") ;
            }
            bw.write(".\n") ;
        } catch (IOException ex)
        {
            throw new RiotException(ex) ;
        }
    }
View Full Code Here

    @Override
    public void send(T thing)
    {
        count++ ;
        if ( count > limit )
            throw new RiotException("Limit "+limit+" exceeded") ;
        super.send(thing) ;
    }
View Full Code Here

TOP

Related Classes of org.openjena.riot.RiotException

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.