Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corporate info requirements for HNAP2.3 #19

Closed
alexandreleroux opened this issue Aug 10, 2015 · 3 comments
Closed

Corporate info requirements for HNAP2.3 #19

alexandreleroux opened this issue Aug 10, 2015 · 3 comments
Assignees
Milestone

Comments

@alexandreleroux
Copy link
Contributor

HNAP2.3 has mandatory requirements for 'Corporate information'. There are 3 parameters: Branch, Directorate and Project. The first two are mandatory and 'Project' is optional.

The ECDC provides a dropdown list for selecting Branch and Directorate, along with a freetext box for Project (in both language). In the pygeometa spirit, I suggest specifying 'Corporate info' directly in the MCF file. Parameter names could be HNAP_Branch, HNAP_Directorate and HNAP_Project-en / HNAP_Project-fr.

Here's an example of an output XML which has the 'Corporate info' in it. This section comes right after /gmd:supplementalInformation

                        <napec:EC_CorporateInfo>
                                <napec:EC_Branch>
                                        <napec:EC_Branch_TypeCode codeListValue="meteorological_service_canada" codeList="http://www.ec.gc.ca/data_donnees/standards/schemas/napec#EC_Branch"/>
                                </napec:EC_Branch>
                                <napec:EC_Directorate>
                                        <napec:EC_Directorate_TypeCode codeListValue="weather_environmental_operations" codeList="http://www.ec.gc.ca/data_donnees/standards/schemas/napec#EC_Directorate"/>
                                </napec:EC_Directorate>
                                <napec:EC_Project xsi:type="gmd:PT_FreeText_PropertyType">
                                        <gco:CharacterString>Test project in English</gco:CharacterString>
                                        <gmd:PT_FreeText>
                                                <gmd:textGroup>
                                                        <gmd:LocalisedCharacterString locale="#fra">Projet test en français</gmd:LocalisedCharacterString>
                                                </gmd:textGroup>
                                        </gmd:PT_FreeText>
                                </napec:EC_Project>
                                <napec:GC_Security_Classification>
                                        <napec:GC_Security_Classification_TypeCode codeListValue="" codeList="http://www.ec.gc.ca/data_donnees/standards/schemas/napec#GC_Security_Classification"/>
                                </napec:GC_Security_Classification>
                                <napec:EC_Program>
                                        <napec:EC_Program_TypeCode codeListValue="" codeList="http://www.ec.gc.ca/data_donnees/standards/schemas/napec#EC_Program"/>
                                </napec:EC_Program>
                        </napec:EC_CorporateInfo>
                </napec:MD_DataIdentification>

Let me know if you need additional info. Thanks! -- Alex

@tomkralidis
Copy link
Member

As discussed this requirement is a very specific use case which is best done downstream of pygeometa output. Proposed workflow is to create an XML snippet of the information above and inject into XML like:

sed "s#</gmd:MD_DataIdentification>#$(sed 's:/:\\/:g' foo.xml)\n  </gmd:MD_DataIdentification>#" hnap_metadata.xml

where foo.xml is the XML file to be injected into the pygeometa outputted file.

@alexandreleroux does this work for you?

@alexandreleroux
Copy link
Contributor Author

Injection of corporate info works, will close ticket once documentation is updated

@tomkralidis tomkralidis modified the milestones: 0.2.0, 1.0.0 Mar 23, 2017
@alexandreleroux
Copy link
Contributor Author

After validation, this is a requirement on top of the HNAP schema and should be handled outside of pygeometa. Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants