Package ucar.nc2.dataset
Class DatasetUrl
- java.lang.Object
-
- ucar.nc2.dataset.DatasetUrl
-
public class DatasetUrl extends Object
Detection of the protocol from a location string. TODO: Review and refactor as needed. Perhaps BiMap\? - Since:
- 10/20/2015.
-
-
Field Summary
Fields Modifier and Type Field Description ServiceType
serviceType
Deprecated.String
trueurl
Deprecated.
-
Constructor Summary
Constructors Constructor Description DatasetUrl(ServiceType serviceType, String trueurl)
Deprecated.use create()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DatasetUrl
create(ServiceType serviceType, String trueurl)
Create a DatasetUrl, which annotates a url with its service type.boolean
equals(Object o)
static DatasetUrl
findDatasetUrl(String orgLocation)
static List<String>
getProtocols(String url)
Return the set of leading protocols for a url; may be more than one.ServiceType
getServiceType()
String
getTrueurl()
int
hashCode()
-
-
-
Field Detail
-
serviceType
@Deprecated public final ServiceType serviceType
Deprecated.
-
trueurl
@Deprecated public final String trueurl
Deprecated.
-
-
Constructor Detail
-
DatasetUrl
@Deprecated public DatasetUrl(ServiceType serviceType, String trueurl)
Deprecated.use create()
-
-
Method Detail
-
getProtocols
public static List<String> getProtocols(String url)
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
public static DatasetUrl findDatasetUrl(String orgLocation) throws IOException
- Throws:
IOException
-
create
public static DatasetUrl create(@Nullable ServiceType serviceType, String trueurl)
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
-
getServiceType
public ServiceType getServiceType()
-
getTrueurl
public String getTrueurl()
-
-