<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF[
	<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
	<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
	<!ENTITY owl 'http://www.w3.org/2002/07/owl#'>
	<!ENTITY swivt 'http://semantic-mediawiki.org/swivt/1.0#'>
	<!ENTITY wiki 'http://wikibase.nl/Special:URIResolver/'>
	<!ENTITY category 'http://wikibase.nl/Special:URIResolver/Category-3A'>
	<!ENTITY property 'http://wikibase.nl/Special:URIResolver/Property-3A'>
	<!ENTITY wikiurl 'https://open-csp.org/'>
]>

<rdf:RDF
	xmlns:rdf="&rdf;"
	xmlns:rdfs="&rdfs;"
	xmlns:owl ="&owl;"
	xmlns:swivt="&swivt;"
	xmlns:wiki="&wiki;"
	xmlns:category="&category;"
	xmlns:property="&property;">

	<owl:Ontology rdf:about="https://open-csp.org/Special:ExportRDF/DevOps-3ADoc/Open_CSP/2.0/Class_definition_architecture">
		<swivt:creationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2026-04-30T05:49:44+02:00</swivt:creationDate>
		<owl:imports rdf:resource="http://semantic-mediawiki.org/swivt/1.0"/>
	</owl:Ontology>
	<swivt:Subject rdf:about="http://wikibase.nl/Special:URIResolver/DevOps-3ADoc/Open_CSP/2.0/Class_definition_architecture">
		<rdfs:label>Class definition architecture</rdfs:label>
		<rdfs:isDefinedBy rdf:resource="https://open-csp.org/Special:ExportRDF/DevOps-3ADoc/Open_CSP/2.0/Class_definition_architecture"/>
		<swivt:page rdf:resource="https://open-csp.org/DevOps-3ADoc/Open_CSP/2.0/Class_definition_architecture"/>
		<swivt:wikiNamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">50000</swivt:wikiNamespace>
		<swivt:wikiPageContentLanguage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">en</swivt:wikiPageContentLanguage>
		<property:Class rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Doc</property:Class>
		<property:Doc_parent rdf:resource="&wiki;DevOps-3ADoc/Open_CSP/2.0/Class_definitions"/>
		<property:Doc_sort_order rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2</property:Doc_sort_order>
		<property:Doc_subject rdf:resource="&wiki;DevOps-3ADoc/Open_CSP"/>
		<property:Doc_synopsis rdf:datatype="http://www.w3.org/2001/XMLSchema#string">How class definitions are used in conjunction with slots and components to display content pages with metadata</property:Doc_synopsis>
		<property:Doc_target_group rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Administrator</property:Doc_target_group>
		<property:Doc_title_with_versions rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Class definition architecture (2.0)</property:Doc_title_with_versions>
		<property:Subject_version rdf:datatype="http://www.w3.org/2001/XMLSchema#string">2.0</property:Subject_version>
		<property:Title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Class definition architecture</property:Title>
		<property:Has_query rdf:resource="&wiki;DevOps-3ADoc/Open_CSP/2.0/Class_definition_architecture-23_QUERYd79033af1c62e29d1c287d4b825bbb69"/>
		<swivt:wikiPageCreationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2023-10-05T11:00:47Z</swivt:wikiPageCreationDate>
		<property:Creation_date-23aux rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2460222.9588773</property:Creation_date-23aux>
		<property:Display_title_of rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Class definition architecture</property:Display_title_of>
		<swivt:wikiPageModificationDate rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2025-07-15T09:01:21Z</swivt:wikiPageModificationDate>
		<property:Modification_date-23aux rdf:datatype="http://www.w3.org/2001/XMLSchema#double">2460871.8759375</property:Modification_date-23aux>
		<swivt:wikiPageSortKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Doc/Open CSP/2.0/Class definition architecture</swivt:wikiPageSortKey>
		<property:Page_creator rdf:resource="&wiki;User-3AEbc16062-2Ddd09-2D4928-2D8cf3-2D821f492b0c44"/>
		<property:Page_author rdf:resource="&wiki;User-3ACharlot"/>
		<property:Page_author rdf:resource="&wiki;User-3AEbc16062-2Ddd09-2D4928-2D8cf3-2D821f492b0c44"/>
		<property:Page_author rdf:resource="&wiki;User-3A81d56153-2D9868-2D4094-2D90a0-2Ddf1700ff7090"/>
		<property:Page_ID rdf:datatype="http://www.w3.org/2001/XMLSchema#double">479</property:Page_ID>
		<property:Internal_links rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Search</property:Internal_links>
		<property:Internal_links rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Pages</property:Internal_links>
		<property:Parsed_text rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Open CSP stores metadata of pages in slots. Pages are displayed with various components (for which the Chameleon skin is used), which can look differently based on the configuration found in class definition pages. 
 
 Metadata stored in slots 
 Before slots were used, there were two common ways to deal with structured data:
 
 A) Have templates with structured data in between the content (free text) of a page. 
 B) Have one template that wraps the entire page content, with some parameters for structured data and also a parameter for free text 
 The advantage of using slots is that you can separate the metadata from the content and also separate the storing of the data from displaying it. This reduces the risk of making mistakes when editing, while allowing you to have forms for editing structured data and to use VisualEditor to edit the main content.
 Note: data is stored in SMW properties as well, but class definitions do not rely on this. SMW is used for example for Search and Pages . It would technically be possible to modify the Open CSP framework to work with a different data storage extension, if you would make your own alternatives for the pages that use SMW queries or WikiSearch.
 The following slots are used by Open CSP:
 
 csp-base-props  
In this slot Template:Base properties is used to store data dat is common to all pages, such as the Class and Title:   {{Base properties
|Class=
|Title=
}}
 
 csp-class-props  
In this slot Template:Csp class properties is used to store data that is specific to each class, based on the class definition:   {{Csp class properties
|Parameter1=Value1
|Parameter2=Value2
|...
}}
 
 csp-data 
 This is a json slot which the framework only uses for class definition pages, but could be used for storing any json data on content pages as well (if you make your own templates/forms for this).
 
 Example slots of a content page 
 Let's say we have a page about a person, this could have the following slots:
 
csp-base-props:   {{Base properties
|Class=Person
|Title=Example person
}}
  csp-class-props:   {{Csp class properties
|First name=John
|Last name=Smith
|Date of birth=1986-03-16
}}
 
 Example slots of a class definition page 
 To continue the previous example, a "Person" class definition page would have pagename Wiki:Class definition/Person and could have the following slots:
 
csp-base-props:   {{Base properties
|Class=Class definition
|Title=Person
}}
  csp-class-props:   {{Csp class properties
|Defines class=Person
|Pagetitle format=title
|Layout areas='sub-header sidebar' 'main sidebar'
|Layout columns=3fr 1fr
|Layout rows=auto 1fr
}}
  csp-data:   {
  "CspParameterDefinitions": [
    {
      "name": "First name",
    },
    {
      "name": "Last name",
    },
    {
      "name": "Date of birth",
      "formfieldTemplate": "Csp formfield/date",
      "displayTemplate": "Csp parameter display/date",
    }
  ]
}
 
 Components 
 Open CSP uses the Chameleon skin to be able to display pages with customizable components. The following components are used:
 
  Header: always visible at the top of a page 
 Main : this component displays the content that is stored in the main slot of a page, i.e. the text that is written by users 
 Sub-header : by default shown below the header with Template:Csp default subheader , can be customized through class definitions 
 Sidebar : by default shown on right side with Template:Csp default sidebar , can be customized through class definitions, metadata is displayed in this component 
 Footer : by default not displayed, can be customized through class definitions 
 Open CSP uses system messages inside these components. These system message contain some logic with various parser functions and Lua functions, in order to display a component based on the slot data of page as well as the slot data of the corresponding class definition page. This logic works as follows:
 
 A component contains a system message that invokes a Lua function, for example {{#invoke:CspComponents|parseComponentIfApplicable|sidebar}} . This Lua function does the following: 
 Retrieve slotdata from current page 
 Get "Class" parameter from slotdata (return if it does not exist) 
 Get class definition pagename corresponding to the class 
 Get slotdata from class definition page (return if it does not exist) 
 If the component is not found in the "Layout areas" parameter of the class definition page, return 
 Parse component template (for example Template:Csp default sidebar , unless a different template is found in the class definition data) 
 Pass all of the slotdata from the current page as well as the class definition slotdata to this template, in the form of an ArrayFunctions export 
  The "Wiki" namespace 
 Open CSP uses the Wiki namespace. Technically this is the standard Project namespace, which has been labeled "Wiki". This namespace is intended for technical pages for development or configuration of the wiki. It is not intended for users that only write or read content on the wiki. For example class definitions and the "Slots" page are in this namespace. The class definition architecture currently relies on the class definition pages having a specific pagetitle format, so you should not move these pages to different namespaces or modify their titles. If you want to restrict access to this namespace, that is possible by using an extension like Lockdown.</property:Parsed_text>
	</swivt:Subject>
	<swivt:Subject rdf:about="http://wikibase.nl/Special:URIResolver/DevOps-3ADoc/Open_CSP/2.0/Class_definition_architecture-23_QUERYd79033af1c62e29d1c287d4b825bbb69">
		<swivt:masterPage rdf:resource="&wiki;DevOps-3ADoc/Open_CSP/2.0/Class_definition_architecture"/>
		<swivt:wikiNamespace rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">50000</swivt:wikiNamespace>
		<property:Query_depth rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0</property:Query_depth>
		<property:Query_format rdf:datatype="http://www.w3.org/2001/XMLSchema#string">plainlist</property:Query_format>
		<property:Query_size rdf:datatype="http://www.w3.org/2001/XMLSchema#double">1</property:Query_size>
		<property:Query_string rdf:datatype="http://www.w3.org/2001/XMLSchema#string">[[:DevOps:Doc/Open CSP/2.0/Class definition architecture]]</property:Query_string>
		<swivt:wikiPageSortKey rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Doc/Open CSP/2.0/Class definition architecture# QUERYd79033af1c62e29d1c287d4b825bbb69</swivt:wikiPageSortKey>
	</swivt:Subject>
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#creationDate" />
	<owl:ObjectProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#page" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiNamespace" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageContentLanguage" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3AClass" />
	<owl:ObjectProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ADoc_parent" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ADoc_sort_order" />
	<owl:ObjectProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ADoc_subject" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ADoc_synopsis" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ADoc_target_group" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ADoc_title_with_versions" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ASubject_version" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ATitle" />
	<owl:ObjectProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3AHas_query" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageCreationDate" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ACreation_date-23aux" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3ADisplay_title_of" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageModificationDate" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3AModification_date-23aux" />
	<owl:DatatypeProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#wikiPageSortKey" />
	<owl:ObjectProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3APage_creator" />
	<owl:ObjectProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3APage_author" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3APage_ID" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3AInternal_links" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3AParsed_text" />
	<owl:ObjectProperty rdf:about="http://semantic-mediawiki.org/swivt/1.0#masterPage" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3AQuery_depth" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3AQuery_format" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3AQuery_size" />
	<owl:DatatypeProperty rdf:about="http://wikibase.nl/Special:URIResolver/Property-3AQuery_string" />
	<!-- Created by Semantic MediaWiki, https://www.semantic-mediawiki.org/ -->
</rdf:RDF>