Package org.restlet.ext.rdf.internal.turtle

Examples of org.restlet.ext.rdf.internal.turtle.Token


                blankNode.getLexicalUnits().add(
                        new ListToken(this, getContext()));
                break;
            case '<':
                if (step() == '=') {
                    blankNode.getLexicalUnits().add(new Token("<="));
                    step();
                    discard();
                } else {
                    stepBack();
                    blankNode.getLexicalUnits().add(
                            new UriToken(this, getContext()));
                }
                break;
            case '_':
                blankNode.getLexicalUnits().add(
                        new BlankNodeToken(parseToken()));
                break;
            case '"':
                blankNode.getLexicalUnits().add(
                        new StringToken(this, getContext()));
                break;
            case '[':
                blankNode.getLexicalUnits().add(
                        new BlankNodeToken(this, getContext()));
                break;
            case '!':
                blankNode.getLexicalUnits().add(new Token("!"));
                step();
                discard();
                break;
            case '^':
                blankNode.getLexicalUnits().add(new Token("^"));
                step();
                discard();
                break;
            case '=':
                if (step() == '>') {
                    blankNode.getLexicalUnits().add(new Token("=>"));
                    step();
                    discard();
                } else {
                    blankNode.getLexicalUnits().add(new Token("="));
                    discard();
                }
                break;
            case '@':
                // Remove the leading '@' character.
                step();
                discard();
                blankNode.getLexicalUnits().add(new Token(this, getContext()));
                discard();
                break;
            case ';':
                step();
                discard();
                blankNode.getLexicalUnits().add(new Token(";"));
                break;
            case ',':
                step();
                discard();
                blankNode.getLexicalUnits().add(new Token(","));
                break;
            case '#':
                parseComment();
                break;
            case '{':
                blankNode.getLexicalUnits().add(
                        new FormulaToken(this, getContext()));
                break;
            case ']':
                break;
            default:
                if (!isEndOfFile(getChar())) {
                    blankNode.getLexicalUnits().add(
                            new Token(this, getContext()));
                }
                break;
            }
        } while (!isEndOfFile(getChar()) && getChar() != ']');
        if (getChar() == ']') {
View Full Code Here


                listToken.getLexicalUnits().add(
                        new ListToken(this, getContext()));
                break;
            case '<':
                if (step() == '=') {
                    listToken.getLexicalUnits().add(new Token("<="));
                    step();
                    discard();
                } else {
                    stepBack();
                    listToken.getLexicalUnits().add(
                            new UriToken(this, getContext()));
                }
                break;
            case '_':
                listToken.getLexicalUnits().add(
                        new BlankNodeToken(this.parseToken()));
                break;
            case '"':
                listToken.getLexicalUnits().add(
                        new StringToken(this, getContext()));
                break;
            case '[':
                listToken.getLexicalUnits().add(
                        new BlankNodeToken(this, getContext()));
                break;
            case '{':
                listToken.getLexicalUnits().add(
                        new FormulaToken(this, getContext()));
                break;
            case ')':
                break;
            default:
                if (!isEndOfFile(getChar())) {
                    listToken.getLexicalUnits().add(
                            new Token(this, getContext()));
                }
                break;
            }
        } while (!isEndOfFile(getChar()) && getChar() != ')');
        if (getChar() == ')') {
View Full Code Here

            case '(':
                lexicalUnits.add(new ListToken(this, context));
                break;
            case '<':
                if (step() == '=') {
                    lexicalUnits.add(new Token("<="));
                    step();
                    discard();
                } else {
                    stepBack();
                    lexicalUnits.add(new UriToken(this, context));
                }
                break;
            case '_':
                lexicalUnits.add(new BlankNodeToken(parseToken()));
                break;
            case '"':
                lexicalUnits.add(new StringToken(this, context));
                break;
            case '[':
                lexicalUnits.add(new BlankNodeToken(this, context));
                break;
            case '!':
                lexicalUnits.add(new Token("!"));
                step();
                discard();
                break;
            case '^':
                lexicalUnits.add(new Token("^"));
                step();
                discard();
                break;
            case '=':
                if (step() == '>') {
                    lexicalUnits.add(new Token("=>"));
                    step();
                    discard();
                } else {
                    lexicalUnits.add(new Token("="));
                    discard();
                }
                break;
            case '@':
                // Remove the leading '@' character.
                step();
                discard();
                lexicalUnits.add(new Token(this, context));
                discard();
                break;
            case ';':
                step();
                discard();
                lexicalUnits.add(new Token(";"));
                break;
            case ',':
                step();
                discard();
                lexicalUnits.add(new Token(","));
                break;
            case '{':
                lexicalUnits.add(new FormulaToken(this, context));
                break;
            case '#':
                parseComment();
                break;
            case '.':
                break;
            default:
                if (!isEndOfFile(getChar())) {
                    lexicalUnits.add(new Token(this, context));
                }
                break;
            }
        } while (!isEndOfFile(getChar()) && getChar() != '.'
                && getChar() != '}');
View Full Code Here

TOP

Related Classes of org.restlet.ext.rdf.internal.turtle.Token

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.