@@ -38,8 +38,8 @@ func (gc GetCapabilitiesResponse) ToXML() []byte {
3838
3939// GetCapabilitiesResponse base struct
4040type GetCapabilitiesResponse struct {
41- XMLName xml.Name `xml:"WFS_Capabilities"`
42- Namespaces `yaml:"namespaces"`
41+ XMLName xml.Name `xml:"WFS_Capabilities" yaml:"-" `
42+ * Namespaces `yaml:"namespaces,omitempty "`
4343 ServiceIdentification ServiceIdentification `xml:"ows:ServiceIdentification" yaml:"serviceIdentification"`
4444 ServiceProvider ServiceProvider `xml:"ows:ServiceProvider" yaml:"serviceProvider"`
4545 Capabilities `yaml:"capabilities"`
@@ -60,53 +60,74 @@ type Namespaces struct {
6060 SchemaLocation string `xml:"xsi:schemaLocation,attr" yaml:"schemaLocation"`
6161}
6262
63- // ServiceIdentification struct should only be fill by the "template" configuration wfs200.yaml
63+ // ServiceIdentification struct should only be filled by the "template" configuration wfs200.yaml
6464type ServiceIdentification struct {
65- XMLName xml.Name `xml:"ows:ServiceIdentification"`
66- Title string `xml:"ows:Title" yaml:"title"`
67- Abstract string `xml:"ows:Abstract" yaml:"abstract"`
68- Keywords * wsc110.Keywords `xml:"ows:Keywords" yaml:"keywords"`
69- ServiceType struct {
70- Text string `xml:",chardata" yaml:"text"`
71- CodeSpace string `xml:"codeSpace,attr" yaml:"codeSpace"`
72- } `xml:"ows:ServiceType" yaml:"serviceType"`
73- ServiceTypeVersion string `xml:"ows:ServiceTypeVersion" yaml:"serviceTypeVersion"`
74- Fees string `xml:"ows:Fees" yaml:"fees"`
75- AccessConstraints string `xml:"ows:AccessConstraints" yaml:"accessConstraints"`
65+ XMLName xml.Name `xml:"ows:ServiceIdentification" yaml:"-"`
66+ Title string `xml:"ows:Title" yaml:"title"`
67+ Abstract string `xml:"ows:Abstract" yaml:"abstract"`
68+ Keywords * wsc110.Keywords `xml:"ows:Keywords" yaml:"keywords"`
69+ ServiceType * ServiceType `xml:"ows:ServiceType" yaml:"serviceType,omitempty"`
70+ ServiceTypeVersion * string `xml:"ows:ServiceTypeVersion" yaml:"serviceTypeVersion,omitempty"`
71+ Fees * string `xml:"ows:Fees" yaml:"fees,omitempty"`
72+ AccessConstraints string `xml:"ows:AccessConstraints" yaml:"accessConstraints"`
73+ }
74+
75+ // ServiceType struct containing the service type
76+ type ServiceType struct {
77+ Text string `xml:",chardata" yaml:"text"`
78+ CodeSpace string `xml:"codeSpace,attr" yaml:"codeSpace"`
7679}
7780
7881// ServiceProvider struct containing the provider/organization information should only be fill by the "template" configuration wfs200.yaml
7982type ServiceProvider struct {
80- XMLName xml.Name `xml:"ows:ServiceProvider"`
81- ProviderName string `xml:"ows:ProviderName" yaml:"providerName"`
82- ProviderSite struct {
83- Type string `xml:"xlink:type,attr" yaml:"type"`
84- Href string `xml:"xlink:href,attr" yaml:"href"`
85- } `xml:"ows:ProviderSite" yaml:"providerSite"`
86- ServiceContact struct {
87- IndividualName string `xml:"ows:IndividualName" yaml:"individualName"`
88- PositionName string `xml:"ows:PositionName" yaml:"positionName"`
89- ContactInfo struct {
90- Text string `xml:",chardata"`
91- Phone struct {
92- Voice string `xml:"ows:Voice" yaml:"voice"`
93- Facsimile string `xml:"ows:Facsimile" yaml:"facsimile"`
94- } `xml:"ows:Phone" yaml:"phone"`
95- Address struct {
96- DeliveryPoint string `xml:"ows:DeliveryPoint" yaml:"deliveryPoint"`
97- City string `xml:"ows:City" yaml:"city"`
98- AdministrativeArea string `xml:"ows:AdministrativeArea" yaml:"administrativeArea"`
99- PostalCode string `xml:"ows:PostalCode" yaml:"postalCode"`
100- Country string `xml:"ows:Country" yaml:"country"`
101- ElectronicMailAddress string `xml:"ows:ElectronicMailAddress" yaml:"electronicMailAddress"`
102- } `xml:"ows:Address" yaml:"address"`
103- OnlineResource struct {
104- Type string `xml:"xlink:type,attr" yaml:"type"`
105- Href string `xml:"xlink:href,attr" yaml:"href"`
106- } `xml:"ows:OnlineResource" yaml:"onlineResource"`
107- HoursOfService string `xml:"ows:HoursOfService" yaml:"hoursOfService"`
108- ContactInstructions string `xml:"ows:ContactInstructions" yaml:"contactInstructions"`
109- } `xml:"ows:ContactInfo" yaml:"contactInfo"`
110- Role string `xml:"ows:Role" yaml:"role"`
111- } `xml:"ows:ServiceContact" yaml:"serviceContact"`
83+ XMLName xml.Name `xml:"ows:ServiceProvider" yaml:"-"`
84+ ProviderName * string `xml:"ows:ProviderName" yaml:"providerName,omitempty"`
85+ ProviderSite * ProviderSite `xml:"ows:ProviderSite" yaml:"providerSite,omitempty"`
86+ ServiceContact * ServiceContact `xml:"ows:ServiceContact" yaml:"serviceContact,omitempty"`
87+ }
88+
89+ // ProviderSite struct containing the website of the provider/organization
90+ type ProviderSite struct {
91+ Type string `xml:"xlink:type,attr" yaml:"type"`
92+ Href string `xml:"xlink:href,attr" yaml:"href"`
93+ }
94+
95+ // ServiceContact struct containing information for the person to contact
96+ type ServiceContact struct {
97+ IndividualName * string `xml:"ows:IndividualName" yaml:"individualName,omitempty"`
98+ PositionName * string `xml:"ows:PositionName" yaml:"positionName,omitempty"`
99+ ContactInfo * ContactInfo `xml:"ows:ContactInfo" yaml:"contactInfo,omitempty"`
100+ Role * string `xml:"ows:Role" yaml:"role,omitempty"`
101+ }
102+
103+ // ContactInfo struct containing the contact information for the service
104+ type ContactInfo struct {
105+ Text * string `xml:",chardata" yaml:"text,omitempty"`
106+ Phone * Phone `xml:"ows:Phone" yaml:"phone,omitempty"`
107+ Address * Address `xml:"ows:Address" yaml:"address,omitempty"`
108+ OnlineResource * OnlineResource `xml:"ows:OnlineResource" yaml:"onlineResource,omitempty"`
109+ HoursOfService * string `xml:"ows:HoursOfService" yaml:"hoursOfService,omitempty"`
110+ ContactInstructions * string `xml:"ows:ContactInstructions" yaml:"contactInstructions,omitempty"`
111+ }
112+
113+ // Phone struct containing the contact telephone or fax number
114+ type Phone struct {
115+ Voice * string `xml:"ows:Voice" yaml:"voice,omitempty"`
116+ Facsimile * string `xml:"ows:Facsimile" yaml:"facsimile,omitempty"`
117+ }
118+
119+ // Address struct containing the address for the contact supplying the service
120+ type Address struct {
121+ DeliveryPoint * string `xml:"ows:DeliveryPoint" yaml:"deliveryPoint,omitempty"`
122+ City * string `xml:"ows:City" yaml:"city,omitempty"`
123+ AdministrativeArea * string `xml:"ows:AdministrativeArea" yaml:"administrativeArea,omitempty"`
124+ PostalCode * string `xml:"ows:PostalCode" yaml:"postalCode,omitempty"`
125+ Country * string `xml:"ows:Country" yaml:"country,omitempty"`
126+ ElectronicMailAddress * string `xml:"ows:ElectronicMailAddress" yaml:"electronicMailAddress,omitempty"`
127+ }
128+
129+ // OnlineResource struct containing the top-level web address of a service or service provider
130+ type OnlineResource struct {
131+ Type * string `xml:"xlink:type,attr" yaml:"type,omitempty"`
132+ Href * string `xml:"xlink:href,attr" yaml:"href,omitempty"`
112133}
0 commit comments