UNPKG

@wbg-mde/repository

Version:

Managing all common method for file system CRUD operations.

167 lines (166 loc) 5.44 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class Export_Master_Config { static get ddiHeaderAttr() { return ddiHeaderAttr; } static get dublinCoreHeaderAttr() { return dublinCoreHeaderAttr; } static get geospatialHeaderAttr() { return geospatialHeaderAttr; } static get xmlNodeProps() { return xmlNodeProps; } static get formSchemaTypes() { return formSchemaTypes; } static get headerAttributeProps() { return headerAttributeProps; } static get codeBookNodes() { return codeBookNodes; } static get ddiNodes() { return ddiNodes; } static get rdfNodes() { return rdfNodes; } static get variableDescriptionProps() { return variableDescriptionProps; } static get fileDescriptionProps() { return fileDescriptionProps; } static get defaultOptions() { return defaultOptions; } static get customAttributes() { return customAttributes; } static get variableDocSectionMap() { return variableDocSectionMap; } static get variableTemplateNodes() { return variableTemplateNodes; } static get fileDescSectionMap() { return fileDescSectionMap; } static get staticProps() { return staticProps; } static get hiddenKeys() { return hiddenKeys; } static get actions() { return actions; } } exports.Export_Master_Config = Export_Master_Config; const xmlNodeProps = { headerAttribute: "@", elementProp: "#", rootNode: "codeBook", rdfRoot: "rdf:RDF", rdfParentNode: "rdf:Description", geoRoot: "gmi:MI_Metadata", missing: 'Sysmiss' }; const customAttributes = { template: "Template", type: "Type" }; const codeBookNodes = { FileDescription: "fileDscr", dataSets: "datasets", DataDescription: "dataDscr", variable: "var", varGroups: "varGrp" }; const ddiNodes = { dataSets: "datasets", fileDescription: "fileDscr", variables: "variables", variable: "variable", docDscr: "docDscr", stdyDscr: "stdyDscr", varGroups: "variableGroups" }; const rdfNodes = { resDescription: "resDscr" }; const ddiHeaderAttr = { version: "2.5", xml_lang: "en", xmlns: "ddi:codebook:2_5", xmlns_xsi: "http://www.w3.org/2001/XMLSchema-instance", xsi_schemaLoc: "ddi:codebook:2_5 http://www.ddialliance.org/Specification/DDI-Codebook/2.5/XMLSchema/codebook.xsd" }; const dublinCoreHeaderAttr = { xmlns_rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#", xmlns_dc: "http://purl.org/dc/elements/1.1/", xmlns_dcterms: "http://purl.org/dc/terms/" }; const geospatialHeaderAttr = { xmlns_gco: "http://www.isotc211.org/2005/gco", xmlns: "http://www.isotc211.org/2005/gmi", xmlns_gmd: "http://www.isotc211.org/2005/gmd", xmlns_gmi: "http://www.isotc211.org/2005/gmi", xmlns_gmx: "http://www.isotc211.org/2005/gmx", xmlns_gsr: "http://www.isotc211.org/2005/gsr", xmlns_xsi: "http://www.w3.org/2001/XMLSchema-instance", xmlns_fn: "http://www.w3.org/2005/xpath-functions", xmlns_gss: "http://www.isotc211.org/2005/gss", xmlns_gts: "http://www.isotc211.org/2005/gts", xmlns_gml: "http://www.opengis.net/gml/3.2", xmlns_xlink: "http://www.w3.org/1999/xlink", xsi_schemaLocation: "http://www.isotc211.org/2005/gmi http://www.ngdc.noaa.gov/metadata/published/xsd/schema.xsd" }; const formSchemaTypes = { table: "table", date: "date", string: "string", object: "object", fieldset: "fieldset", array: "array" }; const headerAttributeProps = { fileDescr: ["ID", "URI"], varDescr: ["ID", "uniqueId", "name", "files", "dcml", "intrvl"] }; const staticProps = { fileText: ["fileName", "fileStrc", "dimensns", "fileType"] }; const variableDescriptionProps = { validRange: "valrng", invalidRange: "invalrng", validRange_range: "range", invalidRange_item: "item", summaryStatus: "sumStat", category: "catgry", categoryStatus: "catStat", location: "location", label: "labl", labelled: "labelled", format: "varFormat", internalName: "internalName" }; const variableTemplateNodes = { imputation: "imputation", security: "security", respUnit: "respUnit", qstn: "qstn", universe: "universe", txt: "txt", notes: "notes", concept: "concept", recording: "codInstr" }; const fileDescriptionProps = { fileText: "fileTxt", prefixKey: "fileDscr.", fileStrc: "fileStrc", fileStrcType: 'type', recGrp: "recGrp", keyvar: "keyvar" }; const defaultOptions = { studyType: "DDI", tmplFile: "default_template" }; const variableDocSectionMap = { "type": "VariableDoc", "items": [{ "key": "variables", "title": "Documentation", "type": "fieldset", "useTemplate": true, "treeView": { "cssClasses": {} } }] }; const fileDescSectionMap = { "type": "FileDescription", "items": [{ "key": "fileDscr", "title": "File Description", "type": "fieldset", "useTemplate": true, "treeView": { "cssClasses": {} } }] }; const hiddenKeys = { "category": ["labelled"] }; const actions = { "export": "export", "import": "import" };