-
Notifications
You must be signed in to change notification settings - Fork 4
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(validate-data): validate MovingImageRepresentation
(DEV-4333)
#1268
Open
Nora-Olivia-Ammann
wants to merge
29
commits into
main
Choose a base branch
from
wip/dev-4333-validate-data-add-video-filevalue
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
1d78bb7
Update file_value_shacl.py
Nora-Olivia-Ammann 16e0afa
add file value ttl
Nora-Olivia-Ammann 9cc95ed
Update file_value_cardinalities.ttl
Nora-Olivia-Ammann 190e715
rename test file
Nora-Olivia-Ammann 93052cf
Update file_value_violation.xml
Nora-Olivia-Ammann 3a03d5e
add sparql
Nora-Olivia-Ammann 76c56fe
serialise file value
Nora-Olivia-Ammann 13e11ab
Update file_value_shacl.py
Nora-Olivia-Ammann 493ae84
Update validate_data.py
Nora-Olivia-Ammann 170fbd2
change file value turtle
Nora-Olivia-Ammann d6fb91e
update ttl
Nora-Olivia-Ammann 04d97dc
Update file_value_cardinalities.ttl
Nora-Olivia-Ammann cd24fd4
remove gneric
Nora-Olivia-Ammann 1742690
Update file_value_shacl.py
Nora-Olivia-Ammann 0e991f3
Update validation_result.py
Nora-Olivia-Ammann 37d7104
Update test_file_value_shacl.py
Nora-Olivia-Ammann f79b1cb
fix test
Nora-Olivia-Ammann 460f699
fix file value
Nora-Olivia-Ammann 0311ac6
Update test_make_data_rdf.py
Nora-Olivia-Ammann 036a2e1
rename
Nora-Olivia-Ammann cb08c97
Update test_validate_data.py
Nora-Olivia-Ammann b398cdb
Merge branch 'main' into wip/dev-4333-validate-data-add-video-filevalue
Nora-Olivia-Ammann 709c087
Update test_file_value_shacl.py
Nora-Olivia-Ammann 23e9191
Merge branch 'wip/dev-4333-validate-data-add-video-filevalue' of http…
Nora-Olivia-Ammann 0c38f43
fix test
Nora-Olivia-Ammann d1164cc
Update validate_data.py
Nora-Olivia-Ammann 845aea5
remove generif file value
Nora-Olivia-Ammann 9ea71b9
Merge branch 'main' into wip/dev-4333-validate-data-add-video-filevalue
Nora-Olivia-Ammann 231fdc8
Merge branch 'main' into wip/dev-4333-validate-data-add-video-filevalue
Nora-Olivia-Ammann 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
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
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
77 changes: 77 additions & 0 deletions
77
src/dsp_tools/resources/validate_data/file_value_cardinalities.ttl
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,77 @@ | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
@prefix owl: <http://www.w3.org/2002/07/owl#> . | ||
@prefix knora-api: <http://api.knora.org/ontology/knora-api/v2#> . | ||
|
||
@prefix api-shapes: <http://api.knora.org/ontology/knora-api/shapes/v2#> . | ||
|
||
|
||
######################################### | ||
# RESOURCES WITH FILES | ||
######################################### | ||
|
||
########################### | ||
# ArchiveRepresentation | ||
########################### | ||
|
||
# knora-api:ArchiveFileValue -> knora-api:hasArchiveFileValue | ||
|
||
|
||
########################### | ||
# AudioRepresentation | ||
########################### | ||
|
||
# knora-api:AudioFileValue -> knora-api:hasAudioFileValue | ||
|
||
|
||
########################### | ||
# DocumentRepresentation | ||
########################### | ||
|
||
# knora-api:DocumentFileValue -> knora-api:hasDocumentFileValue | ||
|
||
|
||
########################### | ||
# MovingImageRepresentation | ||
########################### | ||
|
||
api-shapes:hasMovingImageFileValue_PropShape | ||
a sh:PropertyShape ; | ||
sh:path knora-api:hasMovingImageFileValue ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:message "A MovingImageRepresentation requires a file with the extension 'mp4'." ; | ||
sh:node api-shapes:MovingImageFileValue_ClassShape . | ||
|
||
api-shapes:MovingImageFileValue_ClassShape | ||
a sh:NodeShape ; | ||
sh:name "Validates the class type" ; | ||
sh:message "MovingImageFileValue" ; | ||
sh:class knora-api:MovingImageFileValue ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:path knora-api:fileValueHasFilename ; | ||
sh:minCount 1 ; | ||
sh:maxCount 1 ; | ||
sh:pattern ".+\\.mp4$" ; | ||
sh:severity sh:Violation ; | ||
sh:message "A MovingImageRepresentation requires a file with the extension 'mp4'." ; | ||
] ; | ||
sh:severity sh:Violation . | ||
|
||
########################### | ||
# StillImageRepresentation | ||
########################### | ||
|
||
# knora-api:StillImageExternalFileValue -> knora-api:fileValueHasExternalUrl | ||
|
||
|
||
# knora-api:StillImageFileValue -> knora-api:hasStillImageFileValue | ||
|
||
|
||
########################### | ||
# TextRepresentation | ||
########################### | ||
|
||
# knora-api:TextFileValue -> knora-api:hasTextFileValue |
Oops, something went wrong.
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.
As in the previous PR I want to change the identification, I will likely move it up to the query section. But that touches a lot of other code that has nothing to do with this, so I would like to do that separately.