Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`protected SVGOMDocument` | `document` The reference document.
`protected DocumentLoader` | `documentLoader` The document loader.
`protected java.lang.String` | `documentURI` The document URI.

Constructor Summary
`URIResolver(SVGDocument doc, DocumentLoader dl)` Creates a new URI resolver object.

Method Summary
`org.w3c.dom.Element` | `getElement(java.lang.String uri, org.w3c.dom.Element ref)` Imports the Element referenced by the given URI on Element `ref`.
`org.w3c.dom.Node` | `getNode(java.lang.String uri, org.w3c.dom.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`

Field Detail

### document

    protected SVGOMDocument document

  The reference document.

### documentURI

    protected java.lang.String documentURI

  The document URI.

### documentLoader

    protected DocumentLoader documentLoader

  The document loader.

Constructor Detail

### URIResolver

    public URIResolver(SVGDocument doc,
                       DocumentLoader dl)

  Creates a new URI resolver object.

Parameters:
  `doc` - The reference document.
  `dl` - The document loader.

Method Detail

### getElement

    public org.w3c.dom.Element getElement(java.lang.String uri,
                                          org.w3c.dom.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.
  Throws:
    `java.net.MalformedURLException`
    `java.io.IOException`

### getNode

    public org.w3c.dom.Node getNode(java.lang.String uri,
                                    org.w3c.dom.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.
  Throws:
    `java.net.MalformedURLException`
    `java.io.IOException`
    `java.lang.SecurityException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Apache Software Foundation. All Rights Reserved.