-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for many EntitySelector objects in Query datatype (#…
- Loading branch information
Showing
30 changed files
with
543 additions
and
210 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
40 changes: 31 additions & 9 deletions
40
search-service/src/main/kotlin/com/egm/stellio/search/entity/model/EntitiesQuery.kt
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 |
---|---|---|
@@ -1,20 +1,42 @@ | ||
package com.egm.stellio.search.entity.model | ||
|
||
import com.egm.stellio.shared.model.EntitySelector | ||
import com.egm.stellio.shared.model.EntityTypeSelection | ||
import com.egm.stellio.shared.model.ExpandedTerm | ||
import com.egm.stellio.shared.model.GeoQuery | ||
import com.egm.stellio.shared.model.PaginationQuery | ||
import java.net.URI | ||
|
||
data class EntitiesQuery( | ||
sealed class EntitiesQuery( | ||
open val q: String?, | ||
open val scopeQ: String?, | ||
open val paginationQuery: PaginationQuery, | ||
open val attrs: Set<ExpandedTerm>, | ||
open val datasetId: Set<String>, | ||
open val geoQuery: GeoQuery?, | ||
open val contexts: List<String> | ||
) | ||
|
||
data class EntitiesQueryFromGet( | ||
val ids: Set<URI> = emptySet(), | ||
val typeSelection: EntityTypeSelection? = null, | ||
val idPattern: String? = null, | ||
val q: String? = null, | ||
val scopeQ: String? = null, | ||
val paginationQuery: PaginationQuery, | ||
val attrs: Set<ExpandedTerm> = emptySet(), | ||
val datasetId: Set<String> = emptySet(), | ||
val geoQuery: GeoQuery? = null, | ||
val contexts: List<String> | ||
) | ||
override val q: String? = null, | ||
override val scopeQ: String? = null, | ||
override val paginationQuery: PaginationQuery, | ||
override val attrs: Set<ExpandedTerm> = emptySet(), | ||
override val datasetId: Set<String> = emptySet(), | ||
override val geoQuery: GeoQuery? = null, | ||
override val contexts: List<String> | ||
) : EntitiesQuery(q, scopeQ, paginationQuery, attrs, datasetId, geoQuery, contexts) | ||
|
||
data class EntitiesQueryFromPost( | ||
val entitySelectors: List<EntitySelector>? = null, | ||
override val q: String? = null, | ||
override val scopeQ: String? = null, | ||
override val paginationQuery: PaginationQuery, | ||
override val attrs: Set<ExpandedTerm> = emptySet(), | ||
override val datasetId: Set<String> = emptySet(), | ||
override val geoQuery: GeoQuery? = null, | ||
override val contexts: List<String> | ||
) : EntitiesQuery(q, scopeQ, paginationQuery, attrs, datasetId, geoQuery, contexts) |
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
Oops, something went wrong.