Class ExtendedParserWrapper
java.lang.Object
org.apache.batik.css.parser.ExtendedParserWrapper
- All Implemented Interfaces:
ExtendedParser, org.w3c.css.sac.Parser
This class implements the
ExtendedParser
interface by wrapping a standard Parser.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSAC: ImplementsParser.getParserVersion().org.w3c.css.sac.SACMediaListparseMedia(String mediaText) ImplementsExtendedParser.parseMedia(String).booleanparsePriority(String source) Parse a CSS priority value (e.g. "!important").booleanparsePriority(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parsePriority(InputSource).org.w3c.css.sac.LexicalUnitparsePropertyValue(String source) Parse a CSS property value.org.w3c.css.sac.LexicalUnitparsePropertyValue(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parsePropertyValue(InputSource).voidParse a CSS rule.voidparseRule(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parseRule(InputSource).org.w3c.css.sac.SelectorListparseSelectors(String source) Parse a comma separated list of selectors.org.w3c.css.sac.SelectorListparseSelectors(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parseSelectors(InputSource).voidparseStyleDeclaration(String source) Parse a CSS style declaration (without '{' and '}').voidparseStyleDeclaration(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parseStyleDeclaration(InputSource).voidparseStyleSheet(String uri) Parse a CSS document from a URI.voidparseStyleSheet(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parseStyleSheet(InputSource).voidsetConditionFactory(org.w3c.css.sac.ConditionFactory conditionFactory) SAC: ImplementsParser.setConditionFactory(ConditionFactory).voidsetDocumentHandler(org.w3c.css.sac.DocumentHandler handler) SAC: ImplementsParser.setDocumentHandler(DocumentHandler).voidsetErrorHandler(org.w3c.css.sac.ErrorHandler handler) SAC: ImplementsParser.setErrorHandler(ErrorHandler).voidSAC: ImplementsParser.setLocale(Locale).voidsetSelectorFactory(org.w3c.css.sac.SelectorFactory selectorFactory) SAC: ImplementsParser.setSelectorFactory(SelectorFactory).static ExtendedParserwrap(org.w3c.css.sac.Parser p) This converts a standard @link org.w3c.css.sac.Parser into an Extended Parser.
-
Field Details
-
parser
public org.w3c.css.sac.Parser parser
-
-
Constructor Details
-
ExtendedParserWrapper
public ExtendedParserWrapper(org.w3c.css.sac.Parser parser)
-
-
Method Details
-
wrap
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
SAC: ImplementsParser.getParserVersion().- Specified by:
getParserVersionin interfaceorg.w3c.css.sac.Parser
-
setLocale
SAC: ImplementsParser.setLocale(Locale).- Specified by:
setLocalein interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSException
-
setDocumentHandler
public void setDocumentHandler(org.w3c.css.sac.DocumentHandler handler) SAC: ImplementsParser.setDocumentHandler(DocumentHandler).- Specified by:
setDocumentHandlerin interfaceorg.w3c.css.sac.Parser
-
setSelectorFactory
public void setSelectorFactory(org.w3c.css.sac.SelectorFactory selectorFactory) SAC: ImplementsParser.setSelectorFactory(SelectorFactory).- Specified by:
setSelectorFactoryin interfaceorg.w3c.css.sac.Parser
-
setConditionFactory
public void setConditionFactory(org.w3c.css.sac.ConditionFactory conditionFactory) SAC: ImplementsParser.setConditionFactory(ConditionFactory).- Specified by:
setConditionFactoryin interfaceorg.w3c.css.sac.Parser
-
setErrorHandler
public void setErrorHandler(org.w3c.css.sac.ErrorHandler handler) SAC: ImplementsParser.setErrorHandler(ErrorHandler).- Specified by:
setErrorHandlerin interfaceorg.w3c.css.sac.Parser
-
parseStyleSheet
public void parseStyleSheet(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, IOException SAC: ImplementsParser.parseStyleSheet(InputSource).- Specified by:
parseStyleSheetin interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionIOException
-
parseStyleSheet
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.
- Specified by:
parseStyleSheetin interfaceorg.w3c.css.sac.Parser- Parameters:
uri- The URI.- Throws:
org.w3c.css.sac.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.- See Also:
-
parseStyleDeclaration
public void parseStyleDeclaration(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, IOException SAC: ImplementsParser.parseStyleDeclaration(InputSource).- Specified by:
parseStyleDeclarationin interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionIOException
-
parseStyleDeclaration
Parse a CSS style declaration (without '{' and '}').- Specified by:
parseStyleDeclarationin interfaceExtendedParser- Parameters:
source- The declaration.- Throws:
org.w3c.css.sac.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.
-
parseRule
public void parseRule(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, IOException SAC: ImplementsParser.parseRule(InputSource).- Specified by:
parseRulein interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionIOException
-
parseRule
Parse a CSS rule.- Specified by:
parseRulein interfaceExtendedParser- Throws:
org.w3c.css.sac.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.
-
parseSelectors
public org.w3c.css.sac.SelectorList parseSelectors(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, IOException SAC: ImplementsParser.parseSelectors(InputSource).- Specified by:
parseSelectorsin interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionIOException
-
parseSelectors
public org.w3c.css.sac.SelectorList parseSelectors(String source) throws org.w3c.css.sac.CSSException, IOException Parse a comma separated list of selectors.- Specified by:
parseSelectorsin interfaceExtendedParser- Throws:
org.w3c.css.sac.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.
-
parsePropertyValue
public org.w3c.css.sac.LexicalUnit parsePropertyValue(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, IOException SAC: ImplementsParser.parsePropertyValue(InputSource).- Specified by:
parsePropertyValuein interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionIOException
-
parsePropertyValue
public org.w3c.css.sac.LexicalUnit parsePropertyValue(String source) throws org.w3c.css.sac.CSSException, IOException Parse a CSS property value.- Specified by:
parsePropertyValuein interfaceExtendedParser- Throws:
org.w3c.css.sac.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.
-
parsePriority
public boolean parsePriority(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, IOException SAC: ImplementsParser.parsePriority(InputSource).- Specified by:
parsePriorityin interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionIOException
-
parseMedia
public org.w3c.css.sac.SACMediaList parseMedia(String mediaText) throws org.w3c.css.sac.CSSException, IOException ImplementsExtendedParser.parseMedia(String).- Specified by:
parseMediain interfaceExtendedParser- Throws:
org.w3c.css.sac.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.
-
parsePriority
Parse a CSS priority value (e.g. "!important").- Specified by:
parsePriorityin interfaceExtendedParser- Throws:
org.w3c.css.sac.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.
-