Property talk:P1630

From Wikidata
Jump to: navigation, search

Documentation

formatter URL
Web page URL; URI template from which "$1" can be automatically replaced with the effective property value on items
Description a URL-like string, such as "http://viaf.org/viaf/$1/", from which "$1" can be automatically replaced with the effective property value on items. For errors in proposals, see Category:Invalid formatter URL.
Data type String
Domain
According to statements in the property:
Wikidata property for a unique identifier (Q19847637), Wikidata property for authority control (Q18614948) and unique identifier (Q6545185)
When possible, data should only be stored as statements
Allowed values (https?:\/\/|steam:\/\/|info|urn|skype|tel)[\wè\d\-\.,\/\?=&:_%+#~;!А-яåЁё()@|\[\]\*{}]*\$1[\w\d\-\.,\/\?=&:_%+#~;!А-яåЁё()@|\[\](){}]*
Usage notes use in statements on properties
Example VIAF ID (P214)https://viaf.org/viaf/$1
Format and edit filter validation Abuse filter #73
Robot and gadget jobs AuthorityControl.js could use this property, instead of internal settings, to format a property value on items' pages
Tracking: differences no label (Q22162660)
See also third-party formatter URL (P3303), URI used in RDF (P1921)
Lists
Proposal discussion Property proposal/Archive/27#P1630
Current uses 1,803
[create] Create a translatable help page (preferably in English) for this property to be included here
Type “Wikidata property for a unique identifier (Q19847637), Wikidata property for authority control (Q18614948), unique identifier (Q6545185): element must contain property “instance of (P31)” with classes “Wikidata property for a unique identifier (Q19847637), Wikidata property for authority control (Q18614948), unique identifier (Q6545185)” or their subclasses (defined using subclass of (P279)).
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1630#Type Q19847637, Q18614948, Q6545185, SPARQL
Format “(https?:\/\/|steam:\/\/|info|urn|skype|tel)[\wè\d\-\.,\/\?=&:_%+#~;!А-яåЁё()@|\[\]\*{}]*\$1[\w\d\-\.,\/\?=&:_%+#~;!А-яåЁё()@|\[\](){}]*”: value must be formatted using this pattern (PCRE syntax).
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1630#Format, SPARQL
Distinct values: this property likely contains a value that is different from all other items.
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1630#distinct values, SPARQL (every item), SPARQL (by value)
Single value: this property generally contains a single value.
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1630#single value, SPARQL
Item “format as a regular expression (P1793): Items with this property should also have “format as a regular expression (P1793)”.
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1630#Item P1793, SPARQL
Conflicts with “instance of (P31): Wikidata property with datatype string that is not an external identifier (Q21099935): this property must not be used with listed properties and values.
Exceptions are possible as rare values may exist.
List of this constraint violations: Database reports/Constraint violations/P1630#Conflicts with P31, SPARQL

// protocol[edit]

Please do not use URLs like "//www.freebase.com". Use "https://www.freebase.com" instead. "//" is Wikimedia`s invention as I know. But this property will be used by external users too. This strange construction will confuse these users. Wikidata usage must not be thorny path. — Ivan A. Krestinin (talk) 21:09, 25 December 2014 (UTC)

Protocol relative URLs (//) are not a Wikimedia invention. They are defined in RFC 3986. --Fomafix (talk) 21:54, 25 December 2014 (UTC)
@Fomafix: Interesting standard, but a bit cryptic: it states "If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character. If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//"). In addition, a URI reference (Section 4.1) may be a relative-path reference, in which case the first path segment cannot contain a colon (":") character." This does not suggests that relative paths may begin with two slashes; other sections about relative references (section 5.1) also do not show a path starting with two slashes either. Can you quote a piece of that text clarifying such syntax? -- LaddΩ chat ;) 22:50, 25 December 2014 (UTC)
Section 4.2:
relative-ref  = relative-part [ "?" query ] [ "#" fragment ]
relative-part = "//" authority path-abempty
--Fomafix (talk) 07:40, 26 December 2014 (UTC)
@Ivan A. Krestinin: Why should protocol relative URLs not used? They are well standardized and supported. --Fomafix (talk) 22:42, 29 December 2014 (UTC)
You are right, this syntax is standardized. Some difficult cases: for example I have pages:
file://my_server/my_page.html
ftp://my_server/my_page.html

Links like '//www.freebase.com' will resolved to 'file://www.freebase.com' and 'ftp://www.freebase.com'. — Ivan A. Krestinin (talk) 06:45, 2 January 2015 (UTC)

Wikidata is only accessible via HTTP and HTTPs. Protocol relative links only reference these two protocols. Where do you see this problem? --Fomafix (talk) 10:28, 2 January 2015 (UTC)
Wikidata is open project. Data can be accessible using any protocol via third-party data clients. — Ivan A. Krestinin (talk) 10:35, 2 January 2015 (UTC)
Is this a real problem or a theoretical problem? The values from P1630 are not usable directly. They have to converted with the value of the wanted property. This convertation can also add the wanted protocol HTTP or HTTPS. --Fomafix (talk) 11:34, 2 January 2015 (UTC)
I meet this issue for locally saved reports of my bot. Conversation can be included to processing algorithms. But it must be included to the most algorithms. E. g. increasing data model complexity causes growing processing algorithms complexity. I think data model must be as simple as it possible. This makes data usage more simple. More simple usage — more clients count. — Ivan A. Krestinin (talk) 16:38, 2 January 2015 (UTC)
Protocol relative links are simpler than handling two separate links for HTTP and HTTPS. --Fomafix (talk) 17:20, 2 January 2015 (UTC)
Is there some applications that needs HTTP link? — Ivan A. Krestinin (talk) 17:24, 2 January 2015 (UTC)
If somebody cannot use HTTPS because of firewalls then keeping the current protocol improves the accessibility. --Fomafix (talk) 17:28, 2 January 2015 (UTC)
HTTPS is used by too many Internet resources. HTTPS blocking was possible some years ago. But not now as I think. — Ivan A. Krestinin (talk) 17:42, 2 January 2015 (UTC)

Handling of qualifiers[edit]

I noticed that the properties examples given for P1900 do not show proper URL formatting and thus played around with it in the sandbox, which suggests that the formatting works fine for statements but not qualifiers. Don't know how to fix that. --Daniel Mietchen (talk) 12:00, 14 July 2015 (UTC)

$[edit]

The current format pattern doesn't allow to have $ besides $1. Is there a reason for this? And what should we do with the formatter URL's on ZVG number (P679) and HSDB ID (P2062) which have $ in the URL. --Pasleim (talk) 11:54, 28 September 2015 (UTC)

I added them to the exceptions for now. --- Jura 12:06, 3 October 2015 (UTC)
(Hijacking an old thread) Eventually one probably have to reimplement the functionality in the lines of RFC 6570 - URI Template]. -- Gymel (talk) 10:54, 2 April 2016 (UTC)

https or http[edit]

There is some discussion at Property talk:P214 about whether to use http (suggested by some users) or https (preferred by WMF). --- Jura 09:52, 13 December 2015 (UTC)


Qualifier used by (P1535) = AuthorityControl gadget (Q22348290)[edit]

For formatter URL that have special code in MediaWiki:Gadget-AuthorityControl.js, I added the above to the statements.
--- Jura 10:56, 1 February 2016 (UTC)