Package org.apache.batik.css.parser
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.SACMediaList
parseMedia
(String mediaText) ImplementsExtendedParser.parseMedia(String)
.boolean
parsePriority
(String source) Parse a CSS priority value (e.g. "!important").boolean
parsePriority
(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parsePriority(InputSource)
.org.w3c.css.sac.LexicalUnit
parsePropertyValue
(String source) Parse a CSS property value.org.w3c.css.sac.LexicalUnit
parsePropertyValue
(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parsePropertyValue(InputSource)
.void
Parse a CSS rule.void
parseRule
(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parseRule(InputSource)
.org.w3c.css.sac.SelectorList
parseSelectors
(String source) Parse a comma separated list of selectors.org.w3c.css.sac.SelectorList
parseSelectors
(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parseSelectors(InputSource)
.void
parseStyleDeclaration
(String source) Parse a CSS style declaration (without '{' and '}').void
parseStyleDeclaration
(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parseStyleDeclaration(InputSource)
.void
parseStyleSheet
(String uri) Parse a CSS document from a URI.void
parseStyleSheet
(org.w3c.css.sac.InputSource source) SAC: ImplementsParser.parseStyleSheet(InputSource)
.void
setConditionFactory
(org.w3c.css.sac.ConditionFactory conditionFactory) SAC: ImplementsParser.setConditionFactory(ConditionFactory)
.void
setDocumentHandler
(org.w3c.css.sac.DocumentHandler handler) SAC: ImplementsParser.setDocumentHandler(DocumentHandler)
.void
setErrorHandler
(org.w3c.css.sac.ErrorHandler handler) SAC: ImplementsParser.setErrorHandler(ErrorHandler)
.void
SAC: ImplementsParser.setLocale(Locale)
.void
setSelectorFactory
(org.w3c.css.sac.SelectorFactory selectorFactory) SAC: ImplementsParser.setSelectorFactory(SelectorFactory)
.static ExtendedParser
wrap
(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:
getParserVersion
in interfaceorg.w3c.css.sac.Parser
-
setLocale
SAC: ImplementsParser.setLocale(Locale)
.- Specified by:
setLocale
in 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:
setDocumentHandler
in interfaceorg.w3c.css.sac.Parser
-
setSelectorFactory
public void setSelectorFactory(org.w3c.css.sac.SelectorFactory selectorFactory) SAC: ImplementsParser.setSelectorFactory(SelectorFactory)
.- Specified by:
setSelectorFactory
in interfaceorg.w3c.css.sac.Parser
-
setConditionFactory
public void setConditionFactory(org.w3c.css.sac.ConditionFactory conditionFactory) SAC: ImplementsParser.setConditionFactory(ConditionFactory)
.- Specified by:
setConditionFactory
in interfaceorg.w3c.css.sac.Parser
-
setErrorHandler
public void setErrorHandler(org.w3c.css.sac.ErrorHandler handler) SAC: ImplementsParser.setErrorHandler(ErrorHandler)
.- Specified by:
setErrorHandler
in 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:
parseStyleSheet
in interfaceorg.w3c.css.sac.Parser
- Throws:
org.w3c.css.sac.CSSException
IOException
-
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:
parseStyleSheet
in 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:
parseStyleDeclaration
in interfaceorg.w3c.css.sac.Parser
- Throws:
org.w3c.css.sac.CSSException
IOException
-
parseStyleDeclaration
Parse a CSS style declaration (without '{' and '}').- Specified by:
parseStyleDeclaration
in 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:
parseRule
in interfaceorg.w3c.css.sac.Parser
- Throws:
org.w3c.css.sac.CSSException
IOException
-
parseRule
Parse a CSS rule.- Specified by:
parseRule
in 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:
parseSelectors
in interfaceorg.w3c.css.sac.Parser
- Throws:
org.w3c.css.sac.CSSException
IOException
-
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:
parseSelectors
in 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:
parsePropertyValue
in interfaceorg.w3c.css.sac.Parser
- Throws:
org.w3c.css.sac.CSSException
IOException
-
parsePropertyValue
public org.w3c.css.sac.LexicalUnit parsePropertyValue(String source) throws org.w3c.css.sac.CSSException, IOException Parse a CSS property value.- Specified by:
parsePropertyValue
in 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:
parsePriority
in interfaceorg.w3c.css.sac.Parser
- Throws:
org.w3c.css.sac.CSSException
IOException
-
parseMedia
public org.w3c.css.sac.SACMediaList parseMedia(String mediaText) throws org.w3c.css.sac.CSSException, IOException ImplementsExtendedParser.parseMedia(String)
.- Specified by:
parseMedia
in 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:
parsePriority
in 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.
-