-
Notifications
You must be signed in to change notification settings - Fork 10
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: add language filter to sub attributes #1274
base: develop
Are you sure you want to change the base?
Conversation
shared/src/main/kotlin/com/egm/stellio/shared/model/CompactedEntity.kt
Outdated
Show resolved
Hide resolved
shared/src/main/kotlin/com/egm/stellio/shared/model/CompactedEntity.kt
Outdated
Show resolved
Hide resolved
entry.key to (entry.value as CompactedEntity).toFilteredLanguageProperties(languageFilter) | ||
!JSONLD_COMPACTED_ATTRIBUTE_CORE_MEMBERS.contains(entry.key) -> | ||
entry.key to filterLanguageProperty(entry.value as Map<String, Any>, transformationParameters) | ||
else -> entry.key to entry.value |
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.
if you want to keep entry as the argument (as you want) you can use entry.toPair()
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.
current is easier to read as it is similar to other branches in the when
Test Results 69 files ±0 69 suites ±0 1m 22s ⏱️ -2s Results for commit e0a98cc. ± Comparison against base commit e6fe9f9. This pull request removes 189 and adds 36 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
@@ -42,6 +46,20 @@ typealias CompactedEntity = Map<String, Any> | |||
typealias CompactedAttributeInstance = Map<String, Any> | |||
typealias CompactedAttributeInstances = List<CompactedAttributeInstance> | |||
|
|||
val JSONLD_COMPACTED_ATTRIBUTE_CORE_MEMBERS = |
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.
JSONLD_LANGUAGEMAP_TERM
should be in the list (if it is not in the list, it is a trap for future users of your list)
entry.key to (entry.value as CompactedEntity).toFilteredLanguageProperties(languageFilter) | ||
!JSONLD_COMPACTED_ATTRIBUTE_CORE_MEMBERS.contains(entry.key) -> | ||
entry.key to filterLanguageProperty(entry.value as Map<String, Any>, transformationParameters) | ||
else -> entry.key to entry.value |
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.
current is easier to read as it is similar to other branches in the when
I added a test that fails (but should not ) |
…ntity.kt Co-authored-by: Thomas Bousselin <[email protected]>
Quality Gate passedIssues Measures |
No description provided.