org.apache.batik.dom.svg

Class SVGOMDocument

public class SVGOMDocument extends AbstractStylableDocument implements SVGDocument, SVGConstants, CSSNavigableDocument, IdContainer

This class implements {@link SVGDocument}.
Nested Class Summary
protected classSVGOMDocument.AnimAttrListener
Listener class for animated attribute changes.
protected classSVGOMDocument.DOMAttrModifiedListenerWrapper
DOM attribute modified listener wrapper.
protected classSVGOMDocument.DOMCharacterDataModifiedListenerWrapper
DOM character data modified listener wrapper.
protected classSVGOMDocument.DOMNodeInsertedListenerWrapper
DOM node inserted listener wrapper.
protected classSVGOMDocument.DOMNodeRemovedListenerWrapper
DOM node removed listener wrapper.
protected classSVGOMDocument.DOMSubtreeModifiedListenerWrapper
DOM subtree modified listener wrapper.
Field Summary
protected LinkedListanimatedAttributeListeners
List of {@link AnimatedAttributeListener}s attached to this document.
protected HashMapcssNavigableDocumentListeners
Map of CSSNavigableDocumentListeners to an array of wrapper DOM listeners.
protected booleanisSVG12
Whether the document supports SVG 1.2.
protected LocalizableSupportlocalizableSupport
The localizable support for the error messages.
protected AnimatedAttributeListenermainAnimatedAttributeListener
The main {@link AnimatedAttributeListener} that redispatches to all listeners in {@link #animatedAttributeListeners}.
protected booleanreadonly
Is this document immutable?
protected Stringreferrer
The string representing the referrer.
protected static StringRESOURCES
The error messages bundle class name.
protected URLurl
The url of the document.
Constructor Summary
protected SVGOMDocument()
Creates a new uninitialized document.
SVGOMDocument(DocumentType dt, DOMImplementation impl)
Creates a new document.
Method Summary
voidaddAnimatedAttributeListener(AnimatedAttributeListener aal)
Adds an {@link AnimatedAttributeListener} to this document, to be notified of animated XML attribute changes.
voidaddCSSNavigableDocumentListener(CSSNavigableDocumentListener l)
Adds an event listener for mutations on the CSSNavigableDocument tree.
protected NodecopyInto(Node n)
Copy the fields of the current node into the given node.
AttrcreateAttribute(String name)
DOM: Implements {@link Document#createAttribute(String)}.
AttrcreateAttributeNS(String namespaceURI, String qualifiedName)
DOM: Implements {@link Document#createAttributeNS(String,String)}.
CDATASectioncreateCDATASection(String data)
DOM: Implements {@link Document#createCDATASection(String)}
CommentcreateComment(String data)
DOM: Implements {@link Document#createComment(String)}.
DocumentFragmentcreateDocumentFragment()
DOM: Implements {@link Document#createDocumentFragment()}.
ElementcreateElement(String tagName)
DOM: Implements {@link Document#createElement(String)}.
ElementcreateElementNS(String namespaceURI, String qualifiedName)
DOM: Implements {@link Document#createElementNS(String,String)}.
EntityReferencecreateEntityReference(String name)
DOM: Implements {@link Document#createEntityReference(String)}.
ProcessingInstructioncreateProcessingInstruction(String target, String data)
DOM: Implements {@link Document#createProcessingInstruction(String,String)}.
TextcreateTextNode(String data)
DOM: Implements {@link Document#createTextNode(String)}.
protected NodedeepCopyInto(Node n)
Deeply copy the fields of the current node into the given node.
StringformatMessage(String key, Object[] args)
Implements {@link Localizable#formatMessage(String,Object[])}.
protected AnimatedAttributeListenergetAnimatedAttributeListener()
Returns the {@link AnimatedAttributeListener} for the document.
StringgetDomain()
DOM: Implements {@link SVGDocument#getDomain()}.
CSSStyleDeclarationgetOverrideStyle(Element elt, String pseudoElt)
DOM: Implements {@link DocumentCSS#getOverrideStyle(Element,String)}.
StringgetReferrer()
DOM: Implements {@link SVGDocument#getReferrer()}.
SVGSVGElementgetRootElement()
DOM: Implements {@link SVGDocument#getRootElement()}.
StringgetTitle()
DOM: Implements {@link SVGDocument#getTitle()}.
StringgetURL()
DOM: Implements {@link SVGDocument#getURL()}
URLgetURLObject()
Returns the URI of the document.
booleanisId(Attr node)
Returns true if the given Attr node represents an 'id' for this document.
booleanisReadonly()
Tests whether this node is readonly.
booleanisSVG12()
Returns whether the document supports SVG 1.2.
protected NodenewNode()
Returns a new uninitialized instance of this object's class.
protected voidoverrideStylePropertyChanged(CSSStylableElement e, String name, String value, String prio)
A property in the override style declaration has been changed.
protected voidoverrideStylePropertyRemoved(CSSStylableElement e, String name)
A property in the override style declaration has been removed.
protected voidoverrideStyleTextChanged(CSSStylableElement e, String text)
The text of the override style declaration for this element has been modified.
voidremoveAnimatedAttributeListener(AnimatedAttributeListener aal)
Removes an {@link AnimatedAttributeListener} from this document.
voidremoveCSSNavigableDocumentListener(CSSNavigableDocumentListener l)
Removes an event listener for mutations on the CSSNavigableDocument tree.
voidsetDocumentURI(String uri)
DOM: Implements {@link org.w3c.dom.Document#setDocumentURI(String)}.
voidsetIsSVG12(boolean b)
Sets whether the document supports SVG 1.2.
voidsetLocale(Locale l)
Implements {@link Localizable#setLocale(Locale)}.
voidsetReadonly(boolean v)
Sets this node readonly attribute.
voidsetReferrer(String s)
Sets the referrer string.
voidsetURLObject(URL url)
Sets the URI of the document.

Field Detail

animatedAttributeListeners

protected LinkedList animatedAttributeListeners
List of {@link AnimatedAttributeListener}s attached to this document.

cssNavigableDocumentListeners

protected HashMap cssNavigableDocumentListeners
Map of CSSNavigableDocumentListeners to an array of wrapper DOM listeners.

isSVG12

protected boolean isSVG12
Whether the document supports SVG 1.2.

localizableSupport

protected transient LocalizableSupport localizableSupport
The localizable support for the error messages.

mainAnimatedAttributeListener

protected AnimatedAttributeListener mainAnimatedAttributeListener
The main {@link AnimatedAttributeListener} that redispatches to all listeners in {@link #animatedAttributeListeners}.

readonly

protected transient boolean readonly
Is this document immutable?

referrer

protected String referrer
The string representing the referrer.

RESOURCES

protected static final String RESOURCES
The error messages bundle class name.

url

protected URL url
The url of the document.

Constructor Detail

SVGOMDocument

protected SVGOMDocument()
Creates a new uninitialized document.

SVGOMDocument

public SVGOMDocument(DocumentType dt, DOMImplementation impl)
Creates a new document.

Method Detail

addAnimatedAttributeListener

public void addAnimatedAttributeListener(AnimatedAttributeListener aal)
Adds an {@link AnimatedAttributeListener} to this document, to be notified of animated XML attribute changes.

addCSSNavigableDocumentListener

public void addCSSNavigableDocumentListener(CSSNavigableDocumentListener l)
Adds an event listener for mutations on the CSSNavigableDocument tree.

copyInto

protected Node copyInto(Node n)
Copy the fields of the current node into the given node.

Parameters: n a node of the type of this.

createAttribute

public Attr createAttribute(String name)
DOM: Implements {@link Document#createAttribute(String)}.

createAttributeNS

public Attr createAttributeNS(String namespaceURI, String qualifiedName)
DOM: Implements {@link Document#createAttributeNS(String,String)}.

createCDATASection

public CDATASection createCDATASection(String data)
DOM: Implements {@link Document#createCDATASection(String)}

createComment

public Comment createComment(String data)
DOM: Implements {@link Document#createComment(String)}.

createDocumentFragment

public DocumentFragment createDocumentFragment()
DOM: Implements {@link Document#createDocumentFragment()}.

createElement

public Element createElement(String tagName)
DOM: Implements {@link Document#createElement(String)}.

createElementNS

public Element createElementNS(String namespaceURI, String qualifiedName)
DOM: Implements {@link Document#createElementNS(String,String)}.

createEntityReference

public EntityReference createEntityReference(String name)
DOM: Implements {@link Document#createEntityReference(String)}.

createProcessingInstruction

public ProcessingInstruction createProcessingInstruction(String target, String data)
DOM: Implements {@link Document#createProcessingInstruction(String,String)}.

Returns: a SVGStyleSheetProcessingInstruction if target is "xml-stylesheet" or a GenericProcessingInstruction otherwise.

createTextNode

public Text createTextNode(String data)
DOM: Implements {@link Document#createTextNode(String)}.

deepCopyInto

protected Node deepCopyInto(Node n)
Deeply copy the fields of the current node into the given node.

Parameters: n a node of the type of this.

formatMessage

public String formatMessage(String key, Object[] args)
Implements {@link Localizable#formatMessage(String,Object[])}.

getAnimatedAttributeListener

protected AnimatedAttributeListener getAnimatedAttributeListener()
Returns the {@link AnimatedAttributeListener} for the document.

getDomain

public String getDomain()
DOM: Implements {@link SVGDocument#getDomain()}.

getOverrideStyle

public CSSStyleDeclaration getOverrideStyle(Element elt, String pseudoElt)
DOM: Implements {@link DocumentCSS#getOverrideStyle(Element,String)}.

getReferrer

public String getReferrer()
DOM: Implements {@link SVGDocument#getReferrer()}.

getRootElement

public SVGSVGElement getRootElement()
DOM: Implements {@link SVGDocument#getRootElement()}.

getTitle

public String getTitle()
DOM: Implements {@link SVGDocument#getTitle()}.

getURL

public String getURL()
DOM: Implements {@link SVGDocument#getURL()}

getURLObject

public URL getURLObject()
Returns the URI of the document.

isId

public boolean isId(Attr node)
Returns true if the given Attr node represents an 'id' for this document.

isReadonly

public boolean isReadonly()
Tests whether this node is readonly.

isSVG12

public boolean isSVG12()
Returns whether the document supports SVG 1.2.

newNode

protected Node newNode()
Returns a new uninitialized instance of this object's class.

overrideStylePropertyChanged

protected void overrideStylePropertyChanged(CSSStylableElement e, String name, String value, String prio)
A property in the override style declaration has been changed.

overrideStylePropertyRemoved

protected void overrideStylePropertyRemoved(CSSStylableElement e, String name)
A property in the override style declaration has been removed.

overrideStyleTextChanged

protected void overrideStyleTextChanged(CSSStylableElement e, String text)
The text of the override style declaration for this element has been modified.

removeAnimatedAttributeListener

public void removeAnimatedAttributeListener(AnimatedAttributeListener aal)
Removes an {@link AnimatedAttributeListener} from this document.

removeCSSNavigableDocumentListener

public void removeCSSNavigableDocumentListener(CSSNavigableDocumentListener l)
Removes an event listener for mutations on the CSSNavigableDocument tree.

setDocumentURI

public void setDocumentURI(String uri)
DOM: Implements {@link org.w3c.dom.Document#setDocumentURI(String)}.

setIsSVG12

public void setIsSVG12(boolean b)
Sets whether the document supports SVG 1.2.

setLocale

public void setLocale(Locale l)
Implements {@link Localizable#setLocale(Locale)}.

setReadonly

public void setReadonly(boolean v)
Sets this node readonly attribute.

setReferrer

public void setReferrer(String s)
Sets the referrer string.

setURLObject

public void setURLObject(URL url)
Sets the URI of the document.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.