org.exolab.adaptx.xml

Class DOMURILocation


public final class DOMURILocation
extends ObjectURILocation

An implementation of ObjectURILocation for a DOM Node
Author:
Keith Visco

Constructor Summary

DOMURILocation(Node node, String href)
Creates a new DOMURILocation

Method Summary

String
getAbsoluteURI()
Returns the absolute URI for this URILocation
String
getBaseURI()
Returns the base location of this URILocation.
Node
getNode()
Returns the DOM Node from this URILocation
Object
getObject()
Returns the Object from this ObjectURILocation.
Reader
getReader()
Returns the reader for this URILocation.
String
getRelativeURI()
Returns the relative URI for this URILocation
String
toString()
Returns the String representation of this URILocation.

Methods inherited from class org.exolab.adaptx.net.ObjectURILocation

getObject

Methods inherited from class org.exolab.adaptx.net.URILocation

getAbsoluteURI, getBaseURI, getReader, getRelativeURI, toString

Constructor Details

DOMURILocation

public DOMURILocation(Node node,
                      String href)
Creates a new DOMURILocation

Method Details

getAbsoluteURI

public String getAbsoluteURI()
Returns the absolute URI for this URILocation
Overrides:
getAbsoluteURI in interface URILocation
Returns:
the absolute URI for this URILocation
See Also:
getRelativeURI, getBaseURI

getBaseURI

public String getBaseURI()
Returns the base location of this URILocation. If this URILocation is an URL, the base location will be equivalent to the document base for the URL.
Overrides:
getBaseURI in interface URILocation
Returns:
the base location of this URILocation
See Also:
getAbsoluteURI, getRelativeURI

getNode

public Node getNode()
Returns the DOM Node from this URILocation
Returns:
the DOM Node from this URILocation

getObject

public Object getObject()
Returns the Object from this ObjectURILocation.
Overrides:
getObject in interface ObjectURILocation
Returns:
the Object from this ObjectURILocation
See Also:
getNode()

getReader

public Reader getReader()
            throws java.io.IOException
Returns the reader for this URILocation.

This method always return null. Use getObject() or getNode() methods instead.

Overrides:
getReader in interface URILocation
Returns:
a Reader for the resource represented by this URILocation

getRelativeURI

public String getRelativeURI()
Returns the relative URI for this URILocation
Overrides:
getRelativeURI in interface URILocation
Returns:
the relative URI for this URILocation
See Also:
getAbsoluteURI, getBaseURI

toString

public String toString()
Returns the String representation of this URILocation.
Overrides:
toString in interface URILocation
Returns:
the String representation of this URILocation