org.apache.batik.css.parser

Class ExtendedParserWrapper

public class ExtendedParserWrapper extends Object implements ExtendedParser

This class implements the {@link org.apache.batik.css.parser.ExtendedParser} interface by wrapping a standard {@link org.w3c.css.sac.Parser}.
Field Summary
Parserparser
Constructor Summary
ExtendedParserWrapper(Parser parser)
Method Summary
StringgetParserVersion()
SAC: Implements {@link org.w3c.css.sac.Parser#getParserVersion()}.
SACMediaListparseMedia(String mediaText)
Implements {@link ExtendedParser#parseMedia(String)}.
booleanparsePriority(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parsePriority(InputSource)}.
booleanparsePriority(String source)
Parse a CSS priority value (e.g. "!important").
LexicalUnitparsePropertyValue(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parsePropertyValue(InputSource)}.
LexicalUnitparsePropertyValue(String source)
Parse a CSS property value.
voidparseRule(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parseRule(InputSource)}.
voidparseRule(String source)
Parse a CSS rule.
SelectorListparseSelectors(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parseSelectors(InputSource)}.
SelectorListparseSelectors(String source)
Parse a comma separated list of selectors.
voidparseStyleDeclaration(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parseStyleDeclaration(InputSource)}.
voidparseStyleDeclaration(String source)
Parse a CSS style declaration (without '{' and '}').
voidparseStyleSheet(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parseStyleSheet(InputSource)}.
voidparseStyleSheet(String uri)
Parse a CSS document from a URI.
voidsetConditionFactory(ConditionFactory conditionFactory)
SAC: Implements {@link org.w3c.css.sac.Parser#setConditionFactory(ConditionFactory)}.
voidsetDocumentHandler(DocumentHandler handler)
SAC: Implements {@link org.w3c.css.sac.Parser#setDocumentHandler(DocumentHandler)}.
voidsetErrorHandler(ErrorHandler handler)
SAC: Implements {@link org.w3c.css.sac.Parser#setErrorHandler(ErrorHandler)}.
voidsetLocale(Locale locale)
SAC: Implements {@link org.w3c.css.sac.Parser#setLocale(Locale)}.
voidsetSelectorFactory(SelectorFactory selectorFactory)
SAC: Implements {@link org.w3c.css.sac.Parser#setSelectorFactory(SelectorFactory)}.
static ExtendedParserwrap(Parser p)
This converts a standard @link org.w3c.css.sac.Parser into an Extended Parser.

Field Detail

parser

public Parser parser

Constructor Detail

ExtendedParserWrapper

public ExtendedParserWrapper(Parser parser)

Method Detail

getParserVersion

public String getParserVersion()
SAC: Implements {@link org.w3c.css.sac.Parser#getParserVersion()}.

parseMedia

public SACMediaList parseMedia(String mediaText)
Implements {@link ExtendedParser#parseMedia(String)}.

parsePriority

public boolean parsePriority(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parsePriority(InputSource)}.

parsePriority

public boolean parsePriority(String source)
Parse a CSS priority value (e.g. "!important").

Throws: CSSException Any CSS exception, possibly wrapping another exception. java.io.IOException An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

parsePropertyValue

public LexicalUnit parsePropertyValue(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parsePropertyValue(InputSource)}.

parsePropertyValue

public LexicalUnit parsePropertyValue(String source)
Parse a CSS property value.

Throws: CSSException Any CSS exception, possibly wrapping another exception. java.io.IOException An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

parseRule

public void parseRule(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parseRule(InputSource)}.

parseRule

public void parseRule(String source)
Parse a CSS rule.

Throws: CSSException Any CSS exception, possibly wrapping another exception. java.io.IOException An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

parseSelectors

public SelectorList parseSelectors(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parseSelectors(InputSource)}.

parseSelectors

public SelectorList parseSelectors(String source)
Parse a comma separated list of selectors.

Throws: CSSException Any CSS exception, possibly wrapping another exception. java.io.IOException An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

parseStyleDeclaration

public void parseStyleDeclaration(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parseStyleDeclaration(InputSource)}.

parseStyleDeclaration

public void parseStyleDeclaration(String source)
Parse a CSS style declaration (without '{' and '}').

Parameters: source The declaration.

Throws: CSSException Any CSS exception, possibly wrapping another exception. IOException An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

parseStyleSheet

public void parseStyleSheet(InputSource source)
SAC: Implements {@link org.w3c.css.sac.Parser#parseStyleSheet(InputSource)}.

parseStyleSheet

public void parseStyleSheet(String uri)
Parse a CSS document from a URI.

This method is a shortcut for the common case of reading a document from a URI. It is the exact equivalent of the following:

 parse(new InputSource(uri));
 

The URI must be fully resolved by the application before it is passed to the parser.

Parameters: uri The URI.

Throws: CSSException Any CSS exception, possibly wrapping another exception. java.io.IOException An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.

See Also: parseStyleSheet

setConditionFactory

public void setConditionFactory(ConditionFactory conditionFactory)
SAC: Implements {@link org.w3c.css.sac.Parser#setConditionFactory(ConditionFactory)}.

setDocumentHandler

public void setDocumentHandler(DocumentHandler handler)
SAC: Implements {@link org.w3c.css.sac.Parser#setDocumentHandler(DocumentHandler)}.

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
SAC: Implements {@link org.w3c.css.sac.Parser#setErrorHandler(ErrorHandler)}.

setLocale

public void setLocale(Locale locale)
SAC: Implements {@link org.w3c.css.sac.Parser#setLocale(Locale)}.

setSelectorFactory

public void setSelectorFactory(SelectorFactory selectorFactory)
SAC: Implements {@link org.w3c.css.sac.Parser#setSelectorFactory(SelectorFactory)}.

wrap

public static ExtendedParser wrap(Parser p)
This converts a standard @link org.w3c.css.sac.Parser into an Extended Parser. If it is already an ExtendedParser it will simply cast it and return, otherwise it will wrap it and return the result.

Parameters: p Parser to wrap.

Returns: p as an ExtendedParser.

Copyright B) 2007 Apache Software Foundation. All Rights Reserved.