Class BioModelsDb
- java.lang.Object
-
- de.unirostock.sems.ModelCrawler.databases.Interface.ModelDatabase
-
- de.unirostock.sems.ModelCrawler.databases.BioModelsDb.BioModelsDb
-
- All Implemented Interfaces:
Closeable
,Serializable
,AutoCloseable
,Callable<Map<String,ChangeSet>>
public class BioModelsDb extends ModelDatabase
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.unirostock.sems.ModelCrawler.databases.Interface.ModelDatabase
ModelDatabase.DatabaseTypes
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,ChangeSet>
changeSetMap
protected de.unirostock.sems.ModelCrawler.databases.BioModelsDb.BioModelsDb.WorkingDirConfig
config
-
Fields inherited from class de.unirostock.sems.ModelCrawler.databases.Interface.ModelDatabase
enabled, limit, modelStorage, morreClient, tempDir
-
-
Constructor Summary
Constructors Constructor Description BioModelsDb()
Default empty constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,ChangeSet>
call()
Starts the process of crawling for this specific Database.void
close()
Cleans up the working directoryprotected void
connect()
protected void
disconnect()
URL
getFtpUrl()
ChangeSet
getModelChanges(String fileId)
Returns the ChangeSet only for one specific model.protected void
init()
Map<String,ChangeSet>
listChanges()
Returns a map with all changes made after the last crawl
the fileId is the map key.List<String>
listModels()
lists all Models in the latest revisionprotected void
processRelease(BioModelRelease release)
Downloads, extracts and indexes the gives release must called for each new release CHRONOLOGICAL.protected List<BioModelRelease>
retrieveReleaseList()
protected void
saveProperties()
void
setFtpUrl(URL ftpUrl)
-
Methods inherited from class de.unirostock.sems.ModelCrawler.databases.Interface.ModelDatabase
createTempDir, getLimit, getModelStorage, getMorreClient, getWorkingDir, isEnabled, obtainWorkingDir, setEnabled, setLimit, setModelStorage, setMorreClient, setWorkingDir
-
-
-
-
Method Detail
-
listModels
public List<String> listModels()
Description copied from class:ModelDatabase
lists all Models in the latest revision- Specified by:
listModels
in classModelDatabase
- Returns:
- List with all model IDs
-
listChanges
public Map<String,ChangeSet> listChanges()
Description copied from class:ModelDatabase
Returns a map with all changes made after the last crawl
the fileId is the map key.- Specified by:
listChanges
in classModelDatabase
- Returns:
- the list of changes
-
getModelChanges
public ChangeSet getModelChanges(String fileId)
Description copied from class:ModelDatabase
Returns the ChangeSet only for one specific model.- Specified by:
getModelChanges
in classModelDatabase
- Parameters:
fileId
- the file id- Returns:
- ChangeSet
-
close
public void close()
Description copied from class:ModelDatabase
Cleans up the working directory- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classModelDatabase
-
call
public Map<String,ChangeSet> call()
Description copied from class:ModelDatabase
Starts the process of crawling for this specific Database.
-
processRelease
protected void processRelease(BioModelRelease release)
Downloads, extracts and indexes the gives release must called for each new release CHRONOLOGICAL.- Parameters:
release
- the release
-
init
protected void init()
-
saveProperties
protected void saveProperties()
-
connect
protected void connect() throws FtpConnectionException, IOException, SocketException
-
disconnect
protected void disconnect()
-
retrieveReleaseList
protected List<BioModelRelease> retrieveReleaseList() throws IOException
- Throws:
IOException
-
getFtpUrl
public URL getFtpUrl()
-
setFtpUrl
public void setFtpUrl(URL ftpUrl)
-
-