Property talk:P1921
Documentation
formatter URL for RDF resource: URI template from which "$1" can be automatically replaced with the effective property value on items (it is the URI of the resources, not the URI of the RDF file describing it)
List of violations of this constraint: Database reports/Constraint violations/P1921#Type Q19847637, Q6545185, SPARQL
https?://[\wè\d\-\.,/\?=&:_%+#~;!|\[\]\*]*\$1[\w\d\-\.,/\?=&:_%+#~;!|\[\]()]*
”: value must be formatted using this pattern (PCRE syntax). (Help)List of violations of this constraint: Database reports/Constraint violations/P1921#Format, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P1921#Single value, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P1921#Item P1630, search, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P1921#Entity types
List of violations of this constraint: Database reports/Constraint violations/P1921#allowed qualifiers
This property is being used by: Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.) |
This entity (P1921) is used by Wikimedia's setting of Wikidata. Please contact the development team or file a bug on Phabricator before big changes (renaming, deletion, merging, etc.). |
|
Generate a skos:ExactMatch based on this property? edit
@Lydia Pintscher (WMDE), Lucas Werkmeister, Smalyshev (WMF), Denny, Markus Krötzsch, Andrawaag: I've been talking with most of you in person about how to have more generic triples in our RDF to link to the same concept in another dataset. Let's take Nationale Thesaurus voor Auteursnamen ID (P1006) as an example. Josephus (Q134461) has 069071632 on it and using this property (formatter URI for RDF resource (P1921)) an URI gets created in the rdf like <wdtn:P1006 rdf:resource="http://data.bibliotheken.nl/id/thes/p069071632"/>. I would also like to have a more generic triple with this uri. owl:sameAs is probably wrong, but skos:ExactMatch seems to be correct. This makes it much easier to do federated queries. Can the people who are more into the semantic web give feedback if this is the right approach? Multichill (talk) 11:05, 18 May 2018 (UTC)
- As an addon to the discussion. Currently, there is exact match (P2888), which was proposed as the Wikidata property for skos:exactMatch. --Andrawaag (talk) 11:08, 18 May 2018 (UTC)
- Personally, I think that sounds right. I would even go for owl:sameAs, to be honest. --Denny (talk) 16:17, 18 May 2018 (UTC)
- @Multichill: I agree with the idea of adding direct link, but not sure if it should be a generic rule (if you have formatter URI for RDF resource (P1921), it's skos:ExactMatch) or it should be some flag/property on the property that says to do it (maybe then we can decide when skos:ExactMatch is the best one and when owl:sameAs and when something else, by making the exact predicate the value of the property?). Would like some more input from semantic web tools users as to which option is preferable (and any other comments of course). Smalyshev (WMF) (talk) 23:19, 29 May 2018 (UTC)
- @Smalyshev (WMF): I let this sink in a bit and I think it's probably better to just create a new property "formatter URI for skos:ExactMatch RDF resource" to prevent any problems in the future. You could just generate the skos:ExactMatch link based on that and no need to worry about difficult checks to do. And yes, would like to get more semantic web people input. Multichill (talk) 10:20, 30 May 2018 (UTC)
- Instead of having an other "formatter URI for skos:ExactMatch RDF resource" that would, I believe, always contain the same value as formatter URI for RDF resource (P1921), I would maybe add something like instance of (P31) "exact match property" (respectively "sameAs property") to the properties that should be emitted with skos:exactMatch (respectively owl:sameAs). We could maybe go even one step further and use equivalent property (P1628) and external superproperty (P2235) to get the property to emit in the RDF output. Tpt (talk) 11:32, 30 May 2018 (UTC)
- @Tpt: Using properties to generate things instead if items feels more consitent. I encountered Iconclass notation (P1256) and depicts Iconclass notation (P1257). Let's assume Iconclass starts offering RDF (not very far fetched), I would use formatter URI for RDF resource (P1921) on both properties, but would only like to generate the skos:ExactMatch on Iconclass notation (P1256). How would you solve that? Multichill (talk) 11:55, 14 June 2018 (UTC)
- @Multichill: We could maybe just not create new properties and items and use external superproperty (P2235). For Iconclass notation (P1256) it would mean to just add Iconclass notation (P1256)external superproperty (P2235)http://www.w3.org/2004/02/skos/core#exactMatch. Tpt (talk) 12:01, 14 June 2018 (UTC)
- @Tpt: Now we're talking! So we just need to instruct the software that if external superproperty (P2235) is used, it should construct a new triple with the <wikibase item> <value of P2235> <rdf link constructed based on P1921>. I like this much more because it keeps the discussion of the skos:ExactMatch or something else out of the software and makes it much more flexible to introduce other external properties. @Smalyshev (WMF), Andrawaag: what do you think? Multichill (talk) 12:05, 14 June 2018 (UTC)
- @Multichill: We could maybe just not create new properties and items and use external superproperty (P2235). For Iconclass notation (P1256) it would mean to just add Iconclass notation (P1256)external superproperty (P2235)http://www.w3.org/2004/02/skos/core#exactMatch. Tpt (talk) 12:01, 14 June 2018 (UTC)
- @Tpt: Using properties to generate things instead if items feels more consitent. I encountered Iconclass notation (P1256) and depicts Iconclass notation (P1257). Let's assume Iconclass starts offering RDF (not very far fetched), I would use formatter URI for RDF resource (P1921) on both properties, but would only like to generate the skos:ExactMatch on Iconclass notation (P1256). How would you solve that? Multichill (talk) 11:55, 14 June 2018 (UTC)
- Instead of having an other "formatter URI for skos:ExactMatch RDF resource" that would, I believe, always contain the same value as formatter URI for RDF resource (P1921), I would maybe add something like instance of (P31) "exact match property" (respectively "sameAs property") to the properties that should be emitted with skos:exactMatch (respectively owl:sameAs). We could maybe go even one step further and use equivalent property (P1628) and external superproperty (P2235) to get the property to emit in the RDF output. Tpt (talk) 11:32, 30 May 2018 (UTC)
- @Smalyshev (WMF): I let this sink in a bit and I think it's probably better to just create a new property "formatter URI for skos:ExactMatch RDF resource" to prevent any problems in the future. You could just generate the skos:ExactMatch link based on that and no need to worry about difficult checks to do. And yes, would like to get more semantic web people input. Multichill (talk) 10:20, 30 May 2018 (UTC)
Incorrect URI's edit
After this conversation I was wondering what URI's are currently incorrect. Let's take Wikidata as an example. Douglas Adams (Q42) has a concept URI as http://www.wikidata.org/entity/Q42 , not https://www.wikidata.org/entity/Q42 (look in the rdf to confirm that). That's the URI that third-party sites should use in their RDF to link here. Other way around holds too. For this item:
- The VIAF ID (P214) URI is http://viaf.org/viaf/179734837 (https://viaf.org/viaf/113230702/rdf.xml RDF)
- The Nationale Thesaurus voor Auteursnamen ID (P1006) URI is http://data.bibliotheken.nl/id/thes/p068744307 (http://data.bibliotheken.nl/doc/thes/p068744307.rdf RDF)
(etc.)
It's not always http, for example if you look at ORCID iD (P496), it's consistently https. Why is this important? The URI is the way to connected different data sets. Inconsistencies will show up when doing federated queries. I already corrected a couple and these should be checked and maybe switched from https to http for the formatter URI:
SELECT ?property ?formatter WHERE {
?property wdt:P1921 ?formatter .
FILTER REGEX(?formatter, "https") .
# Add the properties here where the URI really starts with https
VALUES (?exceptprop) {
(wd:P496) # ORCID is explicit https (
}
FILTER (?property!=?exceptprop) .
} ORDER BY ?formatter
LIMIT 100
Could later be added as a complex constraint violation on this property. Multichill (talk) 13:37, 8 September 2018 (UTC)
Proposal: change references to URI to URL edit
This property only allows URLs as values, but the label says URI. Can we fix it so that the label and other data reflects the constraints?
WikiProject Properties has more than 50 participants and couldn't be pinged. Please post on the WikiProject's talk page instead.
Notified participants of WikiProject Authority control
Iwan.Aucamp (talk) 22:07, 17 June 2020 (UTC)
Discussion edit
- Comment: Discuss here ... Iwan.Aucamp (talk) 22:07, 17 June 2020 (UTC)
- Oppose There are examples where the URI is not a URL, for instance ISBN-13 (P212). Rather than changing the label, I'd loosen the constraint. Toni 001 (talk) 14:41, 30 June 2020 (UTC)
Only 1 URI edit
@Vladimir Alexiev: I undid your edits [1] & [2]. Only one URI should exist for an object. Say for example for human (Q5) the URI is http://www.wikidata.org/entity/Q5. We also have https://www.wikidata.org/entity/Q5.json , http://www.wikidata.org/entity/Q5.rdf etc. Those are not URI's. Also this property is used to expand the wdtn namespace. See for example on https://www.wikidata.org/wiki/Special:EntityData/Q1786107.rdf , here you'll find <wdtn:P8645 rdf:resource="http://energy.referencedata.eu/EIC/11W0-0000-0038-O"/>. Your edits would break this. Multichill (talk) 13:54, 7 August 2023 (UTC)
- Ok, so when a dataset offers several formats, how do you propose to capture that?
- The prop is called "URI for RDF resource" and when there are several RDF formats for a semantic entity, do we just ignore this?
- We can designate one as preferred, then hopefully the "wdtn" code won't break -- Vladimir Alexiev (talk) 09:01, 10 August 2023 (UTC)
- In Energy Identification Code (P8645), I added "format=RDF/XML" for the one formatter that you left.
- But for this particular resource, I think I should make the formatter end in ".rdf" because looking at the responses, these are not proper semantic redirects, and don't support content negotiation:
- $ curl -L http://energy.referencedata.eu/EIC/11W0-0000-0038-O
- <html>
- <head>
- <link rel="alternate" type="application/rdf+xml" href="../11W0-0000-0038-O.rdf" title="RDF/XML" />
- <link rel="alternate" type="application/ld+json" href="../11W0-0000-0038-O.jsonld" title="JSON-LD" />
- <link rel="alternate" type="text/turtle" href="../11W0-0000-0038-O.ttl" title="Turtle" />
- </head>
- <body>
- <meta http-equiv = "refresh" content = "0; url = ../11W0-0000-0038-O.rdf" />
- </body>
- </html>
- $ curl -LI -Haccept:application:rdf+xml http://energy.referencedata.eu/EIC/11W0-0000-0038-O
- ...
- Content-Type: text/html; charset=utf-8 # same as above
- # to get the RDF, you need to use a .rdf URL:
- $ curl -LI http://energy.referencedata.eu/EIC/11W0-0000-0038-O.rdf
- HTTP/1.1 200 OK
- Content-Length: 1395
- Content-Type: application/rdf+xml
- Curl cannot enact http-equiv=refresh, see https://everything.curl.dev/http/redirects#non-http-redirects.
- So to get an RDF resource in an easy way (without using eg a headless browser), one should use an URL with file extension.
- (Note: I posted a bug to the site providers: https://github.com/Haigutus/Energy-Reference-Data/issues/54)
- Please tell me how your enforcing of "single value" can cope with these problems:
- http://energy.referencedata.eu/EIC/11W0-0000-0038-O is the semantic URL of this entity, but you cannot get RDF out of it. So, should I set the formatter to http://energy.referencedata.eu/EIC/11W0-0000-0038-O.rdf ?
- If I prefer another format (JSON-LD and Turtle are much better than RDF/XML), how can I figure out the URL from Wikidata?
- -- Vladimir Alexiev (talk) 09:18, 10 August 2023 (UTC)
- This property is for the unique Uniform Resource Identifier (Q61694). That URI is the same in all representations (http://www.wikidata.org/entity/Q5 in my earlier example).
- What you're looking for is formatter URL (P1630), examples: https://w.wiki/7Dzo . Multichill (talk) 09:24, 10 August 2023 (UTC)
- ok, I see in the description of formatter URI for RDF resource (P1921) (it is the URI of the resources, not the URI of the RDF file describing it)".
- I'll change up Vladimir Alexiev (talk) 09:58, 10 August 2023 (UTC)
- I've changed to use "formatter URL", see https://www.wikidata.org/wiki/Property:P8645#P1630.
- But now get constraint violation
- "This property should contain a single “best” value. Of the current multiple values, one should be marked with “preferred” rank.
- If there are multiple values for URL formatter without preferred one, Wikibase software is unable to reliably determine default formatter for UI".
- So should I add "separator" qualifier to that "single value" constraint, and yet set the HTML formatter to "preferred"? -- Vladimir Alexiev (talk) 10:03, 10 August 2023 (UTC)
- Please tell me how your enforcing of "single value" can cope with these problems:
Deprecation of the distinct values constraint edit
Just recording that I've deprecated the constraint as some properties may share it (e.g. see Mondo ID (P5270) and Cell Ontology ID (P7963)). If that affects anyone negatively, we can revert it back. Cheers, TiagoLubiana (talk) 17:19, 7 November 2023 (UTC)