org.apache.batik.bridge
Class URIResolver
java.lang.Object
|
+--org.apache.batik.bridge.URIResolver
- public class URIResolver
- extends java.lang.Object
This class is used to resolve the URI that can be found in a SVG document.
Method Summary |
Element |
getElement(java.lang.String uri,
Element ref)
Imports the Element referenced by the given URI on Element
ref. |
Node |
getNode(java.lang.String uri,
Element ref)
Imports the Node referenced by the given URI on Element
ref. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
document
protected SVGOMDocument document
- The reference document.
documentURI
protected java.lang.String documentURI
- The document URI.
documentLoader
protected DocumentLoader documentLoader
- The document loader.
URIResolver
public URIResolver(SVGDocument doc,
DocumentLoader dl)
- Creates a new URI resolver object.
- Parameters:
doc
- The reference document.dl
- The document loader.
getElement
public Element getElement(java.lang.String uri,
Element ref)
throws java.net.MalformedURLException,
java.io.IOException
- Imports the Element referenced by the given URI on Element
ref.
- Parameters:
uri
- The element URI.ref
- The Element in the DOM tree to evaluate uri
from.- Returns:
- The referenced element or null if element can't be found.
getNode
public Node getNode(java.lang.String uri,
Element ref)
throws java.net.MalformedURLException,
java.io.IOException,
java.lang.SecurityException
- Imports the Node referenced by the given URI on Element
ref.
- Parameters:
uri
- The element URI.ref
- The Element in the DOM tree to evaluate uri
from.- Returns:
- The referenced Node/Document or null if element can't be found.
Copyright © 2002 Apache Software Foundation. All Rights Reserved.