@Immutable
public final class CdmS3Uri
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SCHEME_CDM_S3 |
Constructor and Description |
---|
CdmS3Uri(java.lang.String cdmUriString)
A
URI for use by the CDM for identifying a resource on an Object Store, such as AWS S3, Google Cloud
Storage, Azure Blob Storage, Ceph, etc. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getBucket() |
java.util.Optional<java.lang.String> |
getDelimiter() |
java.util.Optional<java.net.URI> |
getEndpoint() |
java.util.Optional<java.lang.String> |
getKey() |
java.util.Optional<java.lang.String> |
getProfile() |
int |
hashCode() |
boolean |
isAws()
Heuristic to check if
CdmS3Uri represents an AWS S3 Object |
CdmS3Uri |
resolveNewKey(java.lang.String newKey)
Create a new
CdmS3Uri for the same bucket but using a new key. |
java.lang.String |
toString() |
public static final java.lang.String SCHEME_CDM_S3
public CdmS3Uri(java.lang.String cdmUriString) throws java.net.URISyntaxException
URI
for use by the CDM for identifying a resource on an Object Store, such as AWS S3, Google Cloud
Storage, Azure Blob Storage, Ceph, etc.
Using the generic URI syntax from RFC3986, the CDM will identify resources located in an object store as follows:
Example 1: cdms3://my-profile@bucket.unidata.ucar.edu:443/data/gfs0p25?26/03/2020/data.nc#delimiter=/
Example 2: cdms3:noaa-goes16?ABI-L1b-RadC/2017/242/00/data.nc
Example cdms3 URIs:
cdmUriString
- String representation of the cdms3 URIjava.net.URISyntaxException
- If the given string violates RFC2396, as augmented
by URI
, or does not define the required URI
components for a cdms3 URI.public java.lang.String getBucket()
public java.util.Optional<java.lang.String> getKey()
public java.util.Optional<java.lang.String> getProfile()
public java.util.Optional<java.net.URI> getEndpoint()
public java.util.Optional<java.lang.String> getDelimiter()
public java.lang.String toString()
toString
in class java.lang.Object
public CdmS3Uri resolveNewKey(java.lang.String newKey) throws java.net.URISyntaxException
CdmS3Uri
for the same bucket but using a new key.newKey
- new key to use in the new CdmS3UriCdmS3Uri
using new keyjava.net.URISyntaxException
public boolean isAws()
CdmS3Uri
represents an AWS S3 Objectpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object