public class TGFileStore extends FileStore implements IFileStore
EMPTY_FILE_INFO_ARRAY, EMPTY_STRING_ARRAY
Constructor and Description |
---|
TGFileStore(URI uri) |
Modifier and Type | Method and Description |
---|---|
String[] |
childNames(int options,
IProgressMonitor monitor)
We don't have children.
|
protected void |
copyFile(IFileInfo sourceInfo,
IFileStore destination,
int options,
IProgressMonitor monitor) |
void |
delete(int options,
IProgressMonitor monitor) |
protected InputStream |
doOpenInputStream(int options,
IProgressMonitor monitor)
Deprecated.
Use
doOpenInputStream(int,IProgressMonitor,boolean) instead |
protected InputStream |
doOpenInputStream(int options,
IProgressMonitor monitor,
boolean setMetadata) |
IFileInfo |
fetchInfo(int options,
IProgressMonitor monitor) |
IFileStore |
getChild(String name)
We don't have children.
|
String |
getName() |
IFileStore |
getParent()
Poor TextGridObjects do not have parents.
|
TextGridObject |
getTextGridObject() |
protected void |
invalidateFileInfoCache() |
boolean |
isParentOf(IFileStore other) |
protected IOException |
newIOException(Throwable cause,
String message,
Object... args)
A syntactic sugar method crafting new, encapsulating IOExceptions.
|
InputStream |
openInputStream(int options,
IProgressMonitor monitor) |
OutputStream |
openOutputStream(int options,
IProgressMonitor monitor) |
void |
putInfo(IFileInfo info,
int options,
IProgressMonitor monitor) |
protected FileInfo |
readFileInfo(IProgressMonitor monitor)
Reads the file information to the file information cache.
|
File |
toLocalFile(int options,
IProgressMonitor monitor)
A new caching toLocalFile method for filestores from
TextGridObject s. |
URI |
toURI() |
void |
updateMetadata(info.textgrid.namespaces.metadata.core._2010.ObjectType element)
Updates the metadata from the given XML fragment.
|
childInfos, childStores, copy, copyDirectory, equals, fetchInfo, getChild, getFileStore, getFileSystem, hashCode, mkdir, move, toString
getAdapter
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
childInfos, childStores, copy, fetchInfo, getChild, getFileStore, getFileSystem, mkdir, move, toString
getAdapter
public TGFileStore(URI uri) throws CoreException
CoreException
protected void copyFile(IFileInfo sourceInfo, IFileStore destination, int options, IProgressMonitor monitor) throws CoreException
copyFile
in class FileStore
CoreException
public String[] childNames(int options, IProgressMonitor monitor) throws CoreException
childNames
in interface IFileStore
childNames
in class FileStore
CoreException
getParent()
,
FileStore.childNames(int,
org.eclipse.core.runtime.IProgressMonitor)
public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException
fetchInfo
in interface IFileStore
fetchInfo
in class FileStore
CoreException
protected FileInfo readFileInfo(IProgressMonitor monitor) throws CoreException
CoreException
public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException
putInfo
in interface IFileStore
putInfo
in class FileStore
CoreException
protected void invalidateFileInfoCache()
public IFileStore getChild(String name)
getChild
in interface IFileStore
getChild
in class FileStore
getParent()
,
FileStore.getChild(java.lang.String)
public String getName()
getName
in interface IFileStore
getName
in class FileStore
public IFileStore getParent()
getParent
in interface IFileStore
getParent
in class FileStore
FileStore.getParent()
public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException
openInputStream
in interface IFileStore
openInputStream
in class FileStore
CoreException
protected InputStream doOpenInputStream(int options, IProgressMonitor monitor) throws CoreException
doOpenInputStream(int,IProgressMonitor,boolean)
insteadCoreException
protected InputStream doOpenInputStream(int options, IProgressMonitor monitor, boolean setMetadata) throws CoreException
CoreException
public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException
openOutputStream
in interface IFileStore
openOutputStream
in class FileStore
CoreException
protected IOException newIOException(Throwable cause, String message, Object... args)
cause
- the cause that caused the trouble.message
- some message to describe the error in more detail. May be null
if you provide a cause.args
- optional arguments for the message, see
MessageFormat.format(String, Object...)
IOException
encapsulating the given information.public URI toURI()
toURI
in interface IFileStore
toURI
in class FileStore
public void delete(int options, IProgressMonitor monitor) throws CoreException
delete
in interface IFileStore
delete
in class FileStore
CoreException
public boolean isParentOf(IFileStore other)
isParentOf
in interface IFileStore
isParentOf
in class FileStore
public void updateMetadata(info.textgrid.namespaces.metadata.core._2010.ObjectType element) throws CrudServiceException
element
- CrudServiceException
public TextGridObject getTextGridObject() throws CrudServiceException
CrudServiceException
public File toLocalFile(int options, IProgressMonitor monitor) throws CoreException
TextGridObject
s.
This has two advantages over the default implementation:
toLocalFile
in interface IFileStore
toLocalFile
in class FileStore
CoreException