dirLocation = URLnaming.resolve(ncmlLocation, dirLocation); // possible relative location
/** * Resolve reletive URIs, using the catalog's base URI. If the uriString is not reletive, then * no resolution is done. This also allows baseURI to be a file: scheme. * * @param uriString any url, reletive or absolute * @return resolved url string, or null on error * @throws java.net.URISyntaxException if uriString violates RFC 2396 * @see java.net.URI#resolve */ public URI resolveUri(String uriString) throws URISyntaxException { if (baseURI == null) return new URI(uriString); String resolved = URLnaming.resolve(baseURI.toString(), uriString); return new URI(resolved); }
private ThreddsMetadata.UriResolved readUri(Element elemWithHref, String what) { if (elemWithHref == null) { return null; } String mapHref = elemWithHref.getAttributeValue("href", Catalog.xlinkNS); if (mapHref == null) { return null; } try { String mapUri = URLnaming.resolve(baseURI.toString(), mapHref); return new ThreddsMetadata.UriResolved(mapHref, new URI(mapUri)); } catch (Exception e) { errlog.format(" ** Invalid %s URI= '%s' err='%s'%n", what, mapHref, e.getMessage()); return null; } } }
referencedDatasetUri = URLnaming.resolve(ncmlLocation, referencedDatasetUri);
referencedDatasetUri = URLnaming.resolve(ncmlLocation, referencedDatasetUri);
referencedDatasetUri = URLnaming.resolve(ncmlLocation, referencedDatasetUri);
dirLocation = URLnaming.resolve(ncmlLocation, dirLocation); // possible relative location
dirLocation = URLnaming.resolve(ncmlLocation, dirLocation); // possible relative location