diff --git a/underlay/src/main/proto/criteriaselector/configschema/filterable_group.proto b/underlay/src/main/proto/criteriaselector/configschema/filterable_group.proto new file mode 100644 index 000000000..093346c3b --- /dev/null +++ b/underlay/src/main/proto/criteriaselector/configschema/filterable_group.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; + +package tanagra.configschema; + +option go_package = "github.com/DataBiosphere/tanagra/criteriaselector/configschemapb"; +option java_package = "bio.terra.tanagra.proto.criteriaselector.configschema"; +option java_outer_classname = "CFEntityGroup"; + +import "column.proto"; +import "criteriaselector/value_config.proto"; +import "sort_order.proto"; + +// Config for an GroupItems entity group criteria with filterable attributes. +message EntityGroup { + // Columns displayed in the list view. + repeated Column columns = 1; + + message SelectableAttribute { + string id = 1; + } + + // Attributes that can be part of a selection. + repeated SelectableAttribute attributes = 2; + + // The sort order to use in the list view. + SortOrder sort_order = 3; + + // Number of values to display on each page in the list view. Otherwise, a + // default value is applied. + optional int32 page_size = 4; +} diff --git a/underlay/src/main/proto/criteriaselector/dataschema/filterable_group.proto b/underlay/src/main/proto/criteriaselector/dataschema/filterable_group.proto new file mode 100644 index 000000000..df8fab042 --- /dev/null +++ b/underlay/src/main/proto/criteriaselector/dataschema/filterable_group.proto @@ -0,0 +1,45 @@ +syntax = "proto3"; + +package tanagra.dataschema; + +option go_package = "github.com/DataBiosphere/tanagra/criteriaselector/dataschemapb"; +option java_package = "bio.terra.tanagra.proto.criteriaselector.dataschema"; +option java_outer_classname = "DTFilterableGroup"; + +import "criteriaselector/key.proto"; +import "criteriaselector/value_data.proto"; + +// Data for an GroupItems entity group criteria with filterable attributes. +message FilterableGroup { + message SingleSelect { + // The key of the selected value, which references group entity (e.g. + // variant when filtering variantPerson). + Key key = 1; + + // The visible name for the selection. This is stored to avoid extra lookups + // when rendering. + string name = 2; + } + + message SelectAll { + // The string query of the selection. + string query = 1; + + // Optional values that comprise the selection. + repeated ValueData values = 2; + + // Single items excluded from this selection. + repeated SingleSelect exclusions = 3; + } + + message Selection { + oneof selection { + SingleSelect single = 1; + SelectAll all = 2; + } + } + + // The list of selections, each of which may be a single item or a set of + // parameters. + repeated Selection selected = 1; +}