Skip to content

Commit 89dde28

Browse files
committed
MODLD-1082: numberOfParts property added to family/jurisdiction/meeting/organization/person
1 parent c3c3d56 commit 89dde28

16 files changed

Lines changed: 208 additions & 159 deletions

src/main/java/org/folio/linked/data/mapper/dto/resource/common/authority/MeetingAuthorityMapperUnit.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import static org.folio.ld.dictionary.PropertyDictionary.DATE;
55
import static org.folio.ld.dictionary.PropertyDictionary.MISC_INFO;
66
import static org.folio.ld.dictionary.PropertyDictionary.NAME;
7+
import static org.folio.ld.dictionary.PropertyDictionary.NUMBER_OF_PARTS;
78
import static org.folio.ld.dictionary.PropertyDictionary.PLACE;
89
import static org.folio.ld.dictionary.PropertyDictionary.SUBORDINATE_UNIT;
910
import static org.folio.ld.dictionary.ResourceTypeDictionary.MEETING;
@@ -42,6 +43,7 @@ protected JsonNode getDoc(AuthorityRequest dto) {
4243
putProperty(map, SUBORDINATE_UNIT, dto.getSubordinateUnit());
4344
putProperty(map, MISC_INFO, dto.getMiscInfo());
4445
putProperty(map, AFFILIATION, dto.getAffiliation());
46+
putProperty(map, NUMBER_OF_PARTS, dto.getAffiliation());
4547
return coreMapper.toJson(map);
4648
}
4749
}

src/main/java/org/folio/linked/data/mapper/dto/resource/common/authority/OrganizationAndJurisdictionAuthorityMapperUnit.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import static org.folio.ld.dictionary.PropertyDictionary.DATE;
55
import static org.folio.ld.dictionary.PropertyDictionary.MISC_INFO;
66
import static org.folio.ld.dictionary.PropertyDictionary.NAME;
7+
import static org.folio.ld.dictionary.PropertyDictionary.NUMBER_OF_PARTS;
78
import static org.folio.ld.dictionary.PropertyDictionary.PLACE;
89
import static org.folio.ld.dictionary.PropertyDictionary.SUBORDINATE_UNIT;
910
import static org.folio.ld.dictionary.ResourceTypeDictionary.JURISDICTION;
@@ -43,6 +44,7 @@ protected JsonNode getDoc(AuthorityRequest dto) {
4344
putProperty(map, DATE, dto.getDate());
4445
putProperty(map, MISC_INFO, dto.getMiscInfo());
4546
putProperty(map, AFFILIATION, dto.getAffiliation());
47+
putProperty(map, NUMBER_OF_PARTS, dto.getAffiliation());
4648
return coreMapper.toJson(map);
4749
}
4850
}

src/main/java/org/folio/linked/data/mapper/dto/resource/common/authority/PersonAndFamilyAuthorityMapperUnit.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import static org.folio.ld.dictionary.PropertyDictionary.MISC_INFO;
77
import static org.folio.ld.dictionary.PropertyDictionary.NAME;
88
import static org.folio.ld.dictionary.PropertyDictionary.NAME_ALTERNATIVE;
9+
import static org.folio.ld.dictionary.PropertyDictionary.NUMBER_OF_PARTS;
910
import static org.folio.ld.dictionary.PropertyDictionary.NUMERATION;
1011
import static org.folio.ld.dictionary.PropertyDictionary.TITLES;
1112
import static org.folio.ld.dictionary.ResourceTypeDictionary.FAMILY;
@@ -47,6 +48,7 @@ protected JsonNode getDoc(AuthorityRequest dto) {
4748
putProperty(map, ATTRIBUTION, dto.getAttribution());
4849
putProperty(map, NAME_ALTERNATIVE, dto.getNameAlternative());
4950
putProperty(map, AFFILIATION, dto.getAffiliation());
51+
putProperty(map, NUMBER_OF_PARTS, dto.getAffiliation());
5052
return coreMapper.toJson(map);
5153
}
5254
}

src/main/resources/profiles/authority-family.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"Profile:Authority:AttributionQualifier",
1818
"Profile:Authority:FullerFormOfName",
1919
"Profile:Authority:Affiliation",
20+
"Profile:Authority:NumberOfParts",
2021
"Profile:Authority:Identifiers"
2122
],
2223
"id": "Profile:Authority"
@@ -141,6 +142,21 @@
141142
"id": "Profile:Authority:Affiliation",
142143
"marc": "700$u"
143144
},
145+
{
146+
"type": "literal",
147+
"displayName": "Number of parts",
148+
"uriBFLite": "http://bibfra.me/vocab/library/numberOfParts",
149+
"constraints": {
150+
"repeatable": true,
151+
"editable": true,
152+
"mandatory": false,
153+
"defaults": [],
154+
"useValuesFrom": [],
155+
"valueDataType": {}
156+
},
157+
"id": "Profile:Authority:NumberOfParts",
158+
"marc": "100/700$n"
159+
},
144160
{
145161
"type": "dropdown",
146162
"displayName": "Identifiers",

src/main/resources/profiles/authority-jurisdiction.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"Profile:Authority:Date",
1616
"Profile:Authority:MiscellaneousInformation",
1717
"Profile:Authority:Affiliation",
18+
"Profile:Authority:NumberOfParts",
1819
"Profile:Authority:Identifiers"
1920
],
2021
"id": "Profile:Authority"
@@ -109,6 +110,21 @@
109110
"id": "Profile:Authority:Affiliation",
110111
"marc": "710$u"
111112
},
113+
{
114+
"type": "literal",
115+
"displayName": "Number of parts",
116+
"uriBFLite": "http://bibfra.me/vocab/library/numberOfParts",
117+
"constraints": {
118+
"repeatable": true,
119+
"editable": true,
120+
"mandatory": false,
121+
"defaults": [],
122+
"useValuesFrom": [],
123+
"valueDataType": {}
124+
},
125+
"id": "Profile:Authority:NumberOfParts",
126+
"marc": "110/710$n"
127+
},
112128
{
113129
"type": "dropdown",
114130
"displayName": "Identifiers",

src/main/resources/profiles/authority-meeting.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"Profile:Authority:SubordinateUnit",
1616
"Profile:Authority:MiscellaneousInformation",
1717
"Profile:Authority:Affiliation",
18+
"Profile:Authority:NumberOfParts",
1819
"Profile:Authority:Identifiers"
1920
],
2021
"id": "Profile:Authority"
@@ -109,6 +110,21 @@
109110
"id": "Profile:Authority:Affiliation",
110111
"marc": "711$u"
111112
},
113+
{
114+
"type": "literal",
115+
"displayName": "Number of parts",
116+
"uriBFLite": "http://bibfra.me/vocab/library/numberOfParts",
117+
"constraints": {
118+
"repeatable": true,
119+
"editable": true,
120+
"mandatory": false,
121+
"defaults": [],
122+
"useValuesFrom": [],
123+
"valueDataType": {}
124+
},
125+
"id": "Profile:Authority:NumberOfParts",
126+
"marc": "111/711$n"
127+
},
112128
{
113129
"type": "dropdown",
114130
"displayName": "Identifiers",

src/main/resources/profiles/authority-organization.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"Profile:Authority:Date",
1616
"Profile:Authority:MiscellaneousInformation",
1717
"Profile:Authority:Affiliation",
18+
"Profile:Authority:NumberOfParts",
1819
"Profile:Authority:Identifiers"
1920
],
2021
"id": "Profile:Authority"
@@ -109,6 +110,21 @@
109110
"id": "Profile:Authority:Affiliation",
110111
"marc": "710$u"
111112
},
113+
{
114+
"type": "literal",
115+
"displayName": "Number of parts",
116+
"uriBFLite": "http://bibfra.me/vocab/library/numberOfParts",
117+
"constraints": {
118+
"repeatable": true,
119+
"editable": true,
120+
"mandatory": false,
121+
"defaults": [],
122+
"useValuesFrom": [],
123+
"valueDataType": {}
124+
},
125+
"id": "Profile:Authority:NumberOfParts",
126+
"marc": "110/710$n"
127+
},
112128
{
113129
"type": "dropdown",
114130
"displayName": "Identifiers",

src/main/resources/profiles/authority-person.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"Profile:Authority:AttributionQualifier",
1818
"Profile:Authority:FullerFormOfName",
1919
"Profile:Authority:Affiliation",
20+
"Profile:Authority:NumberOfParts",
2021
"Profile:Authority:Identifiers"
2122
],
2223
"id": "Profile:Authority"
@@ -141,6 +142,21 @@
141142
"id": "Profile:Authority:Affiliation",
142143
"marc": "700$u"
143144
},
145+
{
146+
"type": "literal",
147+
"displayName": "Number of parts",
148+
"uriBFLite": "http://bibfra.me/vocab/library/numberOfParts",
149+
"constraints": {
150+
"repeatable": true,
151+
"editable": true,
152+
"mandatory": false,
153+
"defaults": [],
154+
"useValuesFrom": [],
155+
"valueDataType": {}
156+
},
157+
"id": "Profile:Authority:NumberOfParts",
158+
"marc": "100/700$n"
159+
},
144160
{
145161
"type": "dropdown",
146162
"displayName": "Identifiers",
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"description": "Authority object",
4+
"allOf": [
5+
{
6+
"type": "object",
7+
"properties": {
8+
"name": {
9+
"type": "array",
10+
"items": {
11+
"type": "string"
12+
},
13+
"x-json-property": "http://bibfra.me/vocab/lite/name"
14+
},
15+
"numeration": {
16+
"type": "array",
17+
"items": {
18+
"type": "string"
19+
},
20+
"x-json-property": "http://bibfra.me/vocab/library/numeration"
21+
},
22+
"titles": {
23+
"type": "array",
24+
"items": {
25+
"type": "string"
26+
},
27+
"x-json-property": "http://bibfra.me/vocab/library/titles"
28+
},
29+
"date": {
30+
"type": "array",
31+
"items": {
32+
"type": "string"
33+
},
34+
"x-json-property": "http://bibfra.me/vocab/lite/date"
35+
},
36+
"miscInfo": {
37+
"type": "array",
38+
"items": {
39+
"type": "string"
40+
},
41+
"x-json-property": "http://bibfra.me/vocab/library/miscInfo"
42+
},
43+
"attribution": {
44+
"type": "array",
45+
"items": {
46+
"type": "string"
47+
},
48+
"x-json-property": "http://bibfra.me/vocab/library/attribution"
49+
},
50+
"nameAlternative": {
51+
"type": "array",
52+
"items": {
53+
"type": "string"
54+
},
55+
"x-json-property": "http://bibfra.me/vocab/lite/nameAlternative"
56+
},
57+
"affiliation": {
58+
"type": "array",
59+
"items": {
60+
"type": "string"
61+
},
62+
"x-json-property": "http://bibfra.me/vocab/scholar/affiliation"
63+
},
64+
"numberOfParts": {
65+
"type": "array",
66+
"items": {
67+
"type": "string"
68+
},
69+
"x-json-property": "http://bibfra.me/vocab/library/numberOfParts"
70+
},
71+
"subordinateUnit": {
72+
"type": "array",
73+
"items": {
74+
"type": "string"
75+
},
76+
"x-json-property": "http://bibfra.me/vocab/library/subordinateUnit"
77+
},
78+
"place": {
79+
"type": "array",
80+
"items": {
81+
"type": "string"
82+
},
83+
"x-json-property": "http://bibfra.me/vocab/library/place"
84+
},
85+
"geographicCoverage": {
86+
"type": "array",
87+
"items": {
88+
"type": "string"
89+
},
90+
"x-json-property": "http://bibfra.me/vocab/library/geographicCoverage"
91+
}
92+
}
93+
}
94+
]
95+
}
96+

src/main/resources/swagger.api/schema/resource/request/AuthorityRequest.json

Lines changed: 3 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -5,86 +5,12 @@
55
{
66
"$ref": "../common/ProfileIdField.json"
77
},
8+
{
9+
"$ref": "../common/Authority.json"
10+
},
811
{
912
"type": "object",
1013
"properties": {
11-
"name": {
12-
"type": "array",
13-
"items": {
14-
"type": "string"
15-
},
16-
"x-json-property": "http://bibfra.me/vocab/lite/name"
17-
},
18-
"numeration": {
19-
"type": "array",
20-
"items": {
21-
"type": "string"
22-
},
23-
"x-json-property": "http://bibfra.me/vocab/library/numeration"
24-
},
25-
"titles": {
26-
"type": "array",
27-
"items": {
28-
"type": "string"
29-
},
30-
"x-json-property": "http://bibfra.me/vocab/library/titles"
31-
},
32-
"date": {
33-
"type": "array",
34-
"items": {
35-
"type": "string"
36-
},
37-
"x-json-property": "http://bibfra.me/vocab/lite/date"
38-
},
39-
"miscInfo": {
40-
"type": "array",
41-
"items": {
42-
"type": "string"
43-
},
44-
"x-json-property": "http://bibfra.me/vocab/library/miscInfo"
45-
},
46-
"attribution": {
47-
"type": "array",
48-
"items": {
49-
"type": "string"
50-
},
51-
"x-json-property": "http://bibfra.me/vocab/library/attribution"
52-
},
53-
"nameAlternative": {
54-
"type": "array",
55-
"items": {
56-
"type": "string"
57-
},
58-
"x-json-property": "http://bibfra.me/vocab/lite/nameAlternative"
59-
},
60-
"affiliation": {
61-
"type": "array",
62-
"items": {
63-
"type": "string"
64-
},
65-
"x-json-property": "http://bibfra.me/vocab/scholar/affiliation"
66-
},
67-
"subordinateUnit": {
68-
"type": "array",
69-
"items": {
70-
"type": "string"
71-
},
72-
"x-json-property": "http://bibfra.me/vocab/library/subordinateUnit"
73-
},
74-
"place": {
75-
"type": "array",
76-
"items": {
77-
"type": "string"
78-
},
79-
"x-json-property": "http://bibfra.me/vocab/library/place"
80-
},
81-
"geographicCoverage": {
82-
"type": "array",
83-
"items": {
84-
"type": "string"
85-
},
86-
"x-json-property": "http://bibfra.me/vocab/library/geographicCoverage"
87-
},
8814
"map": {
8915
"type": "array",
9016
"items": {

0 commit comments

Comments
 (0)