ckan / ckanext-dcat

CKAN ♥ DCAT
163 stars 142 forks source link

Assign URIRef or Literal types based on content #140

Closed seitenbau-govdata closed 5 years ago

seitenbau-govdata commented 5 years ago

This introduces a factory class which uses the node type URIRef if the value seems to be an HTTP(S) URL, which is more accurate in that case. Otherwise, Literal is used.

@amercader proposed an UriRefOrLiteral in https://github.com/GovDataOfficial/ckanext-dcatde/issues/6, because we have changed some fields from Literal to UriRef in our extension.

These fields were changed from Literal to UriRefOrLiteral.

seitenbau-govdata commented 5 years ago

@amercader and @metaodi Please let me know your thoughts about the pull request. Do you have some feedback or merge this?

amercader commented 5 years ago

I think this is a great addition and the extra serialization check gives us an extra safety net. Thanks @seitenbau-govdata for the patch and @metaodi for the feedback

amercader commented 5 years ago

BTW 2.7 failures should now be fixed on master