public class URIUtils extends Object
| Constructor and Description |
|---|
URIUtils() |
| Modifier and Type | Method and Description |
|---|---|
static File |
dereferenceURI(URI uriRef)
Dereferences the given URI and stores the resulting resource
representation in a local file.
|
static Node |
parseURI(URI uriRef)
Parses the content of the given URI as an XML document and returns a new
DOM Node object representing the referent.
|
static URI |
resolveRelativeURI(String baseURI,
String uriRef)
Constructs an absolute URI from the given URI reference and a base URI.
|
public static Node parseURI(URI uriRef) throws SAXException, IOException
If the URI reference contains a fragment identifier, the subresource will be returned if the fragment is a valid XPointer; otherwise the primary resource is returned (as a Document node). Only the shorthand pointer syntax--commonly used to identify an element by identifier--is supported.
uriRef - An absolute URI specifying the location of an XML
(sub)resource; it may contain a fragment identifier
(XPointer).SAXException - If the resource cannot be parsed.IOException - If the resource is not accessible.public static File dereferenceURI(URI uriRef) throws IOException
uriRef - An absolute URI specifying the location of some resource.IOException - If an IO error occurred.public static URI resolveRelativeURI(String baseURI, String uriRef)
baseURI - The base URI; if present, it must be an absolute URI.uriRef - A URI reference that may be relative to the given base URI.Copyright © 2016 Open Geospatial Consortium. All rights reserved.