Package io.sf.carte.doc.style.css.om
Class NamespaceRule
java.lang.Object
io.sf.carte.doc.style.css.om.AbstractCSSRule
io.sf.carte.doc.style.css.om.NamespaceRule
- All Implemented Interfaces:
- CSSNamespaceRule,- CSSRule,- Serializable,- org.w3c.dom.css.CSSRule
Implementation of W3C's CSSNamespaceRule.
- See Also:
- 
Field SummaryFields inherited from interface io.sf.carte.doc.style.css.CSSRuleCOUNTER_STYLE_RULE, CUSTOM_MEDIA_RULE, DOCUMENT_RULE, FONT_FACE_RULE, FONT_FEATURE_VALUES_RULE, IMPORT_RULE, KEYFRAME_RULE, KEYFRAMES_RULE, MARGIN_RULE, MEDIA_RULE, NAMESPACE_RULE, PAGE_RULE, PROPERTY_RULE, REGION_STYLE_RULE, STYLE_RULE, SUPPORTS_RULE, UNKNOWN_RULE, VIEWPORT_RULEFields inherited from interface org.w3c.dom.css.CSSRuleCHARSET_RULE
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedNamespaceRule(AbstractCSSStyleSheet parentSheet, byte origin, String prefix, String namespaceURI) 
- 
Method SummaryModifier and TypeMethodDescriptionclone(AbstractCSSStyleSheet parentSheet) Obtain a clone of this rule whose parent sheet isparentSheet.protected ParservoidIf this rule does not contain a preceding comment list, create one.voidIf this rule does not contain a trailing comment list, create one.booleanA minified parsable textual representation of the rule.Get the namespace URI defined by this rule.byteGet the origin of this rule (user agent sheet, author, user).If this rule is contained inside another rule, return that rule.Get the style sheet that contains this rule.Get a list of the comments that preceded this rule, if any.Get the prefix for the declared namespace.protected StyleFormattingContextGet a list of the comments that immediately follow this rule, if any.shortgetType()protected URLGets an URL for the given URI, taking into account the parent CSS Base URL if appropriate.inthashCode()voidsetCssText(String cssText) voidsetParentRule(AbstractCSSRule parent) Sets the parent CSS rule, in case this rule is contained by another.voidSet the prefix for the declared namespace.voidwriteCssText(io.sf.carte.util.SimpleWriter wri, StyleFormattingContext context) Write a serialization of this rule to the given simple writer, according to the given context.Methods inherited from class io.sf.carte.doc.style.css.om.AbstractCSSRuletoStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.sf.carte.doc.style.css.CSSRulegetMinifiedCssText, getParentRule, getParentStyleSheet, getPrecedingComments, getTrailingCommentsMethods inherited from interface org.w3c.dom.css.CSSRulegetType
- 
Constructor Details- 
NamespaceRuleprotected NamespaceRule(AbstractCSSStyleSheet parentSheet, byte origin, String prefix, String namespaceURI) 
 
- 
- 
Method Details- 
getNamespaceURIDescription copied from interface:CSSNamespaceRuleGet the namespace URI defined by this rule.- Specified by:
- getNamespaceURIin interface- CSSNamespaceRule
- Returns:
- the namespace URI.
 
- 
getPrefixDescription copied from interface:CSSNamespaceRuleGet the prefix for the declared namespace.- Specified by:
- getPrefixin interface- CSSNamespaceRule
- Returns:
- the namespace prefix.
 
- 
setPrefixDescription copied from interface:CSSNamespaceRuleSet the prefix for the declared namespace.- Specified by:
- setPrefixin interface- CSSNamespaceRule
- Parameters:
- prefix- the prefix.
 
- 
setCssText- Specified by:
- setCssTextin interface- org.w3c.dom.css.CSSRule
- Overrides:
- setCssTextin class- AbstractCSSRule
- Throws:
- DOMException
 
- 
getCssText- Specified by:
- getCssTextin interface- org.w3c.dom.css.CSSRule
- Specified by:
- getCssTextin class- AbstractCSSRule
 
- 
writeCssTextpublic void writeCssText(io.sf.carte.util.SimpleWriter wri, StyleFormattingContext context) throws IOException Description copied from interface:CSSRuleWrite a serialization of this rule to the given simple writer, according to the given context.- Specified by:
- writeCssTextin interface- CSSRule
- Specified by:
- writeCssTextin class- AbstractCSSRule
- Parameters:
- wri- the simple writer object.
- context- the formatting context.
- Throws:
- IOException- if an error happened while writing.
 
- 
hashCodepublic int hashCode()
- 
equals
- 
cloneDescription copied from class:AbstractCSSRuleObtain a clone of this rule whose parent sheet isparentSheet.- Specified by:
- clonein class- AbstractCSSRule
- Parameters:
- parentSheet- the parent sheet for the new rule.
- Returns:
- a clone of this rule with the given parent sheet.
 
- 
getTypepublic short getType()- Specified by:
- getTypein interface- org.w3c.dom.css.CSSRule
- Specified by:
- getTypein class- AbstractCSSRule
 
- 
getParentStyleSheetDescription copied from interface:CSSRuleGet the style sheet that contains this rule.- Specified by:
- getParentStyleSheetin interface- CSSRule
- Specified by:
- getParentStyleSheetin interface- org.w3c.dom.css.CSSRule
- Specified by:
- getParentStyleSheetin class- AbstractCSSRule
- Returns:
- the style sheet, or null if no sheet contains this rule.
 
- 
createSACParser- Throws:
- DOMException
 
- 
getParentRuleDescription copied from interface:CSSRuleIf this rule is contained inside another rule, return that rule. If it is not nested inside any other rules, returnnull.- Specified by:
- getParentRulein interface- CSSRule
- Specified by:
- getParentRulein interface- org.w3c.dom.css.CSSRule
- Specified by:
- getParentRulein class- AbstractCSSRule
- Returns:
- the containing rule, if any, otherwise null.
 
- 
setParentRuleSets the parent CSS rule, in case this rule is contained by another.- Specified by:
- setParentRulein class- AbstractCSSRule
- Parameters:
- parent- the parent rule.
 
- 
getOriginpublic byte getOrigin()Description copied from class:AbstractCSSRuleGet the origin of this rule (user agent sheet, author, user).- Specified by:
- getOriginin class- AbstractCSSRule
- Returns:
- the origin of this rule.
 
- 
enablePrecedingCommentspublic void enablePrecedingComments()Description copied from class:AbstractCSSRuleIf this rule does not contain a preceding comment list, create one.If this rule already has a preceding comment list, does nothing. - Specified by:
- enablePrecedingCommentsin class- AbstractCSSRule
 
- 
getPrecedingCommentsDescription copied from interface:CSSRuleGet a list of the comments that preceded this rule, if any.- Returns:
- the list of comments, or nullif there were no preceding comments or the parsing was specified to ignore comments.
- See Also:
 
- 
enableTrailingCommentspublic void enableTrailingComments()Description copied from class:AbstractCSSRuleIf this rule does not contain a trailing comment list, create one.If this rule already has a trailing comment list, does nothing. - Specified by:
- enableTrailingCommentsin class- AbstractCSSRule
 
- 
getTrailingCommentsDescription copied from interface:CSSRuleGet a list of the comments that immediately follow this rule, if any.If the parsing mode was COMMENTS_PRECEDING, or wasCOMMENTS_AUTOand the next comment happens after a newline character, it shall be assigned to the next rule as a preceding comment.- Returns:
- the list of comments, or nullif there were no trailing comments or the parsing was specified to ignore comments.
- See Also:
 
- 
getMinifiedCssTextDescription copied from class:AbstractCSSRuleA minified parsable textual representation of the rule. This reflects the current state of the rule and not its initial value.- Specified by:
- getMinifiedCssTextin interface- CSSRule
- Specified by:
- getMinifiedCssTextin class- AbstractCSSRule
- Returns:
- the minified textual representation of the rule.
 
- 
getStyleFormattingContext
- 
getURLGets an URL for the given URI, taking into account the parent CSS Base URL if appropriate.- Parameters:
- uri- the uri.
- Returns:
- the absolute URL.
- Throws:
- MalformedURLException- if the uri was wrong.
 
 
-