Package org.exolab.adaptx.xml
Class DOMURILocation
- java.lang.Object
-
- org.exolab.adaptx.net.URILocation
-
- org.exolab.adaptx.net.ObjectURILocation
-
- org.exolab.adaptx.xml.DOMURILocation
-
public final class DOMURILocation extends ObjectURILocation
An implementation of ObjectURILocation for a DOM Node- Author:
- Keith Visco
-
-
Constructor Summary
Constructors Constructor Description DOMURILocation(org.w3c.dom.Node node, java.lang.String href)
Creates a new DOMURILocation
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAbsoluteURI()
Returns the absolute URI for this URILocationjava.lang.String
getBaseURI()
Returns the base location of this URILocation.org.w3c.dom.Node
getNode()
Returns the DOM Node from this URILocationjava.lang.Object
getObject()
Returns the Object from this ObjectURILocation.java.io.Reader
getReader()
Returns the reader for this URILocation.java.lang.String
getRelativeURI()
Returns the relative URI for this URILocationjava.lang.String
toString()
Returns the String representation of this URILocation.
-
-
-
Method Detail
-
getAbsoluteURI
public java.lang.String getAbsoluteURI()
Returns the absolute URI for this URILocation- Specified by:
getAbsoluteURI
in classURILocation
- Returns:
- the absolute URI for this URILocation
- See Also:
getRelativeURI()
,getBaseURI()
-
getBaseURI
public java.lang.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.- Specified by:
getBaseURI
in classURILocation
- Returns:
- the base location of this URILocation
- See Also:
getAbsoluteURI()
,getRelativeURI()
-
getNode
public org.w3c.dom.Node getNode()
Returns the DOM Node from this URILocation- Returns:
- the DOM Node from this URILocation
-
getObject
public java.lang.Object getObject()
Returns the Object from this ObjectURILocation.- Specified by:
getObject
in classObjectURILocation
- Returns:
- the Object from this ObjectURILocation
- See Also:
getNode()
-
getReader
public java.io.Reader getReader() throws java.io.IOException
Returns the reader for this URILocation.This method always return null. Use getObject() or getNode() methods instead.
- Specified by:
getReader
in classURILocation
- Returns:
- a Reader for the resource represented by this URILocation
- Throws:
java.io.FileNotFoundException
java.io.IOException
-
getRelativeURI
public java.lang.String getRelativeURI()
Returns the relative URI for this URILocation- Specified by:
getRelativeURI
in classURILocation
- Returns:
- the relative URI for this URILocation
- See Also:
getAbsoluteURI()
,getBaseURI()
-
toString
public java.lang.String toString()
Returns the String representation of this URILocation.- Overrides:
toString
in classURILocation
- Returns:
- the String representation of this URILocation
-
-