Package org.openjena.riot.tokens

Examples of org.openjena.riot.tokens.Tokenizer


        }
        int newSize = 0;
        // We always read one extra line, which lies outside the upper split limit i.e. (end - 1)
        while (getFilePosition() <= end) {
            newSize = in.readLine(value, maxLineLength, Math.max(maxBytesToConsume(pos), maxLineLength));
            Tokenizer tokenizer = TokenizerFactory.makeTokenizerASCII(value.toString()) ;
            LangNQuads parser = new LangNQuads(tokenizer, profile, null) ;
            if ( parser.hasNext() ) {
                quad = new QuadWritable(parser.next());
            }
            if (newSize == 0) {
View Full Code Here


    @Override
    public void readFields(DataInput in) throws IOException {
        length = WritableUtils.readVInt(in);
        bytes = new byte[length];
        in.readFully(bytes, 0, length);
        Tokenizer tokenizer = TokenizerFactory.makeTokenizerASCII(new String(bytes)) ;
        LangNQuads parser = new LangNQuads(tokenizer, RiotLib.profile(Lang.NQUADS, null), null) ;
        quad = parser.next();
    }
View Full Code Here

        counters.close();
    }

    private static Node parse(String string) {
      ParserProfile profile = RiotLib.profile(Lang.NQUADS, null, null) ;
        Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(string) ;
        if ( ! tokenizer.hasNext() )
            return null ;
        Token t = tokenizer.next();
        Node n = profile.create(null, t) ;
        if ( tokenizer.hasNext() )
            Log.warn(RiotLib.class, "String has more than one token in it: "+string) ;
        return n ;
    }
View Full Code Here

TOP

Related Classes of org.openjena.riot.tokens.Tokenizer

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.