ES-DOC / esdoc-questionnaire

ES-DOC Questionnaire (webform generator for creating CIM Documents). POC: @allynt
Other
2 stars 1 forks source link

Incorporate "meta" classes & properties into the Questionnaire #514

Closed allynt closed 7 years ago

allynt commented 7 years ago

Incorporate "meta" classes & properties into the Questionnaire. Previously some of the "meta" information was injected at publication time by hard-coding content in templates. A more general solution is preferred.

allynt commented 7 years ago

Institute code is one of several "meta document info" attributes. My QXML generator ignores all of those attributes (b/c it included things like publication dates, uuids, etc. that I thought a user shouldn't have to manually deal w/).

To get around this, rather than ignore all meta attributes, I should only ignore some of them. This requires some external configuration options but it is clearly doable.

allynt commented 7 years ago

The meta attributes are defined in https://github.com/ES-DOC/esdoc-cim/blob/master/v2/schema/shared_classes.py. They are:

            ('author', 'shared.party', '0.1',
               "Author of the metadata in the parent document."),
            ('create_date', 'datetime', '1.1',
                "Date upon which the instance was created."),
            ('drs_keys', 'str', '0.N',
                "DRS related keys to support correlation of documents with datasets."),
            ('drs_path', 'str', '0.1',
                "DRS related path to support documents with datasets."),
            ('external_ids', 'str', '0.N',
                "Set of identifiers used to reference the document by external parties."),
            ('id', 'str', '1.1',
                "Universal document identifier (normally a UUID)."),
            ('institute', 'str', '0.1',
                "Name of institute with which instance is associated."),
            ('language', 'str', '1.1',
                "Language with which instance is associated."),
            ('project', 'str', '1.1',
                "Name of project with which instance is associated."),
            ('sort_key', 'str', '0.1',
                "Document sort key."),
            ('source', 'str', '1.1',
                "Name of application that created the instance."),
            ('source_key', 'str', '0.1',
                "Key of application that created the instance."),
            ('sub_projects', 'str', '0.N',
                "Set of sub-projects with which instance is associated."),
            ('type', 'str', '1.1',
                "Document ontology type."),
            ('type_display_name', 'str', '0.1',
                "Document type display name."),
            ('type_sort_key', 'str', '0.1',
                "Document type sort key."),
            ('update_date', 'datetime', '1.1',
                "Date upon which the instance was last updated."),
            ('version', 'int', '1.1',
                "Document version identifier.")
allynt commented 7 years ago

To keep code simple, I will just create all of these attributes in esdoc-mp the usual way, but tag them as "meta". Then in the Q do something clever (in the Customizer) to hide/show them as desired.

allynt commented 7 years ago

e88793534f32751fcfe859755b9c8b67e446eeda lays the groundwork for properly handling meta information...

allynt commented 7 years ago

The focus of this ticket has changed to be more generally about how to handle "meta" properties. So I am opening another ticket (#527) dealing w/ institute code specifically.