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

feat(xmlupload): support Baseclass MovingImageRepresentation #185

Merged
merged 2 commits into from Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions knora/dsplib/models/resource.py
Expand Up @@ -253,6 +253,9 @@ def toJsonLdObj(self, action: Actions) -> Any:
elif self.baseclass == 'ArchiveRepresentation':
bitstream_attributes["@type"] = "knora-api:ArchiveFileValue"
tmp["knora-api:hasArchiveFileValue"] = bitstream_attributes
elif self.baseclass == 'MovingImageRepresentation':
bitstream_attributes["@type"] = "knora-api:MovingImageFileValue"
tmp["knora-api:hasMovingImageFileValue"] = bitstream_attributes
else:
raise BaseError(f"Baseclass '{self.baseclass}' not yet supported!")

Expand Down
Binary file added testdata/bitstreams/Dummy.mp4
Binary file not shown.
10 changes: 10 additions & 0 deletions testdata/test-data.xml
Expand Up @@ -240,6 +240,16 @@
</text-prop>
</resource>

<resource label="Moviething"
restype=":MovieThing"
id="video_0"
permissions="res-default">
<bitstream>testdata/bitstreams/Dummy.mp4</bitstream>
<text-prop name=":hasText">
<text encoding="utf8" permissions="prop-default">Dummy video with music</text>
</text-prop>
</resource>

<resource label="TestThing2Child1" restype=":TestThing2Child1" id="obj_0012">
<text-prop name=":hasTextChild1">
<text encoding="utf8">Some text</text>
Expand Down