Property talk:P2307
Documentation
qualifier used with the Commons link property constraint (Q21510852) to specify acceptable Wikimedia Commons namespaces that a property value can link to
Data type | String | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Domain | Wikidata property to link to Commons (Q18610173) | ||||||||||||
Allowed values | (File|Category|Creator|Institution|Data) | ||||||||||||
Lists | |||||||||||||
Proposal discussion | Proposal discussion | ||||||||||||
Current uses |
| ||||||||||||
Search for values |
(File|Category|Creator|Institution|Data)
”: value must be formatted using this pattern (PCRE syntax). (Help)List of violations of this constraint: Database reports/Constraint violations/P2307#Format, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P2307#Entity types
List of violations of this constraint: Database reports/Constraint violations/P2307#Type Q18610173, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P2307#Item P2302, search, SPARQL
This property must only be used as a qualifier for property constraint (P2302) values of Commons link constraint (Q21510852). (Help)
Violations query:
SELECT ?item ?itemLabel ?constraint ?constraintLabel ?namespace WHERE { ?item p:P2302 [ps:P2302 ?constraint; pq:P2307 ?namespace]. FILTER (?constraint != wd:Q21510852). SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
List of this constraint violations: Database reports/Complex constraint violations/P2307#Qualifier only valid to use with "Commons link constraint"
|
|
Title | ID | Data type | Description | Examples | Inverse |
---|---|---|---|---|---|
property constraint | P2302 | Item | property constraint: constraint applicable to a Wikidata property | IMDb ID <property constraint> distinct-values constraint | - |
exception to constraint | P2303 | Item | item that is an exception to the constraint, qualifier to define a property constraint in combination with P2302 | IUCN conservation status <exception to constraint> Varia jamoerensis | - |
group by | P2304 | Property | GROUP BY: qualifier to define a property constraint in combination with P2302 (Wikidata property constraint) that is used to group constraint violations in constraint violation reports | → Property talk:P2304 | - |
item of property constraint | P2305 | Item | allowed-entity-types constraint: qualifier to define a property constraint in combination with "property constraint" (P2302) | mass <item of property constraint> kilogram | - |
property | P2306 | Property | Wikidata property: qualifier to define a property constraint in combination with P2302 (property constraint), or to limit the scope of Q44292881 (wikidata statement) | → Property talk:P2306 | - |
Wikimedia Commons namespace | P2307 | String | qualifier used with the Commons link property constraint (Q21510852) to specify acceptable Wikimedia Commons namespaces that a property value can link to | → Property talk:P2307 | - |
class | P2308 | Item | class: qualifier to define a property constraint in combination with "property constraint" (P2302) | → Property talk:P2308 | - |
relation | P2309 | Item | relation and relation: qualifier to define a property constraint in combination with P2302. Possibly values are: "instance of", "subclass of" or "instance or subclass of". The qualifier to use with the property "relative" is "type of kinship" (P1039), not this | → Property talk:P2309 | - |
minimum date (property constraint) | P2310 | Point in time | qualifier to define a property constraint in combination with "property constraint" (P2302) | → Property talk:P2310 | - |
maximum date (property constraint) | P2311 | Point in time | qualifier to define a property constraint in combination with "property constraint" (P2302). Use "unknown value" for current date. | → Property talk:P2311 | - |
maximum value | P2312 | Quantity | maximum: qualifier indicating the lowest possible value of a quantity. "no value" can be used to specify no upper bound | range constraint <maximum value> 1,234 | - |
minimum value | P2313 | Quantity | minimum: qualifier indicating the lowest possible value of a quantity | range constraint <minimum value> 0 | - |
format as a regular expression | P1793 | String | regular expression: regex describing an identifier or a Wikidata property. When using on property constraints, ensure syntax is a PCRE | ISO 639-3 <format as a regular expression> [a-z]{3} and IMDb ID <format as a regular expression> ev\d{7}\/\d{4}(-\d)?|(ch|co|ev|nm|tt)\d{7} | - |
constraint status | P2316 | Item | Wikidata constraint status: qualifier to define a property constraint in combination with P2302. Use values "mandatory constraint" or "suggestion constraint" | property scope constraint <constraint status> mandatory constraint | - |
syntax clarification | P2916 | Monolingual text | syntax: qualifier for P1793 (regular expression): to provide a textual description of the regex syntax of a value. Should be displayable after the text "The value for the property should match" and be followed by the regex. | Yandex Music artist ID <syntax clarification> numerisk streng, 1 til 7 tall | - |
Add Gallery as a possible value?
editCommons gallery (P935) could use namespace specification. How should it be added? --Jarekt (talk) 20:14, 9 March 2018 (UTC)
The "format" for values is a regexp specific to each wiki
editThe problem is that the listed values in the regexp are only valid for Commons, but this format should be specified wiki by wiki, using qualifiers. Setting a generic contraint of format such as "(File|Category|Creator|Institution|Data)" will not work to specify valid namespaces for other wikis (including Wikidata itself !)
So most probably this "format constraint property" cannot be set as a constraint directly here in P2307 (and P2307 cannot be used as a valid contraint for Commons or any wiki), but by creating set derived constraints (based on P2307) one constraint for each wiki, so that we can indicate their correct namespaces they accept ("File", "Category", "User", or even the associated Talk namespaces OK on all wikis, but not "Data", "Creator", "Institution" which are Commons-specific, or "Author" which is specific to Wikibooks) in a required "format constraint property" to define in the derived constraint.
Note also that the regexp used here should not be case sensitive (namespaces in wikis are not case-sensitive) so that "data" if also valid; there are also accepted aliases (e.g. "Image" is a valid alias of "File". Do we want only the "canonical namespace names" (with the leading capital as displayed on the wiki), and not any alias (which is valid also for links) ? Can we infer such canonicalization from the regexp or should be declare each namespace for each wiki as separate Wikidata elements listing their known canonical names and all their known aliases, instead of specifying a regexp here ?
Verdy p (talk) 23:17, 15 March 2018 (UTC)
- Help:Property_constraints_portal/Commons_link attempts to explain what it is for.
--- Jura 05:08, 16 March 2018 (UTC)