Package ucar.nc2.dataset
Class DatasetUrl
java.lang.Object
ucar.nc2.dataset.DatasetUrl
Detection of the protocol from a location string.
TODO: Review and refactor as needed. Perhaps BiMap\<ServiceType, String>?
- Since:
- 10/20/2015.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDatasetUrl(ServiceType serviceType, String trueurl) Deprecated.use create() -
Method Summary
Modifier and TypeMethodDescriptionstatic DatasetUrlcreate(ServiceType serviceType, String trueurl) Create a DatasetUrl, which annotates a url with its service type.booleanstatic DatasetUrlfindDatasetUrl(String orgLocation) getProtocols(String url) Return the set of leading protocols for a url; may be more than one.inthashCode()
-
Field Details
-
serviceType
Deprecated. -
trueurl
Deprecated.
-
-
Constructor Details
-
DatasetUrl
Deprecated.use create()
-
-
Method Details
-
getProtocols
Return the set of leading protocols for a url; may be more than one. Watch out for Windows paths starting with a drive letter => protocol names must all have a length > 1. Watch out for '::' Each captured protocol is saved without trailing ':' Assume: the protocols MUST be terminated by the occurrence of '/'.- Parameters:
url- the url whose protocols to return- Returns:
- list of leading protocols without the trailing :
-
findDatasetUrl
- Throws:
IOException
-
create
Create a DatasetUrl, which annotates a url with its service type.- Parameters:
serviceType- The serviceType, may be null if not known.trueurl- The actual URL
-
equals
-
hashCode
public int hashCode() -
getServiceType
-
getTrueurl
-