Package org.jboss.dna.common.text

Examples of org.jboss.dna.common.text.TokenStream$Token


     * @param content the content
     * @throws ParsingException if there is a problem parsing the content
     */
    protected void parse( String content ) {
        Tokenizer tokenizer = new CndTokenizer(false, false);
        TokenStream tokens = new TokenStream(content, tokenizer, false);
        tokens.start();
        while (tokens.hasNext()) {
            // Keep reading while we can recognize one of the two types of statements ...
            if (tokens.matches("<", ANY_VALUE, "=", ANY_VALUE, ">")) {
                parseNamespaceMapping(tokens);
            } else if (tokens.matches("[", ANY_VALUE, "]")) {
                parseNodeTypeDefinition(tokens, outputPath);
            } else {
                Position position = tokens.previousPosition();
                throw new ParsingException(position, CndI18n.expectedNamespaceOrNodeDefinition.text(tokens.consume(),
                                                                                                    position.getLine(),
                                                                                                    position.getColumn()));
            }
        }
    }
View Full Code Here


        this.typeSystem = context;
    }

    public Component parseXPath( String xpath ) {
        Tokenizer tokenizer = new XPathTokenizer(false); // skip comments
        TokenStream tokens = new TokenStream(xpath, tokenizer, true).start(); // case sensitive!!
        return parseXPath(tokens);
    }
View Full Code Here

        return new OrderBySpec(Order.DESCENDING, attributeName);
    }

    protected TokenStream tokenize( String xpath ) {
        Tokenizer tokenizer = new XPathParser.XPathTokenizer(false); // skip comments
        return new TokenStream(xpath, tokenizer, true).start(); // case sensitive!!
    }
View Full Code Here

        client.listTenants(fakeToken);
    }

    private KeystoneAuthenticationToken buildFakeToken(String tokenCode) {
        Access auth = new Access();
        Token tokenObject = new Token();
        tokenObject.setId(tokenCode);
        auth.setToken(tokenObject);
        return new KeystoneAuthenticationToken(auth);
    }
View Full Code Here

TOP

Related Classes of org.jboss.dna.common.text.TokenStream$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.