SynBioDex / SBOL-specification

The Synthetic Biology Open Language (SBOL)
http://sbolstandard.org
13 stars 9 forks source link

URI (and namespace) equality #476

Closed jakebeal closed 1 year ago

jakebeal commented 2 years ago

I ran into problems with namespace URIs in #SynBioDex/pySBOL3/issues/343 , because I was comparing them with string equality rather than URI equality.

To help keep other people from running into this problem, I would propose adding the following clarifying text to the specification in Section 5.1:

Because identities are URIs, both URIs and URI prefixes MUST be compared under the rules for URI equality. This means, for example, that namespaces https://synbiohub.org/, https://synbiohub.org, and https://synbiohub.org:443/ are all equal.

jakebeal commented 1 year ago

Closed by #481

cjmyers commented 1 year ago

This is not true, need to revert the change to the spec

goksel commented 1 year ago

Java treats the following URLs differently, and the prints false both comparisons. URI a=URI.create("http://abc.org"); URI b=URI.create("http://abc.org/"); URI c=URI.create("http://abc.org:443");

    System.out.print(a.equals(b));
    System.out.print(a.equals(c));
cjmyers commented 1 year ago

Namespace should not end with a delimiter.

cjmyers commented 1 year ago

Need to revert #481