Notice: Unexpected clearActionName after getActionName already called in /var/www/html/w/includes/context/RequestContext.php on line 333
Project:Profile types - MaRDI portal

Project:Profile types

From MaRDI portal
(Redirected from Project:ProfileTypes)

Synopsis

MaRDI uses a knowledge graph to store items and their connections to other items. The rendering of an item is quite technical in a kind of tabular form (see e.g. this item). To make displaying an item more informative, we are creating explicit wiki-pages for each item based on so called templates. Users should only use these created wiki-pages to work with the portal. A template controls how properties of an item are shown in a (hopefully) visually appealing way (e.g. like this see here for the same example. We are using different templates for different item types, such as persons, publications or datasets. This document describes how to use and create templates.


Main Idea

  • To connect an item to a template, the item needs to have the property MaRDI profile type (P1460) which specifies the type (e.g. publication) and needs to have a value from the list below (e.g. Q5976449 for the publication template - so: TEMPLATE_NAME = Publication).
  • There is a generation script (see below) that does the following things:
    • For each item where P1460 is set, a Wiki page with the name TEMPLATE_NAME:ITEMID is created (e.g. Publication:650331). The ITEMID is the actual QID (e.g. Q650331) of the item without the "Q".
    • The content of that new wiki page is set to {{TEMPLATE_NAME}}. This means that the wiki page will use the given template to render the page content.
    • Connect the (internal) item page with the generated wiki-page. Manually, this can be done on the item page (e.g. this item). Scroll down to the very bottom until you see a gray box "Mathematics". Hit "edit", type "mardi" in the left gray input box (which is prefilled with "wiki"). Then, write the name of the newly create wiki-page in the right gray input box (e.g. "Publication:3420082"). Click on the entry with the same name in the appearing drop-down list. Hit "save". Now you can purge the wiki-data page to show the result.


Template Types

We have the following profiles type available, which are instances of MaRDI profile type (Q5976451):

These types are:

Full list available at MaRDI profiles. See also Project:Showcases.
Profile type Template Example
MaRDI person profile (Q5976445) Template:Person Michael Joswig
MaRDI publication profile (Q5976449) Template:Publication Real Tropical Hyperfaces by Patchworking in polymake
MaRDI software profile (Q5976450) Template:Software coffee
MaRDI formula profile (Q5981696) Template:Formula Definition: Binomial Coefficients
MaRDI dataset profile (Q5984635) Template:Dataset Precipitation dataset
MaRDI community profile (Q6205095) Template:Community Math+ Community
MaRDI algorithm profile (Q6503323) Template:Algorithm Peter-Clark algorithm
MaRDI service profile (Q6503324) Template:Service MaRDI Portal
MaRDI theorem profile (Q6534201) Template:Theorem Metric spaces are paracompact
MaRDI workflow profile (Q6534216) Template:Workflow Logical Data Analysis for Egyptian Objects
MaRDI research field profile (Q6534268) Template:Research_field -
MaRDI research problem profile (Q6534269) Template:Research_problem -
MaRDI model profile (Q6534270) Template:Model Electron Shuttling Model
MaRDI quantity profile (Q6534271) Template:Quantity -
MaRDI task profile (Q6534272) Template:Task -


Automatic Generation Script

As seen above, each profile type is assigned a matching namespace with the same name. To (re-)create the wiki-pages for a particular profile type (=namespace) automatically (and create the connection between the wiki-page and the item), run this script on the main MaRDI server (here: mardi02):

mardi02:~/portal-compose$ docker compose exec -T wikibase /var/www/html/w/maintenance/run /var/www/html/w/extensions/MathSearch/maintenance/ProfilePages create <namespace>


Add a new profile type

  1. Create a template. This is a normal wiki-page with the prefix "Template". For a template for a person, you can create a wiki-page called "Template:Person" (this of course already exists, see Template:Person).
  2. Create profile item. Create a new item that is a subclass of MaRDI profile type and an instance of MaRDI-specific concept and set the label and name accordingly as shown in this example.
  3. Create a namespace in mardi_namespaces.php.
  4. Create a config entry in LocalSettings
    $wgMathProfileQIdMap['namespace']='profileItem';
    // examples
    $wgMathProfileQIdMap['person']='Q5976445';
    $wgMathProfileQIdMap['software']='Q5976450';
    
  5. Add SPARQL query if necessary, also in LocalSettings
    $wgMathProfileQueries['namespace']='query';
    // example
    $wgMathProfileQueries['dataset']='?item wdt:P1460 wd:Q5984635';
    


To do

Create new profile types

Modify existing profile types

  • dataset
    • Add a URL pointing to the dataset

Improve documentation

This refers to the profile-specific templates and modules as well as to help pages.

  • All profile types