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_EXTENSIONMOLECULE_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, waitclose, deepList, deepList, deepList, deepList, deepList, deepListHelper, getGroupSeparator, groupPathprotected 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 MoleculeArchiveSourcepublic java.lang.String getPath()
getPath in interface MoleculeArchiveSourcepublic java.lang.String getName()
getName in interface MoleculeArchiveSourcepublic void initializeLocation()
throws java.io.IOException
initializeLocation in interface MoleculeArchiveSourcejava.io.IOExceptionpublic boolean isVirtual()
isVirtual in interface MoleculeArchiveSourcepublic boolean isReachable()
isReachable in interface MoleculeArchiveSourcepublic java.lang.String getArchiveType()
throws java.io.IOException
getArchiveType in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.InputStream getInputStream()
throws java.io.IOException
getInputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.OutputStream getOutputStream()
throws java.io.IOException
getOutputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.InputStream getRoverInputStream()
throws java.io.IOException
getRoverInputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.OutputStream getRoverOutputStream()
throws java.io.IOException
getRoverOutputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.InputStream getPropertiesInputStream()
throws java.io.IOException
getPropertiesInputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.OutputStream getPropertiesOutputStream()
throws java.io.IOException
getPropertiesOutputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.InputStream getIndexesInputStream()
throws java.io.IOException
getIndexesInputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.OutputStream getIndexesOutputStream()
throws java.io.IOException
getIndexesOutputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.InputStream getMoleculeInputStream(java.lang.String UID)
throws java.io.IOException
getMoleculeInputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.OutputStream getMoleculeOutputStream(java.lang.String UID)
throws java.io.IOException
getMoleculeOutputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic void removeMolecule(java.lang.String UID)
throws java.io.IOException
removeMolecule in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.InputStream getMetadataInputStream(java.lang.String metaUID)
throws java.io.IOException
getMetadataInputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.io.OutputStream getMetadataOutputStream(java.lang.String metaUID)
throws java.io.IOException
getMetadataOutputStream in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.util.List<java.lang.String> getMoleculeUIDs()
getMoleculeUIDs in interface MoleculeArchiveSourcepublic java.util.List<java.lang.String> getMetadataUIDs()
getMetadataUIDs in interface MoleculeArchiveSourcepublic void removeMetadata(java.lang.String metaUID)
throws java.io.IOException
removeMetadata in interface MoleculeArchiveSourcejava.io.IOExceptionpublic java.lang.String getURI()
getURI in interface MoleculeArchiveStoragepublic boolean exists(java.lang.String pathName)
throws java.io.IOException
MoleculeArchiveStorageexists in interface MoleculeArchiveStoragepathName - 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
MoleculeArchiveStoragelist in interface MoleculeArchiveStoragepathName - 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
MoleculeArchiveStoragelistDirectories in interface MoleculeArchiveStoragepathName - 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
MoleculeArchiveStoragelistFiles in interface MoleculeArchiveStoragepathName - group pathjava.io.IOException - an exception is thrown if pathName is not a valid group