-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e5f936
commit 4a50b61
Showing
9 changed files
with
328 additions
and
171 deletions.
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
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
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
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
24 changes: 24 additions & 0 deletions
24
triplea/service/repository/export/unified_export_json/__init__.py
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
|
||
|
||
|
||
from triplea.schemas.article import Article, SourceBankType | ||
from triplea.service.repository.export.unified_export_json.arxiv import ( | ||
_json_converter_01_arxiv) | ||
from triplea.service.repository.export.unified_export_json.pubmed import ( | ||
_json_converter_01_pubmed) | ||
|
||
|
||
def json_converter_01(article:Article): | ||
# Check SourceBank | ||
if article.SourceBank is None: | ||
# This is Pubmed | ||
json_article = _json_converter_01_pubmed(article) | ||
elif article.SourceBank == SourceBankType.PUBMED: | ||
json_article = _json_converter_01_pubmed(article) | ||
elif article.SourceBank == SourceBankType.ARXIV: | ||
json_article = _json_converter_01_arxiv(article) | ||
else: | ||
raise NotImplementedError | ||
|
||
return json_article |
5 changes: 5 additions & 0 deletions
5
triplea/service/repository/export/unified_export_json/arxiv.py
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from triplea.schemas.article import Article | ||
|
||
|
||
def _json_converter_01_arxiv(article:Article): | ||
raise NotImplementedError |
Oops, something went wrong.