org.apache.batik.css.parser
Class ExtendedParserWrapper

java.lang.Object
  extended by org.apache.batik.css.parser.ExtendedParserWrapper
All Implemented Interfaces:
ExtendedParser

public class ExtendedParserWrapper
extends java.lang.Object
implements ExtendedParser

This class implements the ExtendedParser interface by wrapping a standard org.w3c.css.sac.Parser.


Field Summary
 Parser parser
           
 
Constructor Summary
ExtendedParserWrapper(Parser parser)
           
 
Method Summary
 java.lang.String getParserVersion()
          SAC: Implements org.w3c.css.sac.Parser#getParserVersion().
 SACMediaList parseMedia(java.lang.String mediaText)
          Implements ExtendedParser.parseMedia(String).
 boolean parsePriority(InputSource source)
          SAC: Implements org.w3c.css.sac.Parser#parsePriority(InputSource).
 LexicalUnit parsePropertyValue(InputSource source)
          SAC: Implements org.w3c.css.sac.Parser#parsePropertyValue(InputSource).
 LexicalUnit parsePropertyValue(java.lang.String source)
          Parse a CSS property value.
 void parseRule(InputSource source)
          SAC: Implements org.w3c.css.sac.Parser#parseRule(InputSource).
 SelectorList parseSelectors(InputSource source)
          SAC: Implements org.w3c.css.sac.Parser#parseSelectors(InputSource).
 SelectorList parseSelectors(java.lang.String source)
          Parse a comma separated list of selectors.
 void parseStyleDeclaration(InputSource source)
          SAC: Implements org.w3c.css.sac.Parser#parseStyleDeclaration(InputSource).
 void parseStyleSheet(InputSource source)
          SAC: Implements org.w3c.css.sac.Parser#parseStyleSheet(InputSource).
 void setConditionFactory(ConditionFactory conditionFactory)
          SAC: Implements org.w3c.css.sac.Parser#setConditionFactory(ConditionFactory).
 void setDocumentHandler(DocumentHandler handler)
          SAC: Implements org.w3c.css.sac.Parser#setDocumentHandler(DocumentHandler).
 void setErrorHandler(ErrorHandler handler)
          SAC: Implements org.w3c.css.sac.Parser#setErrorHandler(ErrorHandler).
 void setLocale(java.util.Locale locale)
          SAC: Implements org.w3c.css.sac.Parser#setLocale(Locale).
 void setSelectorFactory(SelectorFactory selectorFactory)
          SAC: Implements org.w3c.css.sac.Parser#setSelectorFactory(SelectorFactory).
static ExtendedParser wrap(Parser p)
          This converts a standard @link org.w3c.css.sac.Parser into an Extended Parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parser

public Parser parser
Constructor Detail

ExtendedParserWrapper

public ExtendedParserWrapper(Parser parser)
Method Detail

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.

getParserVersion

public java.lang.String getParserVersion()
SAC: Implements org.w3c.css.sac.Parser#getParserVersion().


setLocale

public void setLocale(java.util.Locale locale)
               throws CSSException
SAC: Implements org.w3c.css.sac.Parser#setLocale(Locale).

Throws:
CSSException

setDocumentHandler

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


setSelectorFactory

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


setConditionFactory

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


setErrorHandler

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


parseStyleSheet

public void parseStyleSheet(InputSource source)
                     throws CSSException,
                            java.io.IOException
SAC: Implements org.w3c.css.sac.Parser#parseStyleSheet(InputSource).

Throws:
CSSException
java.io.IOException

parseStyleDeclaration

public void parseStyleDeclaration(InputSource source)
                           throws CSSException,
                                  java.io.IOException
SAC: Implements org.w3c.css.sac.Parser#parseStyleDeclaration(InputSource).

Specified by:
parseStyleDeclaration in interface ExtendedParser
Parameters:
source - The declaration.
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)
               throws CSSException,
                      java.io.IOException
SAC: Implements org.w3c.css.sac.Parser#parseRule(InputSource).

Specified by:
parseRule in interface ExtendedParser
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)
                            throws CSSException,
                                   java.io.IOException
SAC: Implements org.w3c.css.sac.Parser#parseSelectors(InputSource).

Specified by:
parseSelectors in interface ExtendedParser
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(java.lang.String source)
                            throws CSSException,
                                   java.io.IOException
Parse a comma separated list of selectors.

Specified by:
parseSelectors in interface ExtendedParser
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)
                               throws CSSException,
                                      java.io.IOException
SAC: Implements org.w3c.css.sac.Parser#parsePropertyValue(InputSource).

Specified by:
parsePropertyValue in interface ExtendedParser
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(java.lang.String source)
                               throws CSSException,
                                      java.io.IOException
Parse a CSS property value.

Specified by:
parsePropertyValue in interface ExtendedParser
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.

parsePriority

public boolean parsePriority(InputSource source)
                      throws CSSException,
                             java.io.IOException
SAC: Implements org.w3c.css.sac.Parser#parsePriority(InputSource).

Specified by:
parsePriority in interface ExtendedParser
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.

parseMedia

public SACMediaList parseMedia(java.lang.String mediaText)
                        throws CSSException,
                               java.io.IOException
Implements ExtendedParser.parseMedia(String).

Specified by:
parseMedia in interface ExtendedParser
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.


Copyright ? 2008 Apache Software Foundation. All Rights Reserved.