Class FileStorage
- java.lang.Object
-
- de.unirostock.sems.ModelCrawler.storage.ModelStorage
-
- de.unirostock.sems.ModelCrawler.storage.FileBasedStorage
-
- de.unirostock.sems.ModelCrawler.storage.FileStorage
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
public class FileStorage extends FileBasedStorage
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.unirostock.sems.ModelCrawler.storage.FileBasedStorage
FileBasedStorage.VersionInfo
-
Nested classes/interfaces inherited from class de.unirostock.sems.ModelCrawler.storage.ModelStorage
ModelStorage.Types
-
-
Field Summary
-
Fields inherited from class de.unirostock.sems.ModelCrawler.storage.FileBasedStorage
config, httpAccessPath
-
-
Constructor Summary
Constructors Constructor Description FileStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeConnection()
File
getBaseDir()
protected InputStream
getFile(String path)
protected void
initConnection()
protected void
linkFiles(String sourcePath, String targetPath)
protected void
makeDirs(String path)
void
setBaseDir(File baseDir)
protected void
storeFile(InputStream source, String path)
protected void
storeFile(InputStream source, String path, boolean override)
-
Methods inherited from class de.unirostock.sems.ModelCrawler.storage.FileBasedStorage
close, connect, getHttpAccessPath, linkModelVersion, setHttpAccessPath, storeModel
-
Methods inherited from class de.unirostock.sems.ModelCrawler.storage.ModelStorage
storeModelChangeSet
-
-
-
-
Method Detail
-
initConnection
protected void initConnection() throws StorageException
- Specified by:
initConnection
in classFileBasedStorage
- Throws:
StorageException
-
closeConnection
protected void closeConnection()
- Specified by:
closeConnection
in classFileBasedStorage
-
makeDirs
protected void makeDirs(String path) throws StorageException
- Specified by:
makeDirs
in classFileBasedStorage
- Throws:
StorageException
-
storeFile
protected void storeFile(InputStream source, String path) throws StorageException
- Specified by:
storeFile
in classFileBasedStorage
- Throws:
StorageException
-
storeFile
protected void storeFile(InputStream source, String path, boolean override) throws StorageException
- Specified by:
storeFile
in classFileBasedStorage
- Throws:
StorageException
-
getFile
protected InputStream getFile(String path) throws StorageException
- Specified by:
getFile
in classFileBasedStorage
- Throws:
StorageException
-
linkFiles
protected void linkFiles(String sourcePath, String targetPath) throws StorageException
- Specified by:
linkFiles
in classFileBasedStorage
- Throws:
StorageException
-
getBaseDir
public File getBaseDir()
-
setBaseDir
public void setBaseDir(File baseDir)
-
-