@rr0/cms 0.3.19 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,8 +4,14 @@ import { Level2Date as EdtfDate } from "@rr0/time";
|
|
|
4
4
|
export class CaseFactory extends TypedDataFactory {
|
|
5
5
|
parse(dataJson) {
|
|
6
6
|
const parsedCase = super.parse(dataJson);
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const time = dataJson.time;
|
|
8
|
+
if (time) {
|
|
9
|
+
parsedCase.time = EdtfDate.fromString(time);
|
|
10
|
+
}
|
|
11
|
+
const placeName = dataJson.place;
|
|
12
|
+
if (placeName) {
|
|
13
|
+
parsedCase.place = new NamedPlace(placeName);
|
|
14
|
+
}
|
|
9
15
|
parsedCase.classification = dataJson.classification;
|
|
10
16
|
parsedCase.conclusion = dataJson.conclusion;
|
|
11
17
|
return parsedCase;
|
package/package.json
CHANGED