Package org.jboss.dna.common.text

A set of utilities for working with text.


Interface Summary
TextDecoder Interface for components that can decode text.
TextEncoder Interface for components that can encode text.
TokenStream.CharacterStream Interface used by a TokenStream.Tokenizer to iterate through the characters in the content input to the TokenStream.
TokenStream.Tokenizer Interface for a Tokenizer component responsible for processing the characters in a TokenStream.CharacterStream and constructing the appropriate Token objects.
TokenStream.Tokens A factory for Token objects, used by a TokenStream.Tokenizer to create tokens in the correct order.

Class Summary
Inflector Transforms words to singular, plural, humanized (human readable), underscore, camel case, or ordinal form.
Jsr283Encoder Encoder that escapes characters that are not allowed in JCR names.
NoOpEncoder An encoder implementation that does nothing.
TokenStream A foundation for basic parsers that tokenizes input content and allows parsers to easily access and use those tokens.
TokenStream.BasicTokenizer A basic TokenStream.Tokenizer implementation that ignores whitespace but includes tokens for individual symbols, the period ('.'), single-quoted strings, double-quoted strings, whitespace-delimited words, and optionally comments.
TokenStream.Position A class that represents the position of a particular character in terms of the lines and columns of a character sequence.
UrlEncoder An encoder useful for converting text to be used within a URL, as defined by Section 2.3 of RFC 2396.
XmlNameEncoder An encoder and decoder for XML element and attribute names.
XmlValueEncoder An encoder useful for converting text to be used within XML attribute values.

Exception Summary
TokenStream.ParsingException An exception representing a problem during parsing.

Package org.jboss.dna.common.text Description

A set of utilities for working with text. Included is an Inflector class that transforms (English) works into singular, plural, and human-readable forms, and is capable of transforming between camel-case, whitespace-delimited, or underscore-delimited forms. There is also components that can encode and decode text. Finally, this package defines a simple framework for tokenizing text (e.g., from files or stream) making it very easy to create very straightforward parsers.

Copyright © 2008-2009 JBoss, a division of Red Hat. All Rights Reserved.