Skip to content

Commit aa2f58b

Browse files
authored
Merge pull request #718 from lcnetdev/scratch-record-updates
Scratch Record Updates
2 parents 6942120 + e6c636e commit aa2f58b

2 files changed

Lines changed: 22 additions & 15 deletions

File tree

src/views/Load.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,11 +1091,11 @@ export default {
10911091
{
10921092
"@guid": short.generate(),
10931093
"@type": "http://id.loc.gov/ontologies/bibframe/Agent",
1094-
"@id": "http://id.loc.gov/vocabulary/organizations/dlc",
1094+
"@id": "http://id.loc.gov/vocabulary/organizations/dlcmrc",
10951095
"http://id.loc.gov/ontologies/bibframe/code": [
10961096
{
10971097
"@guid": short.generate(),
1098-
"http://id.loc.gov/ontologies/bibframe/code": "DLC",
1098+
"http://id.loc.gov/ontologies/bibframe/code": "DLC-MRC",
10991099
"@datatype": "http://id.loc.gov/datatypes/orgs/code"
11001100
}
11011101
]
@@ -1179,7 +1179,7 @@ export default {
11791179
"http://id.loc.gov/ontologies/bflc/catalogerId": [
11801180
{
11811181
"@guid": "fgHPJYcNZNBkeELEUv1M3E",
1182-
"http://id.loc.gov/ontologies/bflc/catalogerId": this.preferenceStore.catInitals
1182+
"http://id.loc.gov/ontologies/bflc/catalogerId": this.preferenceStore.catCode
11831183
}
11841184
],
11851185
"http://id.loc.gov/ontologies/bflc/encodingLevel": [
@@ -1287,7 +1287,7 @@ export default {
12871287
"http://id.loc.gov/ontologies/bibframe/identifiedBy": [
12881288
{
12891289
"@guid": short.generate(),
1290-
"@type": "http://id.loc.gov/ontologies/bibframe/Lccn"
1290+
"@type": "http://id.loc.gov/ontologies/bibframe/Isbn"
12911291
}
12921292
]
12931293
},
@@ -1360,14 +1360,15 @@ export default {
13601360
this.activeProfile.rt[rt].ptOrder.splice(startPos+1, 0, 'id_loc_gov_ontologies_bibframe_identifiedBy__identifiers_1')
13611361
this.activeProfile.rt[rt].ptOrder.splice(startPos+2, 0, 'id_loc_gov_ontologies_bibframe_identifiedBy__identifiers_2')
13621362
}
1363+
}
13631364
1364-
// add the defaults
1365-
//this.profileStore.insertDefaultValuesComponent(component['@guid'], structure)
1366-
for (let t of Object.keys(pt)){
1367-
let target = pt[t]
1368-
let structure = this.profileStore.returnStructureByComponentGuid(target['@guid'])
1369-
this.profileStore.insertDefaultValuesComponent(target['@guid'], structure)
1370-
}
1365+
// add the defaults
1366+
//this.profileStore.insertDefaultValuesComponent(component['@guid'], structure)
1367+
let pt = this.activeProfile.rt[rt].pt
1368+
for (let t of Object.keys(pt)){
1369+
let target = pt[t]
1370+
let structure = this.profileStore.returnStructureByComponentGuid(target['@guid'])
1371+
this.profileStore.insertDefaultValuesComponent(target['@guid'], structure)
13711372
}
13721373
}
13731374
}

tests-playwright/components/complex_lookup/subject_builder.spec.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,8 @@ test('Add a Geo with subdiv (complex) and check it has the correct XML', async (
662662
await page.getByText('Spain--History', { exact: true }).click();
663663
await page.getByRole('button', { name: 'Add [SHIFT+Enter]' }).click();
664664
await page.getByText('bf:Work').click();
665-
await expect(page.locator('#app')).toContainText('<bf:subject><madsrdf:Topicxmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"rdf:about="http://id.loc.gov/authorities/subjects/sh85126069"><madsrdf:isMemberOfMADSSchemerdf:resource="http://id.loc.gov/authorities/subjects" /><madsrdf:authoritativeLabel>Spain‑‑History</madsrdf:authoritativeLabel><rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Spain‑‑History</rdfs:label><bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">151 0$aSpain$xHistory</bflc:marcKey><bf:source><bf:Sourcerdf:about="http://id.loc.gov/vocabulary/subjectSchemes/lcsh"><rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Library of Congress subject headings</rdfs:label></bf:Source></bf:source></madsrdf:Topic></bf:subject>');
665+
await expect(page.locator('#app')).toContainText('<rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Spain‑‑History</rdfs:label>');
666+
await expect(page.locator('#app')).toContainText('<bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">151 0$aSpain$xHistory</bflc:marcKey>');
666667
});
667668

668669
test('Add a Geo with subdiv (simple) and check it has the correct XML', async ({ page }) => {
@@ -684,7 +685,9 @@ test('Add a Geo with subdiv (simple) and check it has the correct XML', async ({
684685
await page.getByText('Travel', { exact: true }).first().click();
685686
await page.getByRole('button', { name: 'Add [SHIFT+Enter]' }).click();
686687
await page.getByText('bf:Work').click();
687-
await expect(page.locator('#app')).toContainText('<bf:subject><madsrdf:ComplexSubjectxmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"><madsrdf:isMemberOfMADSSchemerdf:resource="http://id.loc.gov/authorities/subjects" /><madsrdf:authoritativeLabel>Spain--Travel</madsrdf:authoritativeLabel><rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Spain--Travel</rdfs:label><madsrdf:componentListrdf:parseType="Collection"><madsrdf:Geographicrdf:about="http://id.loc.gov/authorities/names/n79006971"><madsrdf:authoritativeLabel>Spain</madsrdf:authoritativeLabel><bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">151 $aSpain</bflc:marcKey></madsrdf:Geographic><madsrdf:Topicrdf:about="http://id.loc.gov/authorities/subjects/sh99005039"><madsrdf:authoritativeLabel>Travel</madsrdf:authoritativeLabel><bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">180 $xTravel</bflc:marcKey></madsrdf:Topic></madsrdf:componentList><bf:source><bf:Sourcerdf:about="http://id.loc.gov/vocabulary/subjectSchemes/lcsh"><rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Library of Congress subject headings</rdfs:label></bf:Source></bf:source></madsrdf:ComplexSubject></bf:subject>');
688+
await expect(page.locator('#app')).toContainText('<rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Spain--Travel</rdfs:label>');
689+
await expect(page.locator('#app')).toContainText('<bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">151 $aSpain</bflc:marcKey>');
690+
await expect(page.locator('#app')).toContainText('<bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">180 $xTravel</bflc:marcKey>');
688691
});
689692

690693

@@ -707,7 +710,9 @@ test('Add a name with subdiv (simple) and check it has the correct XML', async (
707710
await page.getByText('Interviews', { exact: true }).nth(0).click();
708711
await page.getByRole('button', { name: 'Add [SHIFT+Enter]' }).click();
709712
await page.getByText('bf:Work').click();
710-
await expect(page.locator('#app')).toContainText('<bf:subject><madsrdf:ComplexSubjectxmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"><madsrdf:isMemberOfMADSSchemerdf:resource="http://id.loc.gov/authorities/subjects" /><madsrdf:authoritativeLabel>Twain, Mark, 1835-1910--Interviews</madsrdf:authoritativeLabel><rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Twain, Mark, 1835-1910--Interviews</rdfs:label><madsrdf:componentListrdf:parseType="Collection"><madsrdf:PersonalNamerdf:about="http://id.loc.gov/authorities/names/n79021164"><madsrdf:authoritativeLabel>Twain, Mark, 1835-1910</madsrdf:authoritativeLabel><bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">1001 $aTwain, Mark,$d1835-1910</bflc:marcKey></madsrdf:PersonalName><madsrdf:Topicrdf:about="http://id.loc.gov/authorities/subjects/sh2010013210"><madsrdf:authoritativeLabel>Interviews</madsrdf:authoritativeLabel><bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">180 $xInterviews</bflc:marcKey></madsrdf:Topic></madsrdf:componentList><bf:source><bf:Sourcerdf:about="http://id.loc.gov/vocabulary/subjectSchemes/lcsh"><rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Library of Congress subject headings</rdfs:label></bf:Source></bf:source></madsrdf:ComplexSubject></bf:subject>');
713+
await expect(page.locator('#app')).toContainText('<rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Twain, Mark, 1835-1910--Interviews</rdfs:label>');
714+
await expect(page.locator('#app')).toContainText('<bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">1001 $aTwain, Mark,$d1835-1910</bflc:marcKey>');
715+
await expect(page.locator('#app')).toContainText('<bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">180 $xInterviews</bflc:marcKey>');
711716
});
712717

713718
// jurisdiction
@@ -727,7 +732,8 @@ test('Add a Jurisdiction and check it has the correct XML', async ({ page }) =>
727732
await page.getByText('Kenya. Horticultural Crops Development Authority [LCNAF]').click();
728733
await page.getByRole('button', { name: 'Add [SHIFT+Enter]' }).click();
729734
await page.getByText('bf:Work').click();
730-
await expect(page.locator('#app')).toContainText('<bf:subject><bf:Jursidictionrdf:about="http://id.loc.gov/authorities/names/n94900835"><madsrdf:isMemberOfMADSSchemexmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#"rdf:resource="http://id.loc.gov/authorities/subjects" /><madsrdf:authoritativeLabelxmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#">Kenya. Horticultural Crops Development Authority</madsrdf:authoritativeLabel><rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Kenya. Horticultural Crops Development Authority</rdfs:label><bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">11010$aKenya.$bHorticultural Crops Development Authority</bflc:marcKey><bf:source><bf:Sourcerdf:about="http://id.loc.gov/vocabulary/subjectSchemes/lcsh"><rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Library of Congress subject headings</rdfs:label></bf:Source></bf:source></bf:Jursidiction></bf:subject>');
735+
await expect(page.locator('#app')).toContainText('<rdfs:labelxmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">Kenya. Horticultural Crops Development Authority</rdfs:label>');
736+
await expect(page.locator('#app')).toContainText('<bflc:marcKeyxmlns:bflc="http://id.loc.gov/ontologies/bflc/">11010$aKenya.$bHorticultural Crops Development Authority</bflc:marcKey>');
731737
});
732738

733739

0 commit comments

Comments
 (0)