Status: | effective |
Progress: | 100% |
Version: | 3.2.0+ |
Table of Contents | |
---|---|
This is the help page on schema type PROPERTY_GROUP_SCHEMA
.1 It allows to deploy property groupes without a user having to manually create categories and annotated them with special property "Is property group"Marks a category for holding properties belonging to a property group. This feature was introduced with Semantic MediaWiki 3.1.0Released on 23 September 2019 and compatible with MW 1.31.0 - 1.33.x..1 The schema structure was change with Semantic MediaWiki 3.2.0Released on 7 September 2020 and compatible with MW 1.31.0 - 1.35.x..23
However adding special property "Is property group"Marks a category for holding properties belonging to a property group to a category takes precedence over any group definition found in PROPERTY_GROUP_SCHEMA
. Thus a property listed as part of a PROPERTY_GROUP_SCHEMA
where a listed property itself is assigned to category the property will be a member of the category assigned group.
Objective[edit]
The PROPERTY_GROUP_SCHEMA
schema type defines property groups that help structure the browsing interface of a page.
Structure[edit]
The structure of this schema is defined by the following properties:
type
– defindes the schema typemanifest_version
– sets the version of the schema typedescription
– describes the entire group schemagroups
– identifies the section that contains group definitions..._group
– identifies an individual group (the name has to end with "_group")canonical_name
– sets the canonical lable for the groupmessage_key
– sets a system message key that can be used for translation and replaces the canonical label for the group if specifiedproperty_keys
– sets the property keys assigned to the group
tags
– sets simple tags to categorize a schema
Example[edit]
{
"type": "PROPERTY_GROUP_SCHEMA",
"description": "This property group schema serves as an example on how to structure it.",
"groups": {
"x_group": {
"canonical_name": "My properties X",
"message_key": "smw-property-group-label-...",
"property_keys": [
"MY_PROPERTY_XA",
"MY_PROPERTY_XB"
]
},
"y_group": {
"canonical_name": "My properties Y",
"message_key": "smw-property-group-label-...",
"property_keys": [
"MY_PROPERTY_Y"
]
}
},
"tags": [
"group",
"property groups",
"example",
"example group"
]
}
- Further live examples
- sandbox.semantic-mediawiki.org: Overview of pages using
PROPERTY_GROUP_SCHEMA
- sandbox.semantic-mediawiki.org: Migrate from SWM 3.1.x to SMW 3.2.x schema structure
Validation[edit]
The structure of this schema is validated by the following definition file for the schema structure: "property-group-schema.v1.json"
Notes[edit]
___REVID
for special property "Revision ID".4
When grouping user-defined properties, i.e. properties created on wiki, the name of the property needs to be used. However spaces within the property name need to be replaced with underscores to get the property key, e.g. property "Has status code" needs to be added as "Has_status_code".
See also[edit]
- Help page on property grouping
- Help page on special property "Is property group"Marks a category for holding properties belonging to a property group
- Help page on special page "Browse"Shows all properties and their values annotated to a page
References
- a b Semantic MediaWiki: GitHub pull request gh:smw:3749
- a b Semantic MediaWiki: GitHub pull request gh:smw:4045
- a b Semantic MediaWiki: GitHub pull request gh:smw:4592
- ^ Semantic MediaWiki: GitHub issue gh:smw:4597