@@ -47,7 +47,7 @@ func MapWFSToCapabilitiesGeneratorInput(wfs *pdoknlv3.WFS, ownerInfo *smoothoper
4747 Filename : wfsCapabilitiesFilename ,
4848 Wfs200 : wfs200.GetCapabilitiesResponse {
4949
50- ServiceProvider : mapServiceProvider (& ownerInfo .Spec .WFS .ServiceProvider ),
50+ ServiceProvider : mapServiceProvider (& ownerInfo .Spec .WFS .ServiceProvider , ownerInfo . Spec . ProviderSite ),
5151 ServiceIdentification : wfs200.ServiceIdentification {
5252 Title : wfs .Spec .Service .Title ,
5353 Abstract : wfs .Spec .Service .Abstract ,
@@ -103,16 +103,90 @@ func MapWFSToCapabilitiesGeneratorInput(wfs *pdoknlv3.WFS, ownerInfo *smoothoper
103103 if operationsMetadata == nil {
104104 operationsMetadata = & wfs200.OperationsMetadata {}
105105 }
106- operationsMetadata .Constraint = append (operationsMetadata .Constraint , wfs200.Constraint {
107- Name : "CountDefault" ,
108- DefaultValue : smoothoperatorutils .Pointer (strconv .Itoa (* wfs .Spec .Service .CountDefault )),
109- })
106+ operationsMetadata .Constraint = getConstraints (strconv .Itoa (* wfs .Spec .Service .CountDefault ))
110107 config .Services .WFS200Config .Wfs200 .Capabilities .OperationsMetadata = operationsMetadata
111108 }
112109
113110 return & config , nil
114111}
115112
113+ func getConstraints (countDefault string ) []wfs200.Constraint {
114+ return []wfs200.Constraint {
115+ {
116+ Name : "ImplementsBasicWFS" ,
117+ DefaultValue : ptr .To ("TRUE" ),
118+ },
119+ {
120+ Name : "ImplementsTransactionalWFS" ,
121+ DefaultValue : ptr .To ("FALSE" ),
122+ },
123+ {
124+ Name : "ImplementsLockingWFS" ,
125+ DefaultValue : ptr .To ("FALSE" ),
126+ },
127+ {
128+ Name : "KVPEncoding" ,
129+ DefaultValue : ptr .To ("TRUE" ),
130+ },
131+ {
132+ Name : "XMLEncoding" ,
133+ DefaultValue : ptr .To ("TRUE" ),
134+ },
135+ {
136+ Name : "SOAPEncoding" ,
137+ DefaultValue : ptr .To ("FALSE" ),
138+ },
139+ {
140+ Name : "ImplementsInheritance" ,
141+ DefaultValue : ptr .To ("FALSE" ),
142+ },
143+ {
144+ Name : "ImplementsRemoteResolve" ,
145+ DefaultValue : ptr .To ("FALSE" ),
146+ },
147+ {
148+ Name : "ImplementsResultPaging" ,
149+ DefaultValue : ptr .To ("TRUE" ),
150+ },
151+ {
152+ Name : "ImplementsStandardJoins" ,
153+ DefaultValue : ptr .To ("FALSE" ),
154+ },
155+ {
156+ Name : "ImplementsSpatialJoins" ,
157+ DefaultValue : ptr .To ("FALSE" ),
158+ },
159+ {
160+ Name : "ImplementsTemporalJoins" ,
161+ DefaultValue : ptr .To ("FALSE" ),
162+ },
163+ {
164+ Name : "ImplementsFeatureVersioning" ,
165+ DefaultValue : ptr .To ("FALSE" ),
166+ },
167+ {
168+ Name : "ManageStoredQueries" ,
169+ DefaultValue : ptr .To ("FALSE" ),
170+ },
171+ {
172+ Name : "PagingIsTransactionSafe" ,
173+ DefaultValue : ptr .To ("FALSE" ),
174+ },
175+ {
176+ Name : "CountDefault" ,
177+ DefaultValue : & countDefault ,
178+ },
179+ {
180+ Name : "QueryExpressions" ,
181+ AllowedValues : & wfs200.AllowedValues {Value : []string {
182+ "wfs:Query" ,
183+ "wfs:StoredQuery" ,
184+ },
185+ },
186+ },
187+ }
188+ }
189+
116190func getFeatureTypeList (wfs * pdoknlv3.WFS , ownerInfo * smoothoperatorv1.OwnerInfo ) (* wfs200.FeatureTypeList , error ) {
117191 typeList := wfs200.FeatureTypeList {}
118192
@@ -207,15 +281,15 @@ func replaceMustacheTemplate(hrefTemplate string, identifier string) (string, er
207281 return mustache .Render (hrefTemplate , templateVariable )
208282}
209283
210- func mapServiceProvider (provider * smoothoperatorv1.ServiceProvider ) (serviceProvider wfs200.ServiceProvider ) {
284+ func mapServiceProvider (provider * smoothoperatorv1.ServiceProvider , providerSite * smoothoperatorv1. ProviderSite ) (serviceProvider wfs200.ServiceProvider ) {
211285 if provider .ProviderName != nil {
212286 serviceProvider .ProviderName = provider .ProviderName
213287 }
214288
215- if provider . ProviderSite != nil {
289+ if providerSite != nil {
216290 serviceProvider .ProviderSite = & wfs200.ProviderSite {
217- Type : provider . ProviderSite .Type ,
218- Href : provider . ProviderSite .Href ,
291+ Type : providerSite .Type ,
292+ Href : providerSite .Href ,
219293 }
220294 }
221295
@@ -289,7 +363,7 @@ func MapWMSToCapabilitiesGeneratorInput(wms *pdoknlv3.WMS, ownerInfo *smoothoper
289363 Title : wms .Spec .Service .Title ,
290364 Abstract : & wms .Spec .Service .Abstract ,
291365 KeywordList : & wms130.Keywords {Keyword : wms .Spec .Service .KeywordsIncludingInspireKeyword ()},
292- OnlineResource : wms130.OnlineResource {Href : smoothoperatorutils . Pointer ( wms . URL (). Scheme + "://" + wms . URL (). Host + "/" ) },
366+ OnlineResource : wms130.OnlineResource {Href : & ownerInfo . Spec . ProviderSite . Href },
293367 ContactInformation : getContactInformation (ownerInfo ),
294368 Fees : wms .Spec .Service .Fees ,
295369 AccessConstraints : ptr .To (wms .Spec .Service .AccessConstraints .String ()),
0 commit comments