Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/generator/iso19119/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func (g *Generator) setGeneralInfo() error { //nolint:funlen
},
}

if config.isInspireSDS() {
if config.IsInspireSDS() {
entry.Metadata.ReferenceSystemInfos = []iso1911x.ReferenceSystemInfo{}

for _, rsIdentifier := range config.ReferenceSystemIdentifiers {
Expand Down Expand Up @@ -740,7 +740,7 @@ func (g *Generator) setIdentificationInfo() error {
}

serviceType := inspireServiceType.InspireServiceType
if config.isInspireSDS() {
if config.IsInspireSDS() {
serviceType = "other"
}

Expand Down Expand Up @@ -1016,7 +1016,7 @@ func (g *Generator) setDataQualityInfo() error {

// https://docs.geostandaarden.nl/eu/INSPIRE-handreiking/#invulinstructie-invocable-sds-metadata
// https://docs.geostandaarden.nl/eu/INSPIRE-handreiking/#invulinstructie-interoperable-sds-metadata
if config.isInspireSDS() {
if config.IsInspireSDS() {
SDSServiceCategory, ok := g.Codelist.GetSDSServiceCategoryBySDSCategory(
string(*config.ServiceInspireType),
)
Expand Down
19 changes: 10 additions & 9 deletions pkg/generator/iso19119/service_specifics.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (sc ServiceConfig) Validate() error {
"exactly 1 inspireTheme must be set if InspireDatasetType is 'harmonised'")
}

if sc.isInspireSDS() && len(sc.ReferenceSystemIdentifiers) == 0 {
if sc.IsInspireSDS() && len(sc.ReferenceSystemIdentifiers) == 0 {
errors = append(errors, "SDS services must have at least one referenceSystemIdentifier")
}

Expand Down Expand Up @@ -597,6 +597,15 @@ func (sc ServiceConfig) GetQosCapacity() string {
return strconv.Itoa(value)
}

// IsInspireSDS returns true if the service is an INSPIRE SDS service
func (sc ServiceConfig) IsInspireSDS() bool {
if sc.ServiceInspireType == nil {
return false
}

return *sc.ServiceInspireType == Interoperable || *sc.ServiceInspireType == Invocable
}

// setInspireTypes sets INSPIRE Service types based on INSPIRE Dataset type
func (s *ServiceSpecifics) setInspireTypes() {
inspireDatasetType := s.Globals.InspireDatasetType
Expand Down Expand Up @@ -641,14 +650,6 @@ func (s *ServiceSpecifics) setInspireTypes() {
}
}

func (sc ServiceConfig) isInspireSDS() bool {
if sc.ServiceInspireType == nil {
return false
}

return *sc.ServiceInspireType == Interoperable || *sc.ServiceInspireType == Invocable
}

func (sc ServiceConfig) isInspireNetworkService() bool {
if sc.ServiceInspireType == nil {
return false
Expand Down
Loading