diff --git a/src/org/snaccooperative/exporters/SNACConstellationItem.java b/src/org/snaccooperative/exporters/SNACConstellationItem.java index 6fa150e..867d457 100644 --- a/src/org/snaccooperative/exporters/SNACConstellationItem.java +++ b/src/org/snaccooperative/exporters/SNACConstellationItem.java @@ -75,7 +75,7 @@ public SNACConstellationItem( } switch (snacField) { - case "id": + case "snac cpf id": try { int id = Integer.parseInt(cellValue); con.setID(id); @@ -83,7 +83,7 @@ public SNACConstellationItem( } continue; - case "entity type": + case "cpf type": Term entityTypeTerm = createEntityTypeTerm(cellValue); if (entityTypeTerm == null) { @@ -104,9 +104,9 @@ public SNACConstellationItem( continue; - case "date": - // find and add required associated date type in this row - String dateTypeColumn = schema.getReverseColumnMappings().get("date type"); + case "exist date": + // find and add required associated exist date type in this row + String dateTypeColumn = schema.getReverseColumnMappings().get("exist date type"); if (dateTypeColumn == null) { logger.error("no date type column found"); @@ -135,7 +135,7 @@ public SNACConstellationItem( continue; - case "date type": // queried alongside "date" + case "exist date type": // queried alongside "exist date" continue; case "subject": @@ -250,7 +250,7 @@ public SNACConstellationItem( continue; - case "external related cpf": + case "external related cpf url": SameAs sameAs = new SameAs(); sameAs.setURI(cellValue); sameAs.setOperation("insert"); @@ -292,13 +292,13 @@ public SNACConstellationItem( case "resource role": // queried alongside "resource id" continue; - case "related cpf id": + case "related cpf snac id": ConstellationRelation cpfRelation = new ConstellationRelation(); cpfRelation.setSourceConstellation(con.getID()); cpfRelation.setTargetConstellation(Integer.parseInt(cellValue)); // Get Relation Type. - String cpfRelationTypeColumn = schema.getReverseColumnMappings().get("related cpf relation type"); + String cpfRelationTypeColumn = schema.getReverseColumnMappings().get("cpf to cpf relation type"); if (cpfRelationTypeColumn != null) { String cpfRelationType = getCellValueForRowByColumnName(project, row, cpfRelationTypeColumn); @@ -309,7 +309,7 @@ public SNACConstellationItem( cpfRelations.add(cpfRelation); continue; - case "related cpf relation type": // Queried alongside related cpf id + case "cpf to cpf relation type": // Queried alongside related cpf snac id break; default: @@ -367,11 +367,11 @@ public String getPreviewText() { String snacField = snacText.toLowerCase(); switch (snacField) { - case "id": + case "snac cpf id": preview += snacText + ": " + _constellation.getID() + "\n"; break; - case "entity type": + case "cpf type": Term previewTerm = _constellation.getEntityType(); if (previewTerm != null) { preview += snacText + ": " + previewTerm.getTerm() + " (" + previewTerm.getID() + ")\n"; @@ -382,7 +382,7 @@ public String getPreviewText() { preview += snacText + ": " + _constellation.getNameEntries() + "\n"; break; - case "date": + case "exist date": preview += snacText + ": " + _constellation.getDateList() + "\n"; break; @@ -411,11 +411,11 @@ public String getPreviewText() { preview += snacText + ": " + _constellation.getSources() + "\n"; break; - case "external related cpf": + case "external related cpf url": preview += snacText + ": " + _constellation.getSameAsRelations() + "\n"; break; - case "related cpf id": + case "related cpf snac id": preview += snacText + ": " + _constellation.getRelations() + "\n"; break; diff --git a/src/resources/module/langs/translation-en.json b/src/resources/module/langs/translation-en.json index fa8834d..993979e 100644 --- a/src/resources/module/langs/translation-en.json +++ b/src/resources/module/langs/translation-en.json @@ -13,6 +13,7 @@ "snac-extension/upload-to-snac": "Upload to SNAC", "snac-schema/copy-reference": "copy", "snac-schema/dialog-explanation": "The SNAC schema below specifies how your tabular data will be transformed into SNAC Resources or CPFs. You can drag and drop the column names below in most input boxes: for each row, entries will be created or updated with the values in these columns. Unmapped fields will be ignored.", + "snac-schema/dialog-explanation2": "

Note: External Related CPF URLs are limited to those found in this list The URL should be based on the Formatter template in the linked document.

", "snac-schema/discard-button": "Discard changes", "snac-schema/discard-schema-changes-alt": "Discard the changes made to the schema.", "snac-schema/items-preview-tab-header": "Preview", diff --git a/src/resources/module/scripts/dialogs/schema-alignment-dialog.html b/src/resources/module/scripts/dialogs/schema-alignment-dialog.html index 771dd97..8e54b05 100644 --- a/src/resources/module/scripts/dialogs/schema-alignment-dialog.html +++ b/src/resources/module/scripts/dialogs/schema-alignment-dialog.html @@ -10,6 +10,7 @@

+

diff --git a/src/resources/module/scripts/dialogs/schema-alignment-dialog.js b/src/resources/module/scripts/dialogs/schema-alignment-dialog.js index 8e4c9ee..0418900 100644 --- a/src/resources/module/scripts/dialogs/schema-alignment-dialog.js +++ b/src/resources/module/scripts/dialogs/schema-alignment-dialog.js @@ -73,25 +73,25 @@ SNACSchemaAlignmentDialog.getSNACModel = function() { ]; this.SNACConstellationModel = [ - { name: "Entity Type", required: true, tooltip: "The entity type (person, corporateBody, family)" }, - { name: "ID", required: false, tooltip: "SNAC ID" }, - { name: "Name Entry", required: false, tooltip: "Name Entry" }, - { name: "Date", required: false, tooltip: "Date" }, - { name: "Date Type", required: false, tooltip: "Date Type (Birth, Death)" }, - { name: "Subject", required: false, tooltip: "Subject" }, - { name: "Place", required: false, tooltip: "Place" }, - { name: "Place Role", required: false, tooltip: "Place Role (Birth, Death, Residence, Citizenship)" }, - { name: "Occupation", required: false, tooltip: "Occupation" }, - { name: "Activity", required: false, tooltip: "Activity" }, - { name: "BiogHist", required: false, tooltip: "BiogHist" }, - { name: "External Related CPF", required: false, tooltip: "The URL to this entity in another identity authority such as wikiData or VIAF, aka 'SameAs Relation'" }, - { name: "Resource ID", required: false, tooltip: "The SNAC Resource ID for the connected resource" }, - { name: "Resource Role", required: false, tooltip: "The role of this Constellation with the Resource (creatorOf, referencedIn, editorOf, contributorOf)" }, - { name: "Source Citation", required: false, tooltip: "Source citation" }, - { name: "Source Citation URL", required: false, tooltip: "The URL for this citation" }, - { name: "Source Citation Found Data", required: false, tooltip: "Data as found to be cited" }, - { name: "Related CPF ID", required: false, tooltip: "SNAC ID of related CPF entity" }, - { name: "Related CPF relation type", required: false, tooltip: "Type of CPF relation (associatedWith, correspondedWith, etc)" } + { name: "CPF Type", required: true, tooltip: "Type of CPF entity. Possible values are: corporateBody, person, family" }, + { name: "SNAC CPF ID", required: false, tooltip: "SNAC identifier for the CPF entity. Leave blank if the CPF is NOT in SNAC." }, + { name: "Name Entry", required: false, tooltip: "Preferred Name Entry of the CPF entity." }, + { name: "Date", required: false, tooltip: "Exist Date or Dates of the CPF entity." }, + { name: "Date Type", required: false, tooltip: "Type of Exist Date. The following values may be used: Active, Birth, Death, Establishment, Disestablishment" }, + { name: "Subject", required: false, tooltip: "Subject term associated with the CPF entity. Repeatable in relation to entity. " }, + { name: "Place", required: false, tooltip: "Place name associated with the CPF entity. Repeatable in relation to entity." }, + { name: "Place Role", required: false, tooltip: "Role of the place in relation to the CPF entity. The following values may be used: Birth, Death, Residence" }, + { name: "Occupation", required: false, tooltip: "Occupation term associated with the CPF entity. Repeatable in relation to entity." }, + { name: "Activity", required: false, tooltip: "Activity term associated with the CPF entity. Repeatable in relation to entity." }, + { name: "BiogHist", required: false, tooltip: "Biography or History note associated with the CPF entity. By exception, the note is encoded in XML based on a simplified version of the element in EAC-CPF. Biography or History note associated with the CPF entity. By exception, the note is encoded in XML based on a simplified version of the element in EAC-CPF." }, + { name: "External Related CPF URL", required: false, tooltip: "URL to a description of the CPF entity in an external authority. Such links are limited to those found in https://docs.google.com/spreadsheets/d/1R2kX5yyKd_jsOGRifgNd18xDRNi0AiY193NO6msv7t8/edit#gid=0 The URL should be based on the Formatter template in the linked document. Repeatable in relation to entity" }, + { name: "Resource ID", required: false, tooltip: "SNAC ID for a related Resource in SNAC." }, + { name: "Resource Role", required: false, tooltip: "Role of the CPF entity in relation to the Resource. The following values may be used: contributorOf, creatorOf, editorOf, referencedIn"}, + { name: "Source Citation", required: false, tooltip: "Text citation for a source used in describing the CPF entity." }, + { name: "Source Citation URL", required: false, tooltip: "URL, if available, for the Source Citation." }, + { name: "Source Citation Found Data", required: false, tooltip: "Information found in the Source that is evidence used in the description of the CPF entity." }, + { name: "Related CPF SNAC ID", required: false, tooltip: "SNAC ID of a CPF entity in SNAC related to the CPF entity. Repeatable in relation to entity." }, + { name: "CPF to CPF Relation Type", required: false, tooltip: "Nature of the relation of the CPF entity with the related CPF entity. The following values may be used: associatedWith, correspondedWith" } ]; this.SNACResourceNames = this.SNACResourceModel.map(x => x.name); @@ -215,6 +215,7 @@ SNACSchemaAlignmentDialog.setUpTabs = function() { var schemaTab = $(DOM.loadHTML("snac", "scripts/schema-alignment-tab.html")).appendTo(this._schemaPanel); var schemaElmts = this._schemaElmts = DOM.bind(schemaTab); schemaElmts.dialogExplanation.text($.i18n('snac-schema/dialog-explanation')); + schemaElmts.dialogExplanation2.html($.i18n('snac-schema/dialog-explanation2')); schemaElmts.saveButton .text($.i18n('snac-schema/save-button')) .attr('title', $.i18n('snac-schema/save-schema-alt')) diff --git a/src/resources/module/scripts/schema-alignment-tab.html b/src/resources/module/scripts/schema-alignment-tab.html index 91fa517..6465ee7 100644 --- a/src/resources/module/scripts/schema-alignment-tab.html +++ b/src/resources/module/scripts/schema-alignment-tab.html @@ -5,14 +5,15 @@

+

Uploading:

- Resource
- Constellation
+ Resources
+ CPFs