Skip to content

Commit

Permalink
feat(extra-types): Add more types for unknown dataset mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed May 15, 2017
1 parent 399a12d commit da0e1a3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,34 @@ class TypeProcessor {
constructor() {
this.types = os_types;
this.ident = x => { return x; }
this._addExtraTypes();
}

_addExtraTypes() {
for (let i = 1 ; i <= 20 ; i++) {
this.types[`unknown:string-${i}:code`] = {
dimensionType: "other",
dataType: "string",
uniqueIdentifier: true
};
this.types[`unknown:string-${i}:label`] = {
dimensionType: "other",
dataType: "string",
labelfor: `unknown:string-${i}:code`
};
os_type_descriptions[`unknown:string-${i}:`] = {
displayName: `unknown dimension #${i}`,
description: `Placeholder for an unknown dimension #${i}`
};
os_type_descriptions[`unknown:string-${i}:code`] = {
displayName: `unknown dimension #${i} code`,
description: `Unknown dimension #${i}'s code`
};
os_type_descriptions[`unknown:string-${i}:label`] = {
displayName: `unknown dimension #${i} label`,
description: `Unknown dimension #${i}'s label`
};
}
}

getAllTypes() {
Expand Down

0 comments on commit da0e1a3

Please sign in to comment.