diff --git a/composer.json b/composer.json index 7150861..a0d3de8 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ "psr/log": "^3", "zozlak/argparse": "^1", "acdh-oeaw/arche-assets": "^3.8.1", - "acdh-oeaw/arche-lib": "^6", + "acdh-oeaw/arche-lib": "^7", "acdh-oeaw/uri-normalizer": "^3", "zozlak/logging": "^1.0" }, diff --git a/config-sample.yaml b/config-sample.yaml index dcb6fde..5ec8718 100644 --- a/config-sample.yaml +++ b/config-sample.yaml @@ -174,27 +174,12 @@ referenceSources: maxPerLang: 1 path: - https://d-nb.info/standards/elementset/gnd#preferredNameForTheCorporateBody - - property: https://vocabs.acdh.oeaw.ac.at/schema#hasAlternativeTitle - action: add - type: literal - langProcess: assure - langValue: und - path: - - https://d-nb.info/standards/elementset/gnd#variantNameForTheCorporateBody - property: https://vocabs.acdh.oeaw.ac.at/schema#hasAddress action: replace type: literal path: - https://d-nb.info/standards/elementset/gnd#placeOfBusiness - https://d-nb.info/standards/elementset/gnd#preferredNameForThePlaceOrGeographicName - - property: https://vocabs.acdh.oeaw.ac.at/schema#hasCountry - action: replace - type: literal - langProcess: assure - langValue: und - path: - - https://d-nb.info/standards/elementset/gnd#geographicAreaCode - - http://www.w3.org/2004/02/skos/core#prefLabel - property: https://vocabs.acdh.oeaw.ac.at/schema#hasUrl action: add type: literal diff --git a/tests/CrawlerTest.php b/tests/CrawlerTest.php index a7cb1aa..a018357 100644 --- a/tests/CrawlerTest.php +++ b/tests/CrawlerTest.php @@ -58,7 +58,7 @@ public function testGndPerson(): void { } public function testGndOrganisation(): void { -# $this->runTestFromData('gndOrganisation'); + $this->runTestFromData('gndOrganisation'); } public function testViaf(): void { @@ -70,7 +70,7 @@ public function testOrcid(): void { } public function testGeonames(): void { -# $this->runTestFromData('geonames'); + $this->runTestFromData('geonames'); } public function testGetty(): void { @@ -99,11 +99,11 @@ private function runTestFromData(string $testName): void { } // echo "@@@\n".\quickRdfIo\Util::serialize($mergedMeta, 'text/turtle')."\n"; // for more meaningfull failure messages let's compare differences with '' - $this->assertEquals('', RdfIoUtil::serialize($expected->copyExcept($mergedMeta), 'text/turtle')); - $this->assertEquals('', RdfIoUtil::serialize($mergedMeta->copyExcept($expected), 'text/turtle')); + $this->assertEquals('', RdfIoUtil::serialize($expected->copyExcept($mergedMeta), 'text/turtle'), 'Missing in merged metadata'); + $this->assertEquals('', RdfIoUtil::serialize($mergedMeta->copyExcept($expected), 'text/turtle'), 'Additional in merged metadata'); if (isset($expectedOld)) { - $this->assertEquals('', RdfIoUtil::serialize($expectedOld->copyExcept($oldMeta), 'text/turtle')); - $this->assertEquals('', RdfIoUtil::serialize($oldMeta->copyExcept($expectedOld), 'text/turtle')); + $this->assertEquals('', RdfIoUtil::serialize($expectedOld->copyExcept($oldMeta), 'text/turtle'), 'Missing in old metadata'); + $this->assertEquals('', RdfIoUtil::serialize($oldMeta->copyExcept($expectedOld), 'text/turtle'), 'Additional in old metadata'); } } diff --git a/tests/data/geonames.yaml b/tests/data/geonames.yaml index 107f190..6577c03 100644 --- a/tests/data/geonames.yaml +++ b/tests/data/geonames.yaml @@ -27,6 +27,10 @@ referenceSources: maxPerLang: 1 langProcess: assure langValue: und + preferredLangs: + - en-GB + - en-US + - de-DE path: - http://www.geonames.org/ontology#alternateName - property: https://vocabs.acdh.oeaw.ac.at/schema#hasLatitude diff --git a/tests/data/gndOrganisation.yaml b/tests/data/gndOrganisation.yaml index f5f421c..6df844d 100644 --- a/tests/data/gndOrganisation.yaml +++ b/tests/data/gndOrganisation.yaml @@ -18,27 +18,12 @@ referenceSources: maxPerLang: 1 path: - https://d-nb.info/standards/elementset/gnd#preferredNameForTheCorporateBody - - property: https://vocabs.acdh.oeaw.ac.at/schema#hasAlternativeTitle - action: add - type: literal - langProcess: assure - langValue: und - path: - - https://d-nb.info/standards/elementset/gnd#variantNameForTheCorporateBody - property: https://vocabs.acdh.oeaw.ac.at/schema#hasAddress action: replace type: literal path: - https://d-nb.info/standards/elementset/gnd#placeOfBusiness - https://d-nb.info/standards/elementset/gnd#preferredNameForThePlaceOrGeographicName - - property: https://vocabs.acdh.oeaw.ac.at/schema#hasCountry - action: replace - type: literal - langProcess: assure - langValue: und - path: - - https://d-nb.info/standards/elementset/gnd#geographicAreaCode - - http://www.w3.org/2004/02/skos/core#prefLabel - property: https://vocabs.acdh.oeaw.ac.at/schema#hasUrl action: add type: literal