| Modifier and Type | Field and Description |
|---|---|
| private final BibEntryTypesManager | |
| private final FileUpdateMonitor | |
| private final SlrGitHandler | |
| private static final Logger | |
| private static final Pattern | |
| private static final Pattern | |
| private final PreferencesService | |
| private static final String | |
| private final Path | |
| private static final String | |
| private final Study | |
| public static final String | |
| private final Path | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | StudyRepository(Path
Where the repository root is located. pathToRepository, SlrGitHandler The git handler that manages any interaction with the remote repository gitHandler, PreferencesService preferencesService, FileUpdateMonitor fileUpdateMonitor, BibEntryTypesManager bibEntryTypesManager)Creates a study repository. |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | createQueryResultFolder(String
The query the folder is created for query)Creates a folder using the query and its corresponding query id. This folder name is unique for each query, as long as the query id in the study definition is unique for each query. |
| private void | |
| private void | |
| public List | Returns: List of BibEntries of type LibraryExtracts all active fetchers from the library entries. |
| public BibDatabaseContext | getFetcherResultEntries(String query, String fetcherName)
Returns entries stored in the repository for a certain query and fetcher |
| private Path | |
| private Path | |
| private Path | |
| private Path | |
| public BibDatabaseContext | getQueryResultEntries(String query)
Returns the merged entries stored in the repository for a certain query |
| public List | Returns: List of all queries as Strings.Returns all query strings of the study definition |
| public Study | |
| public BibDatabaseContext | |
| private Study | Returns: Returns the BibEntries parsed from the study definition file.The study definition file contains all the definitions of a study. |
| public void | persist(List<QueryResult> crawlResults)
Persists the result locally and remotely by following the steps: Precondition: Currently checking out work branch
|
| private void | persistResults(List<QueryResult>
The results that shall be persisted. crawlResults)Persists the crawling results in the local file based repository. |
| private void | setUpRepositoryStructureForQueriesAndFetchers()
Create for each query a folder, and for each fetcher a bib file in the query folder to store its results. |
| private String | Returns: a unique folder name for any query.that is trimmed and combined with its query id query)Returns a string that can be used as a folder name. |
| private void | updateRemoteSearchAndWorkBranch()
Update the remote tracking branches of the work and search branches The currently checked out branch is not changed if the method is executed successfully |
| private void | updateWorkAndSearchBranch()
Updates the local work and search branches with changes from their tracking remote branches The currently checked out branch is not changed if the method is executed successfully |
| private void |
| bibEntryTypesManager | back to summary |
|---|---|
| private final BibEntryTypesManager bibEntryTypesManager | |
| fileUpdateMonitor | back to summary |
|---|---|
| private final FileUpdateMonitor fileUpdateMonitor | |
| gitHandler | back to summary |
|---|---|
| private final SlrGitHandler gitHandler | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| MATCH_COLON | back to summary |
|---|---|
| private static final Pattern MATCH_COLON | |
| MATCH_ILLEGAL_CHARACTERS | back to summary |
|---|---|
| private static final Pattern MATCH_ILLEGAL_CHARACTERS | |
| preferencesService | back to summary |
|---|---|
| private final PreferencesService preferencesService | |
| REMOTE | back to summary |
|---|---|
| private static final String REMOTE | |
| repositoryPath | back to summary |
|---|---|
| private final Path repositoryPath | |
| SEARCH_BRANCH | back to summary |
|---|---|
| private static final String SEARCH_BRANCH | |
| study | back to summary |
|---|---|
| private final Study study | |
| STUDY_DEFINITION_FILE_NAME | back to summary |
|---|---|
| public static final String STUDY_DEFINITION_FILE_NAME | |
| studyDefinitionFile | back to summary |
|---|---|
| private final Path studyDefinitionFile | |
| WORK_BRANCH | back to summary |
|---|---|
| private static final String WORK_BRANCH | |
| StudyRepository | back to summary |
|---|---|
| public StudyRepository(Path pathToRepository, SlrGitHandler gitHandler, PreferencesService preferencesService, FileUpdateMonitor fileUpdateMonitor, BibEntryTypesManager bibEntryTypesManager) throws IOException Creates a study repository.
| |
| computeIDForQuery | back to summary |
|---|---|
| private String computeIDForQuery(String query) Helper to compute the query id for folder name creation. | |
| createBibFile | back to summary |
|---|---|
| private void createBibFile(Path file) | |
| createFetcherResultFile | back to summary |
|---|---|
| private void createFetcherResultFile(String query, SearchBasedFetcher searchBasedFetcher) | |
| createFolder | back to summary |
|---|---|
| private void createFolder(Path folder) throws IOException | |
| createQueryResultFile | back to summary |
|---|---|
| private void createQueryResultFile(String query) | |
| createQueryResultFolder | back to summary |
|---|---|
| private void createQueryResultFolder(String query) throws IOException Creates a folder using the query and its corresponding query id. This folder name is unique for each query, as long as the query id in the study definition is unique for each query.
| |
| createStudyResultFile | back to summary |
|---|---|
| private void createStudyResultFile() | |
| generateCiteKeys | back to summary |
|---|---|
| private void generateCiteKeys(BibDatabaseContext existingEntries, BibDatabase targetEntries) | |
| getActiveLibraryEntries | back to summary |
|---|---|
| public List Extracts all active fetchers from the library entries.
| |
| getFetcherResultEntries | back to summary |
|---|---|
| public BibDatabaseContext getFetcherResultEntries(String query, String fetcherName) throws IOException Returns entries stored in the repository for a certain query and fetcher | |
| getPathToFetcherResultFile | back to summary |
|---|---|
| private Path getPathToFetcherResultFile(String query, String fetcherName) | |
| getPathToQueryDirectory | back to summary |
|---|---|
| private Path getPathToQueryDirectory(String query) | |
| getPathToQueryResultFile | back to summary |
|---|---|
| private Path getPathToQueryResultFile(String query) | |
| getPathToStudyResultFile | back to summary |
|---|---|
| private Path getPathToStudyResultFile() | |
| getQueryResultEntries | back to summary |
|---|---|
| public BibDatabaseContext getQueryResultEntries(String query) throws IOException Returns the merged entries stored in the repository for a certain query | |
| getSearchQueryStrings | back to summary |
|---|---|
| public List Returns all query strings of the study definition | |
| getStudy | back to summary |
|---|---|
| public Study getStudy() | |
| getStudyResultEntries | back to summary |
|---|---|
| public BibDatabaseContext getStudyResultEntries() throws IOException Returns the merged entries stored in the repository for all queries | |
| parseStudyFile | back to summary |
|---|---|
| private Study parseStudyFile() throws IOException The study definition file contains all the definitions of a study. This method extracts this study from the yaml study definition file
| |
| persist | back to summary |
|---|---|
| public void persist(List<QueryResult> crawlResults) throws IOException, org.eclipse.jgit.api.errors.GitAPIException, SaveException Persists the result locally and remotely by following the steps: Precondition: Currently checking out work branch
| |
| persistResults | back to summary |
|---|---|
| private void persistResults(List<QueryResult> crawlResults) throws IOException, SaveException Persists the crawling results in the local file based repository.
| |
| setUpRepositoryStructureForQueriesAndFetchers | back to summary |
|---|---|
| private void setUpRepositoryStructureForQueriesAndFetchers() throws IOException Create for each query a folder, and for each fetcher a bib file in the query folder to store its results. | |
| trimNameAndAddID | back to summary |
|---|---|
| private String trimNameAndAddID(String query) Returns a string that can be used as a folder name.
This removes all characters from the query that are illegal for directory names.
Structure: ID-trimmed query
Examples:
Input: '(title: test-title AND abstract: Test)' as a query entry with id 12345678
Output: '12345678 - title= test-title AND abstract= Test'
Input: 'abstract: Test*' as a query entry with id 87654321
Output: '87654321 - abstract= Test'
Input: '"test driven"' as a query entry with id 12348765
Output: '12348765 - test driven'
Note that this method might be similar to | |
| updateRemoteSearchAndWorkBranch | back to summary |
|---|---|
| private void updateRemoteSearchAndWorkBranch() throws IOException, org.eclipse.jgit.api.errors.GitAPIException Update the remote tracking branches of the work and search branches The currently checked out branch is not changed if the method is executed successfully | |
| updateWorkAndSearchBranch | back to summary |
|---|---|
| private void updateWorkAndSearchBranch() throws IOException, org.eclipse.jgit.api.errors.GitAPIException Updates the local work and search branches with changes from their tracking remote branches The currently checked out branch is not changed if the method is executed successfully | |
| writeResultToFile | back to summary |
|---|---|
| private void writeResultToFile(Path pathToFile, BibDatabaseContext context) throws SaveException | |