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
public class ExtendedParserWrapper extends java.lang.Object implements ExtendedParser
This class implements theExtendedParserinterface by wrapping a standardParser.- Version:
- $Id: ExtendedParserWrapper.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description org.w3c.css.sac.Parserparser
-
Constructor Summary
Constructors Constructor Description ExtendedParserWrapper(org.w3c.css.sac.Parser parser)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetParserVersion()SAC: ImplementsParser.getParserVersion().org.w3c.css.sac.SACMediaListparseMedia(java.lang.String mediaText)ImplementsExtendedParser.parseMedia(String).booleanparsePriority(java.lang.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(java.lang.String source)Parse a CSS property value.org.w3c.css.sac.LexicalUnitparsePropertyValue(org.w3c.css.sac.InputSource source)SAC: ImplementsParser.parsePropertyValue(InputSource).voidparseRule(java.lang.String source)Parse a CSS rule.voidparseRule(org.w3c.css.sac.InputSource source)SAC: ImplementsParser.parseRule(InputSource).org.w3c.css.sac.SelectorListparseSelectors(java.lang.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(java.lang.String source)Parse a CSS style declaration (without '{' and '}').voidparseStyleDeclaration(org.w3c.css.sac.InputSource source)SAC: ImplementsParser.parseStyleDeclaration(InputSource).voidparseStyleSheet(java.lang.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).voidsetLocale(java.util.Locale locale)SAC: 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.
-
-
-
Method Detail
-
wrap
public static ExtendedParser wrap(org.w3c.css.sac.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: ImplementsParser.getParserVersion().- Specified by:
getParserVersionin interfaceorg.w3c.css.sac.Parser
-
setLocale
public void setLocale(java.util.Locale locale) throws org.w3c.css.sac.CSSExceptionSAC: 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, java.io.IOExceptionSAC: ImplementsParser.parseStyleSheet(InputSource).- Specified by:
parseStyleSheetin interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionjava.io.IOException
-
parseStyleSheet
public void parseStyleSheet(java.lang.String uri) throws org.w3c.css.sac.CSSException, java.io.IOExceptionParse 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.java.io.IOException- An IO exception from the parser, possibly from a byte stream or character stream supplied by the application.- See Also:
parseStyleSheet(InputSource)
-
parseStyleDeclaration
public void parseStyleDeclaration(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionSAC: ImplementsParser.parseStyleDeclaration(InputSource).- Specified by:
parseStyleDeclarationin interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionjava.io.IOException
-
parseStyleDeclaration
public void parseStyleDeclaration(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionParse 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.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(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionSAC: ImplementsParser.parseRule(InputSource).- Specified by:
parseRulein interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionjava.io.IOException
-
parseRule
public void parseRule(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionParse a CSS rule.- Specified by:
parseRulein interfaceExtendedParser- Throws:
org.w3c.css.sac.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 org.w3c.css.sac.SelectorList parseSelectors(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionSAC: ImplementsParser.parseSelectors(InputSource).- Specified by:
parseSelectorsin interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionjava.io.IOException
-
parseSelectors
public org.w3c.css.sac.SelectorList parseSelectors(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionParse a comma separated list of selectors.- Specified by:
parseSelectorsin interfaceExtendedParser- Throws:
org.w3c.css.sac.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 org.w3c.css.sac.LexicalUnit parsePropertyValue(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionSAC: ImplementsParser.parsePropertyValue(InputSource).- Specified by:
parsePropertyValuein interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionjava.io.IOException
-
parsePropertyValue
public org.w3c.css.sac.LexicalUnit parsePropertyValue(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionParse a CSS property value.- Specified by:
parsePropertyValuein interfaceExtendedParser- Throws:
org.w3c.css.sac.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(org.w3c.css.sac.InputSource source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionSAC: ImplementsParser.parsePriority(InputSource).- Specified by:
parsePriorityin interfaceorg.w3c.css.sac.Parser- Throws:
org.w3c.css.sac.CSSExceptionjava.io.IOException
-
parseMedia
public org.w3c.css.sac.SACMediaList parseMedia(java.lang.String mediaText) throws org.w3c.css.sac.CSSException, java.io.IOExceptionImplementsExtendedParser.parseMedia(String).- Specified by:
parseMediain interfaceExtendedParser- Throws:
org.w3c.css.sac.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(java.lang.String source) throws org.w3c.css.sac.CSSException, java.io.IOExceptionParse a CSS priority value (e.g. "!important").- Specified by:
parsePriorityin interfaceExtendedParser- Throws:
org.w3c.css.sac.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.
-
-