public class PmrDb extends ModelDatabase
Modifier and Type | Class and Description |
---|---|
protected class |
PmrDb.ExposureTransformJob |
ModelDatabase.DatabaseTypes
Modifier and Type | Field and Description |
---|---|
protected Map<String,ChangeSet> |
changeSetMap |
protected de.unirostock.sems.bives.tools.DocumentClassifier |
classifier |
protected URL |
collectionEndpoint |
protected de.unirostock.sems.ModelCrawler.databases.PMR2.PmrDb.WorkingDirConfig |
config |
protected Set<String> |
fileExtensionBlacklist |
protected String |
hashAlgo |
protected URL |
repoListUrl |
enabled, limit, modelStorage, morreClient, tempDir
Constructor and Description |
---|
PmrDb()
Default dataholder
|
Modifier and Type | Method and Description |
---|---|
Map<String,ChangeSet> |
call()
Starts the process of crawling for this specific Database.
|
void |
close()
Cleans up the working directory
|
protected List<org.eclipse.jgit.revwalk.RevCommit> |
detectRelevantVersions(org.eclipse.jgit.api.Git repo,
List<RelevantFile> relevantFiles) |
protected net.hamnaberg.json.Collection |
getCollection(URL url) |
URL |
getCollectionEndpoint() |
String |
getHashAlgo() |
ChangeSet |
getModelChanges(String fileId)
Returns the ChangeSet only for one specific model.
|
URL |
getRepoListUrl() |
protected LinkedHashSet<String> |
getRepositoriesFromCollection() |
protected File |
getRepositoryDirectory(String repository)
Gets the Path to the Repository Directory out of Workspace config or null if it fails.
|
protected LinkedHashSet<String> |
getRepositoryList()
Retrieves the txt Repository List and puts it in a list.
|
protected File |
getTempFile()
Returns a non existent temporary file.
|
protected void |
init() |
protected void |
iterateRelevantVersions(org.eclipse.jgit.api.Git repo,
File location,
List<RelevantFile> relevantFiles,
List<org.eclipse.jgit.revwalk.RevCommit> relevantVersions) |
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 revision
|
protected File |
makeRepositoryDirectory(String repository)
Creates the directory for the given Repository.
|
protected void |
processRepository(String repoLink) |
protected void |
saveProperties() |
protected void |
scanAndTransferRepository(String repoUrl,
File location,
org.eclipse.jgit.api.Git repo) |
protected List<RelevantFile> |
scanRepository(File location) |
protected void |
searchLatestKnownVersion(RelevantFile relevantFile) |
void |
setCollectionEndpoint(URL collectionEndpoint) |
void |
setHashAlgo(String hashAlgo) |
void |
setRepoListUrl(URL repoListUri) |
protected URL |
transformExposureUrl(URL link) |
createTempDir, getLimit, getModelStorage, getMorreClient, getWorkingDir, isEnabled, obtainWorkingDir, setEnabled, setLimit, setModelStorage, setMorreClient, setWorkingDir
protected String hashAlgo
protected URL repoListUrl
protected URL collectionEndpoint
protected de.unirostock.sems.bives.tools.DocumentClassifier classifier
protected de.unirostock.sems.ModelCrawler.databases.PMR2.PmrDb.WorkingDirConfig config
public List<String> listModels()
ModelDatabase
listModels
in class ModelDatabase
public Map<String,ChangeSet> listChanges()
ModelDatabase
listChanges
in class ModelDatabase
public ChangeSet getModelChanges(String fileId)
ModelDatabase
getModelChanges
in class ModelDatabase
fileId
- the file idpublic String getHashAlgo()
public void setHashAlgo(String hashAlgo)
public URL getRepoListUrl()
public void setRepoListUrl(URL repoListUri)
public URL getCollectionEndpoint()
public void setCollectionEndpoint(URL collectionEndpoint)
public void close()
ModelDatabase
close
in interface Closeable
close
in interface AutoCloseable
close
in class ModelDatabase
public Map<String,ChangeSet> call()
ModelDatabase
protected void init()
protected File getTempFile()
protected void saveProperties()
protected LinkedHashSet<String> getRepositoryList() throws HttpException
HttpException
- the http exceptionprotected LinkedHashSet<String> getRepositoriesFromCollection() throws HttpException
HttpException
protected net.hamnaberg.json.Collection getCollection(URL url) throws IOException
IOException
protected File makeRepositoryDirectory(String repository)
repository
- the repositoryprotected File getRepositoryDirectory(String repository)
repository
- the repositoryprotected void processRepository(String repoLink)
protected void scanAndTransferRepository(String repoUrl, File location, org.eclipse.jgit.api.Git repo)
protected List<RelevantFile> scanRepository(File location)
protected void searchLatestKnownVersion(RelevantFile relevantFile)
protected List<org.eclipse.jgit.revwalk.RevCommit> detectRelevantVersions(org.eclipse.jgit.api.Git repo, List<RelevantFile> relevantFiles)
protected void iterateRelevantVersions(org.eclipse.jgit.api.Git repo, File location, List<RelevantFile> relevantFiles, List<org.eclipse.jgit.revwalk.RevCommit> relevantVersions) throws IOException
IOException
Copyright © 2019 SEMS (Simulation Experiment Management for Systems Biology). All rights reserved.