Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(xmlupload): improve URL recognition (DEV-1557) #266

Merged
merged 3 commits into from Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions knora/dsplib/models/value.py
Expand Up @@ -638,8 +638,13 @@ def __init__(self,
ark_url: Optional[str] = None,
vark_url: Optional[str] = None):
# URI = scheme ":" ["//" host [":" port]] path ["?" query] ["#" fragment]
m = regex.match(r"(?<scheme>[a-z][a-z0-9+.\-]*):(//(?<host>[\w_.\-\[\]:~]+)(?<port>:\d{0,6})?)(?<path>/[\w%()_\-.~]*)*"
r"(?<query>\?[\w_.\-=]+)*(?<fragment>#[\w_/\-~:.]*)?", str(value), flags=regex.UNICODE)
scheme = r"(?<scheme>[a-z][a-z0-9+.\-]*)"
host = r"(?<host>[\w_.\-~:\[\]]+)"
port = r"(?<port>:\d{0,6})"
path = r"(?<path>/[\w_.\-~:%()]*)"
query = r"(?<query>\?[\w_.\-%=*&]+)"
fragment = r"(?<fragment>#[\w_.\-~:/]*)"
m = regex.match(fr"{scheme}:(//{host}{port}?){path}*{query}*{fragment}?", str(value), flags=regex.UNICODE)
if m:
self._value = str(value)
else:
Expand Down
2 changes: 1 addition & 1 deletion knora/dsplib/schemas/data.xsd
Expand Up @@ -45,7 +45,7 @@
<!-- data type for knora uri -->
<xs:simpleType name="knorauri_type">
<xs:restriction base="xs:string">
<xs:pattern value="([a-z][a-z0-9+.\-]*):(//([\w_.\-\[\]:~]+)(:\d{0,6})?)(/[\w%()_\-.~]*)*(\?[\w_.\-=]+)*(#[\w_/\-~:.]*)?"/>
<xs:pattern value="([a-z][a-z0-9+.\-]*):(//([\w_.\-~:\[\]]+)(:\d{0,6})?)(/[\w_.\-~:%()]*)*(\?[\w_.\-%=*&amp;]+)*(#[\w_.\-~:/]*)?"/>
</xs:restriction>
</xs:simpleType>

Expand Down
8 changes: 4 additions & 4 deletions knora/excel2xml.py
Expand Up @@ -16,6 +16,7 @@

from knora.dsplib.models.helpers import BaseError, DateTimeStamp
from knora.dsplib.models.propertyelement import PropertyElement
from knora.dsplib.models.value import UriValue
from knora.dsplib.utils.shared import simplify_name, check_notna, validate_xml_against_schema

xml_namespace_map = {
Expand Down Expand Up @@ -1339,10 +1340,9 @@ def make_uri_prop(

# check value type
for val in values:
# URI = scheme ":" ["//" host [":" port]] path ["?" query] ["#" fragment]
if not regex.search(
r"(?<scheme>[a-z][a-z0-9+.\-]*):(//(?<host>[\w_.\-\[\]:~]+)(?<port>:\d{0,6})?)(?<path>/[\p{L}%()_\-.~]*)*"
r"(?<query>\?[\p{L}_.\-=]+)*(?<fragment>#[\p{L}_/\-~:.]*)?", str(val.value), flags=regex.UNICODE):
try:
UriValue(str(val.value))
except BaseError:
raise BaseError(f"Failed validation in resource '{calling_resource}', property '{name}': "
Comment on lines +1345 to 1346
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like a bit of an anti-pattern: Raising an exception just to discard it again and raising the same exception again. If you moved the nicer error message to the UriValue object, you would not need to do the try or the raise here at all.

f"'{val.value}' is not a valid URI.")

Expand Down
25 changes: 23 additions & 2 deletions testdata/excel2xml-expected-output.xml
Expand Up @@ -32,10 +32,31 @@
<text permissions="prop-default" encoding="utf8">-</text>
</text-prop>
<uri-prop name=":hasIdentifier">
<uri permissions="prop-default">http://d-nb.info/gnd/11855333X</uri>
<uri permissions="prop-default">https://en.wiktionary.org/wiki/Ῥόδος</uri>
<uri permissions="prop-default">https://www.test-case.ch/</uri>
<uri permissions="prop-default">https://reg-exr.com:3000</uri>
<uri permissions="prop-default">https://reg-exr.com:3000/path/to/file_(%C3%89).htm</uri>
</uri-prop>
<uri-prop name=":hasExternalLink">
<uri permissions="prop-default">https://en.wikipedia.org/wiki/Homer</uri>
<uri permissions="prop-default">https://reg-exr.com:3000/path/to/file#fragment</uri>
<uri permissions="prop-default">https://reg-exr.com:3000/path/to/file?query=test</uri>
<uri permissions="prop-default">https://reg-exr.com:3000/path/to/file?query=test#fragment</uri>
<uri permissions="prop-default">https://reg-exr.com/path/to/file?query=test#fragment</uri>
</uri-prop>
<uri-prop name=":hasAnotherLink">
<uri permissions="prop-default">http://www.168.1.1.0/path</uri>
<uri permissions="prop-default">http://www.168.1.1.0:4200/path</uri>
<uri permissions="prop-default">http://[2001:0db8:0000:0000:0000:8a2e:0370:7334]:4200/path</uri>
<uri permissions="prop-default">https://en.wikipedia.org/wiki/Haiku#/media/File:Basho_Horohoroto.jpg</uri>
</uri-prop>
<uri-prop name=":hasThirdLink">
<uri permissions="prop-default">http://datypic.com/prod.html#shirt</uri>
<uri permissions="prop-default">https://www.findagrave.com/memorial/171722836/krikor-madenician?_gl=1*100n0s5*_ga*NzIzMDQxNjc2LjE2Mjg2MDk1OTQ.*_ga_4QT8FMEX30*MTY1Mjc5OTI4OC4xNC4xLjE2NTI4MDA2MDQuMA..</uri>
<uri permissions="prop-default">https://markarslan.org/ArmenianImmigrants/Public-ViewDetail-ArmenianImmigrants-Main.php?submit=View&amp;Staging=&amp;SourcePage=Public-ViewSummary-ArmenianImmigrants-Main-ByDestinationDate&amp;SelectDestinationYear=1907&amp;SelectLastNameStd=all&amp;argument1=PLIN-29NOV1907-3-73-0018</uri>
<uri permissions="prop-default">http://markarslan.org/ArmenianImmigrants/Public-ViewDetail-ArmenianImmigrants-Main.php?submit=View&amp;Staging=&amp;SourcePage=Public-ViewSummary-ArmenianImmigrants-Main-ByDestinationDate&amp;SelectDestinationYear=1907&amp;SelectLastNameStd=all&amp;argument1=CRTH-12JAN1907-3-%404-0016</uri>
</uri-prop>
<uri-prop name=":hasFourthLink">
<uri permissions="prop-default">https://www.ancestry.com/discoveryui-content/view/47577828:60525?ssrc=pt&amp;tid=109007397&amp;pid=410070328478</uri>
</uri-prop>
</resource>
<annotation label="Annotation to Homer" id="annotation_0" permissions="res-default">
Expand Down
7 changes: 5 additions & 2 deletions testdata/excel2xml-testdata.csv
@@ -1,8 +1,11 @@
id,restype,label,ark,iri,created,permissions,file,file permissions,prop name,prop type,prop list,1_value,1_encoding,1_permissions,1_comment,2_value,2_encoding,2_permissions,2_comment,3_value,3_encoding,3_permissions,3_comment,4_value,4_encoding,4_permissions,4_comment, ,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
person_0,:Person,Homer,,,1999-12-31T23:59:59.9999999+01:00,res-default,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,:hasExternalLink,uri-prop,,https://en.wikipedia.org/wiki/Homer,,prop-default,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,:hasIdentifier,uri-prop,,https://en.wiktionary.org/wiki/Ῥόδος,,prop-default,,https://www.test-case.ch/,,prop-default,,https://reg-exr.com:3000,,prop-default,,https://reg-exr.com:3000/path/to/file_(%C3%89).htm,,prop-default,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,:hasExternalLink,uri-prop,,https://reg-exr.com:3000/path/to/file#fragment,,prop-default,,https://reg-exr.com:3000/path/to/file?query=test,,prop-default,,https://reg-exr.com:3000/path/to/file?query=test#fragment,,prop-default,,https://reg-exr.com/path/to/file?query=test#fragment,,prop-default,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,:hasAnotherLink,uri-prop,,http://www.168.1.1.0/path,,prop-default,,http://www.168.1.1.0:4200/path,,prop-default,,http://[2001:0db8:0000:0000:0000:8a2e:0370:7334]:4200/path,,prop-default,,https://en.wikipedia.org/wiki/Haiku#/media/File:Basho_Horohoroto.jpg,,prop-default,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,:hasThirdLink,uri-prop,,http://datypic.com/prod.html#shirt,,prop-default,,https://www.findagrave.com/memorial/171722836/krikor-madenician?_gl=1*100n0s5*_ga*NzIzMDQxNjc2LjE2Mjg2MDk1OTQ.*_ga_4QT8FMEX30*MTY1Mjc5OTI4OC4xNC4xLjE2NTI4MDA2MDQuMA..,,prop-default,,https://markarslan.org/ArmenianImmigrants/Public-ViewDetail-ArmenianImmigrants-Main.php?submit=View&Staging=&SourcePage=Public-ViewSummary-ArmenianImmigrants-Main-ByDestinationDate&SelectDestinationYear=1907&SelectLastNameStd=all&argument1=PLIN-29NOV1907-3-73-0018,,prop-default,,http://markarslan.org/ArmenianImmigrants/Public-ViewDetail-ArmenianImmigrants-Main.php?submit=View&Staging=&SourcePage=Public-ViewSummary-ArmenianImmigrants-Main-ByDestinationDate&SelectDestinationYear=1907&SelectLastNameStd=all&argument1=CRTH-12JAN1907-3-%404-0016,,prop-default,,,,,,,,,,,,,,,,,,,,,,,,,,,,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,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Expand Down
Binary file modified testdata/excel2xml-testdata.xls
Binary file not shown.
Binary file modified testdata/excel2xml-testdata.xlsx
Binary file not shown.
6 changes: 5 additions & 1 deletion testdata/test-data-systematic.xml
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.1' encoding='utf-8'?>

<knora xmlns="https://dasch.swiss/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down Expand Up @@ -207,6 +207,10 @@
<uri permissions="prop-restricted">http://[2001:0db8:0000:0000:0000:8a2e:0370:7334]:4200/path</uri>
<uri permissions="prop-restricted">https://en.wikipedia.org/wiki/Haiku#/media/File:Basho_Horohoroto.jpg</uri>
<uri permissions="prop-restricted">http://datypic.com/prod.html#shirt</uri>
<uri permissions="prop-restricted">https://www.findagrave.com/memorial/171722836/krikor-madenician?_gl=1*100n0s5*_ga*NzIzMDQxNjc2LjE2Mjg2MDk1OTQ.*_ga_4QT8FMEX30*MTY1Mjc5OTI4OC4xNC4xLjE2NTI4MDA2MDQuMA..</uri>
<uri permissions="prop-restricted">https://markarslan.org/ArmenianImmigrants/Public-ViewDetail-ArmenianImmigrants-Main.php?submit=View&amp;Staging=&amp;SourcePage=Public-ViewSummary-ArmenianImmigrants-Main-ByDestinationDate&amp;SelectDestinationYear=1907&amp;SelectLastNameStd=all&amp;argument1=PLIN-29NOV1907-3-73-0018</uri>
<uri permissions="prop-restricted">http://markarslan.org/ArmenianImmigrants/Public-ViewDetail-ArmenianImmigrants-Main.php?submit=View&amp;Staging=&amp;SourcePage=Public-ViewSummary-ArmenianImmigrants-Main-ByDestinationDate&amp;SelectDestinationYear=1907&amp;SelectLastNameStd=all&amp;argument1=CRTH-12JAN1907-3-%404-0016</uri>
<uri permissions="prop-restricted">https://www.ancestry.com/discoveryui-content/view/47577828:60525?ssrc=pt&amp;tid=109007397&amp;pid=410070328478</uri>
</uri-prop>
<date-prop name=":hasDate">
<date>JULIAN:BCE:0700:BCE:0600</date>
Expand Down