-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #301 from Health-RI/add-dct-identifier-to-publisher
Add dct identifier to publisher
- Loading branch information
Showing
15 changed files
with
122 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -647,6 +647,7 @@ def test_publisher_foaf(self): | |
<foaf:mbox>[email protected]</foaf:mbox> | ||
<foaf:homepage>http://some.org</foaf:homepage> | ||
<dct:type rdf:resource="http://purl.org/adms/publishertype/NonProfitOrganisation"/> | ||
<dct:identifier rdf:resource="https://ror.org/05wg1m734"/> | ||
</foaf:Organization> | ||
</dct:publisher> | ||
</rdfs:SomeClass> | ||
|
@@ -666,6 +667,7 @@ def test_publisher_foaf(self): | |
assert publisher['email'] == '[email protected]' | ||
assert publisher['url'] == 'http://some.org' | ||
assert publisher['type'] == 'http://purl.org/adms/publishertype/NonProfitOrganisation' | ||
assert publisher['identifier'] == 'https://ror.org/05wg1m734' | ||
|
||
def test_publisher_ref(self): | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,7 @@ def _get_extra_value_as_list(key): | |
assert _get_extra_value('publisher_email') == '[email protected]' | ||
assert _get_extra_value('publisher_url') == 'http://some.org' | ||
assert _get_extra_value('publisher_type') == 'http://purl.org/adms/publishertype/NonProfitOrganisation' | ||
assert _get_extra_value('publisher_identifier') == 'https://ror.org/05wg1m734' | ||
assert _get_extra_value('contact_name') == 'Point of Contact' | ||
# mailto gets removed for storage and is added again on output | ||
assert _get_extra_value('contact_email') == '[email protected]' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,7 @@ def test_e2e_ckan_to_dcat(self): | |
"email": "[email protected]", | ||
"url": "https://example.org", | ||
"type": "public_body", | ||
"identifier": "http://example.org/publisher-id", | ||
}, | ||
], | ||
"temporal_coverage": [ | ||
|
@@ -301,6 +302,12 @@ def test_e2e_ckan_to_dcat(self): | |
DCT.type, | ||
dataset_dict["publisher"][0]["type"], | ||
) | ||
assert self._triple( | ||
g, | ||
publisher[0][2], | ||
DCT.identifier, | ||
URIRef(dataset_dict["publisher"][0]["identifier"]) | ||
) | ||
|
||
temporal = [t for t in g.triples((dataset_ref, DCT.temporal, None))] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,7 @@ def test_publisher_extras(self): | |
{'key': 'publisher_email', 'value': '[email protected]'}, | ||
{'key': 'publisher_url', 'value': 'http://example.com/publisher/home'}, | ||
{'key': 'publisher_type', 'value': 'http://purl.org/adms/publishertype/Company'}, | ||
{'key': 'publisher_identifier', 'value': 'https://ror.org/05wg1m734'}, | ||
] | ||
|
||
|
||
|
@@ -121,6 +122,7 @@ def test_publisher_extras(self): | |
assert str(publisher) == extras['publisher_uri'] | ||
assert self._triple(g, publisher, RDF.type, SCHEMA.Organization) | ||
assert self._triple(g, publisher, SCHEMA.name, extras['publisher_name']) | ||
assert self._triple(g, publisher, SCHEMA.identifier, extras['publisher_identifier']) | ||
|
||
contact_point = self._triple(g, publisher, SCHEMA.contactPoint, None)[2] | ||
assert contact_point | ||
|
@@ -144,6 +146,7 @@ def test_publisher_no_uri(self): | |
{'key': 'publisher_email', 'value': '[email protected]'}, | ||
{'key': 'publisher_url', 'value': 'http://example.com/publisher/home'}, | ||
{'key': 'publisher_type', 'value': 'http://purl.org/adms/publishertype/Company'}, | ||
{'key': 'publisher_identifier', 'value': 'https://ror.org/05wg1m734'}, | ||
] | ||
} | ||
extras = self._extras(dataset) | ||
|
@@ -158,6 +161,7 @@ def test_publisher_no_uri(self): | |
assert isinstance(publisher, BNode) | ||
assert self._triple(g, publisher, RDF.type, SCHEMA.Organization) | ||
assert self._triple(g, publisher, SCHEMA.name, extras['publisher_name']) | ||
assert self._triple(g, publisher, SCHEMA.identifier, extras['publisher_identifier']) | ||
|
||
contact_point = self._triple(g, publisher, SCHEMA.contactPoint, None)[2] | ||
assert contact_point | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.