Skip to content
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 31 commits into from
Mar 8, 2018
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.
Jan 25, 2018
45be2bf
[rf2] Changed description, languagerefset file property to collection.
Jan 25, 2018
03faa6a
[rf2] Changed logic so it can work with collections.
Jan 25, 2018
fdbfab1
[rf2] Added test import rf2 archives
Jan 25, 2018
6724fcf
[rf2] Added statusCode check for the concept id, renamed variables to
Feb 6, 2018
5d570af
[rf2] Changed data binding properties.
Feb 9, 2018
8f6aa50
[rf2] Changed loops to streams moved adding description and language...
Feb 9, 2018
360660f
[rf2] Merged the two test cases into one.
Feb 9, 2018
0d002c4
[rf2] Changed logic of reading and writing of description files and...
Feb 9, 2018
bbdfc2a
[rf2] Added final modifiers.
Feb 9, 2018
5f24b78
[rf2] Fixed test import file changed language code and refset id.
Feb 9, 2018
d6d7eec
[rf2] Fixed typo.
Feb 9, 2018
ce4198f
[rf2] Fixed conceptId of refset in the import file.
Feb 9, 2018
cc853fb
[rf2] Added placeholder properties for databinding.
Feb 12, 2018
e733067
[rf2] Added validation for definition text files, removed extra lines.
Feb 15, 2018
f750f87
[rf2] Added proper monitor progress. Added logic to write...
Feb 15, 2018
53eb20d
[rf2] Added method to read collection of files and to monitor progress.
Feb 15, 2018
4cc9f5f
[rf2] Removed extra line.
Feb 15, 2018
2ed7940
[rf2] Removed extra line. Added logic to handle multiple...
Feb 15, 2018
924ef02
[rf2] Removed unneeded iteration.
Feb 15, 2018
a71ce1d
[rf2] Added logic to handle collection of text definition files.
Feb 15, 2018
797d4d5
[rf2] Removed extra line.
Feb 15, 2018
c1b1cd1
Merge remote-tracking branch 'origin/6.x' into
nagyo Feb 28, 2018
0534a6b
SO-2902: Simplify test case
nagyo Feb 28, 2018
e10c0bc
[snomed.import] Refactor ImportConfiguration
nagyo Mar 6, 2018
4888bbc
[snomed.import] Fix cloning of stated relationship file
nagyo Mar 7, 2018
bfbbde1
Merge remote-tracking branch 'origin/6.x' into issue/rf2-multi-langua…
nagyo Mar 7, 2018
222e30a
SO-2902: Update license header
nagyo Mar 7, 2018
9f25745
SO-2902: Use Pattern.quote instead of Charmatcher.replace
nagyo Mar 7, 2018
e409c61
SO-2902: Use try-with-resource for description readers
nagyo Mar 7, 2018
a24bb80
SO-2902: Fix NPE
nagyo Mar 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[rf2] Added placeholder properties for databinding.
  • Loading branch information
Zoltan Molnar committed Feb 12, 2018
commit cc853fb23035f8a5c9b4a5d5aa62297c635d9d9b
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -62,9 +62,11 @@ public enum ImportSourceKind {
private File rootFile;
private File conceptsFile;
private Collection<File> descriptionsFiles = Collections.emptySet();
Copy link
Member

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

Copy link
Member

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.

private File firstDescriptionFile;
private File relationshipsFile;
private File statedRelationshipsFile;
private Collection<File> languageRefSetFiles = Collections.emptySet();
Copy link
Member

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

private File firstLanguageRefSetFile;
private File descriptionType;
private File textDefinitionFile;

Expand Down Expand Up @@ -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() {
Expand All @@ -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() {
Expand Down