public class MoleculeArchiveAmazonS3Source extends java.lang.Object implements MoleculeArchiveSource
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
bucketName |
protected java.lang.String |
containerPath |
protected java.lang.String |
fileExtension |
protected MoleculeArchiveAmazonS3KeyValueAccess |
keyValueAccess |
protected com.amazonaws.services.s3.AmazonS3 |
s3 |
INDEXES_FILE_NAME, METADATA_SUBDIRECTORY_NAME, MOLECULES_SUBDIRECTORY_NAME, PROPERTIES_FILE_NAME, ROVER_FILE_EXTENSION
MOLECULE_ARCHIVE_ENDING, MOLECULE_ARCHIVE_STORE_ENDING, N5_DATASET_DIRECTORY_ENDING
Constructor and Description |
---|
MoleculeArchiveAmazonS3Source(com.amazonaws.services.s3.AmazonS3 s3,
com.amazonaws.services.s3.AmazonS3URI containerURI)
Opens an
If the bucket and/or container does not exist, it will not be created and
all subsequent attempts to read attributes, groups, or datasets will fail.
|
MoleculeArchiveAmazonS3Source(com.amazonaws.services.s3.AmazonS3 s3,
java.lang.String bucketName)
Opens an
If the bucket does not exist, it will not be created and
all subsequent attempts to read attributes, groups, or datasets will fail.
|
MoleculeArchiveAmazonS3Source(com.amazonaws.services.s3.AmazonS3 s3,
java.lang.String bucketName,
java.lang.String containerPath)
Opens an
If the bucket and/or container does not exist, it will not be created and
all subsequent attempts to read attributes, groups, or datasets will fail.
|
Modifier and Type | Method and Description |
---|---|
boolean |
exists(java.lang.String pathName)
Test whether a group or dataset exists at a given path.
|
java.lang.String |
getArchiveType() |
java.io.InputStream |
getIndexesInputStream() |
java.io.OutputStream |
getIndexesOutputStream() |
java.io.InputStream |
getInputStream() |
java.io.InputStream |
getMetadataInputStream(java.lang.String metaUID) |
java.io.OutputStream |
getMetadataOutputStream(java.lang.String metaUID) |
java.util.List<java.lang.String> |
getMetadataUIDs() |
java.io.InputStream |
getMoleculeInputStream(java.lang.String UID) |
java.io.OutputStream |
getMoleculeOutputStream(java.lang.String UID) |
java.util.List<java.lang.String> |
getMoleculeUIDs() |
java.lang.String |
getName() |
java.io.OutputStream |
getOutputStream() |
java.lang.String |
getPath() |
java.io.InputStream |
getPropertiesInputStream() |
java.io.OutputStream |
getPropertiesOutputStream() |
java.io.InputStream |
getRoverInputStream() |
java.io.OutputStream |
getRoverOutputStream() |
java.lang.String |
getURI() |
void |
initializeLocation() |
boolean |
isReachable() |
boolean |
isVirtual() |
java.lang.String[] |
list(java.lang.String pathName)
List all groups (including datasets) in a group.
|
java.lang.String[] |
listDirectories(java.lang.String pathName)
List all groups (including datasets) in a group.
|
java.lang.String[] |
listFiles(java.lang.String pathName)
List all groups (including datasets) in a group.
|
void |
removeMetadata(java.lang.String metaUID) |
void |
removeMolecule(java.lang.String UID) |
void |
setPath(java.lang.String path) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, deepList, deepList, deepList, deepList, deepList, deepListHelper, getGroupSeparator, groupPath
protected final com.amazonaws.services.s3.AmazonS3 s3
protected final java.lang.String bucketName
protected java.lang.String containerPath
protected java.lang.String fileExtension
protected final MoleculeArchiveAmazonS3KeyValueAccess keyValueAccess
public MoleculeArchiveAmazonS3Source(com.amazonaws.services.s3.AmazonS3 s3, java.lang.String bucketName) throws java.io.IOException
s3
- AmazonS3 location.bucketName
- the name of the bucket.java.io.IOException
- thrown when reading or writing to the location fails.public MoleculeArchiveAmazonS3Source(com.amazonaws.services.s3.AmazonS3 s3, com.amazonaws.services.s3.AmazonS3URI containerURI) throws java.io.IOException
s3
- AmazonS3 location.containerURI
- the container uri.java.io.IOException
- thrown when reading or writing to the location fails.public MoleculeArchiveAmazonS3Source(com.amazonaws.services.s3.AmazonS3 s3, java.lang.String bucketName, java.lang.String containerPath) throws java.io.IOException
s3
- AmazonS3 location.bucketName
- the name of the bucket.containerPath
- the object path within the bucket.java.io.IOException
- thrown when reading or writing to the location fails.public void setPath(java.lang.String path)
setPath
in interface MoleculeArchiveSource
public java.lang.String getPath()
getPath
in interface MoleculeArchiveSource
public java.lang.String getName()
getName
in interface MoleculeArchiveSource
public void initializeLocation() throws java.io.IOException
initializeLocation
in interface MoleculeArchiveSource
java.io.IOException
public boolean isVirtual()
isVirtual
in interface MoleculeArchiveSource
public boolean isReachable()
isReachable
in interface MoleculeArchiveSource
public java.lang.String getArchiveType() throws java.io.IOException
getArchiveType
in interface MoleculeArchiveSource
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.InputStream getRoverInputStream() throws java.io.IOException
getRoverInputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.OutputStream getRoverOutputStream() throws java.io.IOException
getRoverOutputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.InputStream getPropertiesInputStream() throws java.io.IOException
getPropertiesInputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.OutputStream getPropertiesOutputStream() throws java.io.IOException
getPropertiesOutputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.InputStream getIndexesInputStream() throws java.io.IOException
getIndexesInputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.OutputStream getIndexesOutputStream() throws java.io.IOException
getIndexesOutputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.InputStream getMoleculeInputStream(java.lang.String UID) throws java.io.IOException
getMoleculeInputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.OutputStream getMoleculeOutputStream(java.lang.String UID) throws java.io.IOException
getMoleculeOutputStream
in interface MoleculeArchiveSource
java.io.IOException
public void removeMolecule(java.lang.String UID) throws java.io.IOException
removeMolecule
in interface MoleculeArchiveSource
java.io.IOException
public java.io.InputStream getMetadataInputStream(java.lang.String metaUID) throws java.io.IOException
getMetadataInputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.io.OutputStream getMetadataOutputStream(java.lang.String metaUID) throws java.io.IOException
getMetadataOutputStream
in interface MoleculeArchiveSource
java.io.IOException
public java.util.List<java.lang.String> getMoleculeUIDs()
getMoleculeUIDs
in interface MoleculeArchiveSource
public java.util.List<java.lang.String> getMetadataUIDs()
getMetadataUIDs
in interface MoleculeArchiveSource
public void removeMetadata(java.lang.String metaUID) throws java.io.IOException
removeMetadata
in interface MoleculeArchiveSource
java.io.IOException
public java.lang.String getURI()
getURI
in interface MoleculeArchiveStorage
public boolean exists(java.lang.String pathName) throws java.io.IOException
MoleculeArchiveStorage
exists
in interface MoleculeArchiveStorage
pathName
- group pathjava.io.IOException
- an exception is thrown if the source is not accessiblepublic java.lang.String[] list(java.lang.String pathName) throws java.io.IOException
MoleculeArchiveStorage
list
in interface MoleculeArchiveStorage
pathName
- group pathjava.io.IOException
- an exception is thrown if pathName is not a valid grouppublic java.lang.String[] listDirectories(java.lang.String pathName) throws java.io.IOException
MoleculeArchiveStorage
listDirectories
in interface MoleculeArchiveStorage
pathName
- group pathjava.io.IOException
- an exception is thrown if pathName is not a valid grouppublic java.lang.String[] listFiles(java.lang.String pathName) throws java.io.IOException
MoleculeArchiveStorage
listFiles
in interface MoleculeArchiveStorage
pathName
- group pathjava.io.IOException
- an exception is thrown if pathName is not a valid group