Property talk:P1921

Latest comment: 4 months ago by TiagoLubiana in topic Deprecation of the distinct values constraint

Documentation

formatter URI for RDF resource
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)
RepresentsResource Description Framework (Q54872), Uniform Resource Identifier (Q61694)
Data typeString
Domain
According to statements in the property:
Wikidata property for an identifier (Q19847637) or unique identifier (Q6545185)
When possible, data should only be stored as statements
Allowed valueshttps?://[\wè\d\-\.,/\?=&:_%+#~;!|\[\]\*]*\$1[\w\d\-\.,/\?=&:_%+#~;!|\[\]()]*
ExampleIdRef ID (P269) → http://www.idref.fr/$1/id
Wikidata property (P1687) → http://www.wikidata.org/entity/$1
See alsoURN formatter (P7470), SPARQL endpoint URL (P5305), formatter URL (P1630)
ListsWikidata:Database reports/RDF formatters
Proposal discussionProposal discussion
Current uses
Total356
Main statement35399.2% of uses
Qualifier30.8% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Format “https?://[\wè\d\-\.,/\?=&:_%+#~;!|\[\]\*]*\$1[\w\d\-\.,/\?=&:_%+#~;!|\[\]()]*: value must be formatted using this pattern (PCRE syntax). (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P1921#Format, SPARQL
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P1921#Single value, SPARQL
Item “formatter URL (P1630): Items with this property should also have “formatter URL (P1630)”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P1921#Item P1630, search, SPARQL
Scope is as main value (Q54828448): the property must be used by specified way only (Help)
List of violations of this constraint: Database reports/Constraint violations/P1921#Scope, hourly updated report, SPARQL
Allowed entity types are Wikibase property (Q29934218), Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P1921#Entity types
Without qualifiers: this property should be used without any qualifiers. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
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.)

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)Reply

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)Reply
Personally, I think that sounds right. I would even go for owl:sameAs, to be honest. --Denny (talk) 16:17, 18 May 2018 (UTC)Reply
@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)Reply
@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)Reply
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)Reply
@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)Reply
@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)Reply
@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)Reply

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:

(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
Try it!

Could later be added as a complex constraint violation on this property. Multichill (talk) 13:37, 8 September 2018 (UTC)Reply

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.

Vladimir Alexiev (talk) 11:59, 13 March 2017 (UTC) Jonathan Groß (talk) 17:52, 26 March 2017 (UTC) Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits Jneubert (talk) 13:47, 29 April 2017 (UTC) Sic19 (talk) 20:42, 12 July 2017 (UTC) Wikidelo (talk) 21:15, 8 May 2018 (UTC) ArthurPSmith (talk) 19:52, 22 August 2018 (UTC) PKM (talk) 19:40, 23 August 2018 (UTC) Ettorerizza (talk) 06:44, 8 October 2018 (UTC) Fuzheado (talk) 03:47, 19 December 2018 (UTC) Daniel Mietchen (talk) 16:30, 7 April 2019 (UTC) Iwan.Aucamp (talk) 21:48, 3 October 2019 (UTC) Epìdosis (talk) 23:49, 22 November 2019 (UTC) Sotho Tal Ker (talk) 00:52, 1 May 2020 (UTC) Bargioni (talk) 09:48, 02 May 2020 (UTC) Carlobia (talk) 14:34, 11 May 2020 (UTC) Pablo Busatto (talk) 03:22, 23 June 2020 (UTC) Matlin (talk) 10:53, 6 July 2020 (UTC) Msuicat (talk) 21:57, 27 August 2020 (UTC) Uomovariabile (talk) 10:04, 27 October 2020 (UTC) Silva Selva (talk) 17:21, 30 November 2020 (UTC) 1-Byte (talk) 15:52, 14 December 2020 (UTC) Alessandra.Moi (talk) 17:26, 16 February 2021 (UTC) CamelCaseNick (talk) 21:20, 20 February 2021 (UTC) Songceci (talk) 18:45, 24 February 2021 (UTC)]] moz (talk) 10:48, 8 March 2021 (UTC) AhavaCohen (talk) 14:41, 11 March 2021 (UTC) Kolja21 (talk) 17:37, 13 March 2021 (UTC) RShigapov (talk) 14:34, 19 September 2021 (UTC) Jason.nlw (talk) 15:15, 30 September 2021 (UTC) MasterRus21thCentury (talk) 20:22, 18 October 2021 (UTC) Newt713 (talk) 08:42, 13 March 2022 (UTC) Pierre Tribhou (talk) 08:00, 20 March 2022 (UTC) Powerek38 (talk) 17:21, 14 April 2022 (UTC) Ahatd (talk) 08:34, 4 August 2022 (UTC) JordanTimothyJames (talk) 00:54, 31 August 2022 (UTC) --Silviafanti (talk) 17:07, 14 September 2022 (UTC) Back ache (talk) 02:03, 1 November 2022 (UTC) AfricanLibrarian (talk) M.roszkowski (talk) 10:44, 4 January 2023 (UTC) Rhagfyr (talk) 19:36, 9 January 2023 (UTC) — Haseeb (talk) 13:10, 4 August 2023 (UTC) 13:26, 15 November 2023 (UTC)Reply

  Notified participants of WikiProject Authority control

Iwan.Aucamp (talk) 22:07, 17 June 2020 (UTC)Reply

Discussion edit

  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)Reply

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)Reply

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)Reply
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:
-- Vladimir Alexiev (talk) 09:18, 10 August 2023 (UTC)Reply
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)Reply
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)Reply
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)Reply

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)Reply

Return to "P1921" page.