Class GcsResourceId
java.lang.Object
org.apache.beam.sdk.extensions.gcp.storage.GcsResourceId
- All Implemented Interfaces:
 Serializable,ResourceId
ResourceId implementation for Google Cloud Storage.- See Also:
 
- 
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns theResourceIdthat represents the current directory of thisResourceId.Returns the name of the file or directory denoted by thisResourceId.Get the scheme which defines the namespace of theResourceId.inthashCode()booleanReturnstrueif thisResourceIdrepresents a directory, false otherwise.resolve(String other, ResolveOptions resolveOptions) Returns a childResourceIdunderthis.toString()Returns the string representation of thisResourceId. 
- 
Method Details
- 
resolve
Description copied from interface:ResourceIdReturns a childResourceIdunderthis.In order to write file system agnostic code, callers should not include delimiters in
other, and should useResolveOptions.StandardResolveOptionsto specify whether to resolve a file or a directory.For example:
ResourceId homeDir = ...; ResourceId tempOutput = homeDir .resolve("tempDir", StandardResolveOptions.RESOLVE_DIRECTORY) .resolve("output", StandardResolveOptions.RESOLVE_FILE);This
ResourceIdshould represents a directory.It is up to each file system to resolve in their own way.
Resolving special characters:
resourceId.resolve("..", StandardResolveOptions.RESOLVE_DIRECTORY)returns the parent directory of thisResourceId.resourceId.resolve("*", StandardResolveOptions.RESOLVE_FILE)returns aResourceIdwhich matches all files in thisResourceId.resourceId.resolve("*", StandardResolveOptions.RESOLVE_DIRECTORY)returns aResourceIdwhich matches all directories in thisResourceId.
- Specified by:
 resolvein interfaceResourceId
 - 
getCurrentDirectory
Description copied from interface:ResourceIdReturns theResourceIdthat represents the current directory of thisResourceId.If it is already a directory, trivially returns this.
- Specified by:
 getCurrentDirectoryin interfaceResourceId
 - 
isDirectory
public boolean isDirectory()Description copied from interface:ResourceIdReturnstrueif thisResourceIdrepresents a directory, false otherwise.- Specified by:
 isDirectoryin interfaceResourceId
 - 
getScheme
Description copied from interface:ResourceIdGet the scheme which defines the namespace of theResourceId.The scheme is required to follow URI scheme syntax. See RFC 2396
- Specified by:
 getSchemein interfaceResourceId
 - 
getFilename
Description copied from interface:ResourceIdReturns the name of the file or directory denoted by thisResourceId. The file name is the farthest element from the root in the directory hierarchy.- Specified by:
 getFilenamein interfaceResourceId- Returns:
 - a string representing the name of file or directory, or null if there are zero components.
 
 - 
toString
Description copied from interface:ResourceIdReturns the string representation of thisResourceId.The corresponding
FileSystem.match(java.util.List<java.lang.String>)is required to accept this string representation.- Specified by:
 toStringin interfaceResourceId- Overrides:
 toStringin classObject
 - 
equals
 - 
hashCode
public int hashCode() 
 -