-
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
feat: add language filter to sub attributes #1274
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 + 8 69 suites +8 1m 27s ⏱️ +33s Results for commit 0403c57. ± Comparison against base commit f3d668b. This pull request removes 189 and adds 193 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 ) |
dc3fa78
to
10ed185
Compare
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.
did some changes to remove detekt warning and more fluent processing
…ntity.kt Co-authored-by: Thomas Bousselin <[email protected]>
10ed185
to
0403c57
Compare
Quality Gate passedIssues Measures |
No description provided.