diff --git a/server/datacatalog/datacatalogv3/cms_model.go b/server/datacatalog/datacatalogv3/cms_model.go index b02cfa9e5..a658b18f9 100644 --- a/server/datacatalog/datacatalogv3/cms_model.go +++ b/server/datacatalog/datacatalogv3/cms_model.go @@ -306,6 +306,7 @@ type GenericItem struct { Items []GenericItemDataset `json:"items,omitempty" cms:"items,group"` OpenDataURL string `json:"open_data_url,omitempty" cms:"open_data_url,url"` Category string `json:"category,omitempty" cms:"category,select"` + Group string `json:"group,omitempty" cms:"group,text"` // metadata Status *cms.Tag `json:"status,omitempty" cms:"status,select,metadata"` Public bool `json:"public,omitempty" cms:"public,bool,metadata"` diff --git a/server/datacatalog/datacatalogv3/conv_dataset_generic.go b/server/datacatalog/datacatalogv3/conv_dataset_generic.go index 40475156b..ae760592b 100644 --- a/server/datacatalog/datacatalogv3/conv_dataset_generic.go +++ b/server/datacatalog/datacatalogv3/conv_dataset_generic.go @@ -2,6 +2,7 @@ package datacatalogv3 import ( "fmt" + "strings" "github.com/eukarya-inc/reearth-plateauview/server/datacatalog/plateauapi" "github.com/samber/lo" @@ -48,6 +49,11 @@ func (i *GenericItem) toDatasets(area *areaContext, dts []plateauapi.DatasetType }, true }) + var groups []string + if i.Group == "" { + groups = strings.Split(i.Group, "/") + } + res := plateauapi.GenericDataset{ ID: id, Name: standardItemName(i.Name, "", area.Name()), @@ -61,6 +67,7 @@ func (i *GenericItem) toDatasets(area *areaContext, dts []plateauapi.DatasetType CityCode: area.CityCode, TypeID: dt.GetID(), TypeCode: dt.GetCode(), + Groups: groups, Admin: newAdmin(i.ID, i.Stage(), cmsurl, nil), Items: items, }