-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SO-2902: Add multi-language RF2 import support. #194
Merged
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
36ca49a
[rf2] Added tests for multi-language rf2 importer.
45be2bf
[rf2] Changed description, languagerefset file property to collection.
03faa6a
[rf2] Changed logic so it can work with collections.
fdbfab1
[rf2] Added test import rf2 archives
6724fcf
[rf2] Added statusCode check for the concept id, renamed variables to
5d570af
[rf2] Changed data binding properties.
8f6aa50
[rf2] Changed loops to streams moved adding description and language...
360660f
[rf2] Merged the two test cases into one.
0d002c4
[rf2] Changed logic of reading and writing of description files and...
bbdfc2a
[rf2] Added final modifiers.
5f24b78
[rf2] Fixed test import file changed language code and refset id.
d6d7eec
[rf2] Fixed typo.
ce4198f
[rf2] Fixed conceptId of refset in the import file.
cc853fb
[rf2] Added placeholder properties for databinding.
e733067
[rf2] Added validation for definition text files, removed extra lines.
f750f87
[rf2] Added proper monitor progress. Added logic to write...
53eb20d
[rf2] Added method to read collection of files and to monitor progress.
4cc9f5f
[rf2] Removed extra line.
2ed7940
[rf2] Removed extra line. Added logic to handle multiple...
924ef02
[rf2] Removed unneeded iteration.
a71ce1d
[rf2] Added logic to handle collection of text definition files.
797d4d5
[rf2] Removed extra line.
c1b1cd1
Merge remote-tracking branch 'origin/6.x' into
nagyo 0534a6b
SO-2902: Simplify test case
nagyo e10c0bc
[snomed.import] Refactor ImportConfiguration
nagyo 4888bbc
[snomed.import] Fix cloning of stated relationship file
nagyo bfbbde1
Merge remote-tracking branch 'origin/6.x' into issue/rf2-multi-langua…
nagyo 222e30a
SO-2902: Update license header
nagyo 9f25745
SO-2902: Use Pattern.quote instead of Charmatcher.replace
nagyo e409c61
SO-2902: Use try-with-resource for description readers
nagyo a24bb80
SO-2902: Fix NPE
nagyo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[rf2] Added placeholder properties for databinding.
- Loading branch information
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,10 +41,10 @@ public final class ImportConfiguration { | |
public static final String ARCHIVE_FILE_PROPERTY = "archiveFile"; | ||
public static final String ROOT_FILE_PROPERTY = "rootFile"; | ||
public static final String CONCEPTS_FILE_PROPERTY = "conceptsFile"; | ||
public static final String DESCRIPTIONS_FILES_PROPERTY = "descriptionsFiles"; | ||
public static final String DESCRIPTIONS_FILE_PROPERTY = "firstDescriptionFile"; | ||
public static final String RELATIONSHIPS_FILE_PROPERTY = "relationshipsFile"; | ||
public static final String STATED_RELATIONSHIPS_FILE_PROPERTY = "statedRelationshipsFile"; | ||
public static final String LANGUAGE_REF_SET_FILES_PROPERTY = "languageRefSetFiles"; | ||
public static final String LANGUAGE_REF_SET_FILE_PROPERTY = "firstLanguageRefSetFile"; | ||
public static final String LANGUAGE_REF_SET_ID_PROPERTY = "languageRefSetId"; | ||
public static final String IMPORT_SOURCE_KIND_PROPERTY = "sourceKind"; | ||
public static final String DESCRIPTION_TYPE_REFSET_FILE_PROPERTY = "descriptionType"; | ||
|
@@ -62,9 +62,11 @@ public enum ImportSourceKind { | |
private File rootFile; | ||
private File conceptsFile; | ||
private Collection<File> descriptionsFiles = Collections.emptySet(); | ||
private File firstDescriptionFile; | ||
private File relationshipsFile; | ||
private File statedRelationshipsFile; | ||
private Collection<File> languageRefSetFiles = Collections.emptySet(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please fix the initialization of this collection |
||
private File firstLanguageRefSetFile; | ||
private File descriptionType; | ||
private File textDefinitionFile; | ||
|
||
|
@@ -124,6 +126,28 @@ public Collection<File> getDescriptionsFiles() { | |
|
||
public void setDescriptionsFiles(final Collection<File> descriptionsFiles) { | ||
this.descriptionsFiles = Collections3.toImmutableSet(descriptionsFiles); | ||
if (!descriptionsFiles.isEmpty()) { | ||
final File descriptionFile = descriptionsFiles.stream().findFirst().get(); | ||
if (descriptionFile != null) { | ||
firstDescriptionFile = descriptionFile; | ||
} | ||
} | ||
} | ||
|
||
public void setFirstDescriptionFile(File firstDescriptionFile) { | ||
this.firstDescriptionFile = firstDescriptionFile; | ||
} | ||
|
||
public File getFirstDescriptionFile() { | ||
return this.firstDescriptionFile; | ||
} | ||
|
||
public void setFirstLanguageRefSetFile(File firstLanguageRefSetFile) { | ||
this.firstLanguageRefSetFile = firstLanguageRefSetFile; | ||
} | ||
|
||
public File getFirstLanguageRefSetFile() { | ||
return this.firstLanguageRefSetFile; | ||
} | ||
|
||
public File getRelationshipsFile() { | ||
|
@@ -140,6 +164,13 @@ public Collection<File> getLanguageRefSetFiles() { | |
|
||
public void setLanguageRefSetFiles(final Collection<File> languageRefSetFiles) { | ||
this.languageRefSetFiles = Collections3.toImmutableSet(languageRefSetFiles); | ||
if (!languageRefSetFiles.isEmpty()) { | ||
final File languageRefSetFile = languageRefSetFiles.stream().findFirst().get(); | ||
if (languageRefSetFile != null) { | ||
firstLanguageRefSetFile = languageRefSetFile; | ||
} | ||
} | ||
|
||
} | ||
|
||
public ImportSourceKind getSourceKind() { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the initialization of this collection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to this the collection will be initialized still as immutable.