Package org.apache.jena.riot

Examples of org.apache.jena.riot.RiotException


            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


                        String suffix = tokenDT.getImage2() ;
                        uriStr = expandPrefixedName(prefix, suffix, tokenDT) ;
                        break ;
                    }
                    default:
                        throw new RiotException("Expected IRI for datatype: "+token) ;
                }
               
                uriStr = resolveIRI(uriStr, tokenDT.getLine(), tokenDT.getColumn()) ;
                RDFDatatype dt = Node.getType(uriStr) ;
                return createTypedLiteral(str, dt, line, col) ;
View Full Code Here

     */
    public static Node parseNode(String nodeString, PrefixMap pmap)
    {
        Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(nodeString) ;
        if ( ! tokenizer.hasNext() )
            throw new RiotException("Empty RDF term") ;
        Token token = tokenizer.next() ;
        Node node = token.asNode(pmap) ;
        if ( node == null )
            throw new RiotException("Bad RDF Term: "+nodeString) ;

        if ( tokenizer.hasNext() )
            throw new RiotException("Trailing characters in string: "+nodeString) ;
        if ( node.isURI() )
        {
            // Lightly test for bad URIs.
            String x = node.getURI() ;
            if ( x.indexOf(' ') >= 0 )
                throw new RiotException("Space(s) in  IRI: "+ nodeString) ;
        }
        return node ;
    }
View Full Code Here

        /** report an error */
        @Override
        public void error(String message, long line, long col)
        {
            logError(message, line, col) ;
            throw new RiotException(fmtMessage(message, line, col)) ;
        }
View Full Code Here

        /** report a fatal error - does not return */
        @Override
        public void fatal(String message, long line, long col)
        {
            logFatal(message, line, col) ;
            throw new RiotException(fmtMessage(message, line, col)) ;
        }
View Full Code Here

        /** report a warning  - do not carry on */
        @Override
        public void warning(String message, long line, long col)
        {
            logWarning(message, line, col) ;
            throw new RiotException(fmtMessage(message, line, col)) ;
        }
View Full Code Here

        /** report an error - do not carry on */
        @Override
        public void error(String message, long line, long col)
        {
            logError(message, line, col) ;
            throw new RiotException(fmtMessage(message, line, col)) ;
        }
View Full Code Here

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

    {
        /** report a warning  - do not carry on */
        @Override
        public void warning(String message, long line, long col)
        {
            throw new RiotException(fmtMessage(message, line, col)) ;
        }
View Full Code Here

       
        /** report an error - do not carry on */
        @Override
        public void error(String message, long line, long col)
        {
            throw new RiotException(fmtMessage(message, line, col)) ;
        }
View Full Code Here

TOP

Related Classes of org.apache.jena.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.