-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mapping loading with mapping type specified or different method name (#…
…344) * mapping loading with mapping type specified or different method name * fix mapping paths * add missing mapping files and updated path to config file in test_bluebrain_nexus * reset notebooks * mapping tests * change back load file to load when using mapping in store * added test cases for mapping type specific methods * improve tests * hjson import change * little change --------- Co-authored-by: mouffok <[email protected]>
- Loading branch information
Showing
13 changed files
with
311 additions
and
38 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
type: DataDownload | ||
contentSize: | ||
{ | ||
unitCode: f"bytes" | ||
value: x._bytes | ||
} | ||
digest: | ||
{ | ||
algorithm: x._digest._algorithm | ||
value: x._digest._value | ||
} | ||
encodingFormat: x._mediaType | ||
name: x._filename | ||
contentUrl: forge.format(uri=x['@id'], formatter='URI_REWRITER', is_file=True) | ||
atLocation: | ||
{ | ||
type: Location | ||
store: | ||
{ | ||
id: x._storage["@id"] | ||
type: x._storage["@type"] if '@type' in x._storage else None | ||
_rev: x._storage["_rev"] if '_rev' in x._storage else None | ||
} | ||
location: x._location if '_location' in x else None | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/data/nexus-store/publishing-file-to-resource-mapping.hjson
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,16 @@ | ||
{ | ||
type: DataDownload | ||
contentSize: | ||
{ | ||
unitCode: f"bytes" | ||
value: x._bytes | ||
} | ||
digest: | ||
{ | ||
algorithm: x._digest._algorithm | ||
value: x._digest._value | ||
} | ||
encodingFormat: x._mediaType | ||
name: x._filename | ||
contentUrl: x._self | ||
} |
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
Oops, something went wrong.