Skip to content

Commit c2abbad

Browse files
committed
doc update
1 parent 0fe7ced commit c2abbad

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

lib/DataHarmonizer.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ class DataHarmonizer {
12141214
default:
12151215
value = schema[dep_slot.name] ??= '';
12161216
}
1217-
console.log("loadschema", focus_row,dep_col, value);
1217+
console.log("loadschema", focus_row, dep_col, value);
12181218
this.hot.setDataAtCell(focus_row, parseInt(dep_col), value, 'upload');
12191219
}
12201220
}
@@ -1297,20 +1297,27 @@ class DataHarmonizer {
12971297
reference: value // In this case value is a string
12981298
});
12991299
break;
1300+
13001301
case 'Setting':
13011302
this.addRowRecord(dh, tables, {
13021303
schema_id: loaded_schema_name,
13031304
name: item_name,
13041305
value: value // In this case value is a string
13051306
});
13061307
break;
1308+
13071309
case 'Extension':
13081310
// FUTURE: make this read-only?
1311+
// Each locale entry gets copied to the Extension table/class in a shallow way
1312+
// But also gets copied to the schema locales table held in first cell
1313+
// See "if (locales)" condition above.
1314+
// FUTURE: revise this so Extension's cell metadata holds it?
13091315
this.addRowRecord(dh, tables, {
13101316
schema_id: loaded_schema_name,
13111317
name: item_name,
13121318
value: value // In this case value is a string or object. It won't be renderable via DH
13131319
});
1320+
13141321
break;
13151322

13161323
case 'Enum':
@@ -1644,19 +1651,16 @@ class DataHarmonizer {
16441651
uri: 'xsd:token'
16451652
}
16461653
},
1647-
settings: {
1648-
//Title_Case: "(((?<=\\b)[^a-z\\W]\\w*?|[\\W])+)",
1649-
//UPPER_CASE: "[A-Z\\W\\d_]*",
1650-
//lower_case: "[a-z\\W\\d_]*"
1651-
},
1654+
settings: {},
16521655
extensions: {}
16531656
}
16541657

16551658
// Loop through loaded DH schema and all its dependent child tabs.
16561659
let components = ['Schema', ... Object.keys(this.context.relations['Schema'].child)];
16571660
for (let [ptr, tab_name] of components.entries()) {
1658-
// For Schema, key slot is 'name'; for all other tables it is 'schema_id'
1659-
let schema_key_slot = (tab_name === 'Schema' ? 'name' : 'schema_id');
1661+
// For Schema, key slot is 'name'; for all other tables it is
1662+
// 'schema_id' which has a foreign key relationship to schema
1663+
let schema_key_slot = (tab_name === 'Schema') ? 'name' : 'schema_id';
16601664
let rows = this.context.crudFindAllRowsByKeyVals(tab_name, {[schema_key_slot]: schema_name})
16611665
let dependent_dh = this.context.dhs[tab_name];
16621666

@@ -1681,7 +1685,6 @@ class DataHarmonizer {
16811685
break;
16821686
case 'xsd:boolean':
16831687
value = ['t','true','1','yes','y'].includes(value.toLowerCase());
1684-
console.log('after', value)
16851688
break;
16861689
}
16871690

0 commit comments

Comments
 (0)