Help: Unknown Entities Pages

From Security Vision
Jump to: navigation, search


How to create Unknown Entity Pages[ ]

Used extensions:

Used Templates:


Page name convention[ ]

Unknown_category_NNNN ie Unknown_Deployments_0000, Unknown_Deployments_0001


Adding Unknown Entities Interface:[ ]

Test/Sandbox Form: Form:Deployments

Forms without Unknown Entities Interfaces

  • all the remaining Forms

Option A: redlinks to all Unknown entity categories in 1 single place[ ]

Template:Unknown Entities invokes the Template:Unknown_Entity_redlink

Option B: individual redlinks for each form field[ ]

Create Unknown_Institution_0104

Variation: forminput interface


Automatic annotation of Unknown Pages[ ]

  • Where: In all templates (of Deployments, Dataset, Institution, etc...)
  • Function: automatically annotated the pages "Unknown" at the start of the Pagename with the property Property:Is unknown (bool) as True (False for all other pagenames)
  • Snipped added:
{{#set:
 Is unknown={{#ifeq: {{#explode:{{PAGENAME}}| |0}}|Unknown|true|false}}
}}

As the True/False is set based on the {{PAGENAME}} magicword, the moment the page changes name, the property value changes to False

Display Unknown Entity Pages[ ]

Search Interface[ ]

Using Page_Forms query_forms

It results in the interface


Unknown Entity belongs to category:

which can be embedded to any page with

{{Special:RunQuery/Unknown_Entity_Search}}

Links:

Query: All Unknown Entities[ ]

{{#ask: [[Is unknown::true]]
 |?Category
 |?Modification date
 |format=broadtable
 |mainlabel=Page
 |limit=50
 |offset=0
 |link=all
 |sort=
 |order=asc
 |headers=show
 |searchlabel=... further results
 |class=sortable wikitable smwtable
}}
PageCategoryModification date"Modification date" is a predefined property that corresponds to the date of the last modification of a subject and is provided by Semantic MediaWiki.
Unknown Dataset 0002Dataset16 February 2022 14:17:58
Unknown Dataset 0003Dataset16 February 2022 14:24:18
Unknown Dataset 0004Dataset16 February 2022 14:25:36
Unknown Dataset 0005Dataset16 February 2022 14:31:52
Unknown Dataset 0006Dataset16 February 2022 14:33:26
Unknown Dataset 0007Dataset2 March 2022 09:45:38
Unknown Dataset 0008Dataset19 May 2022 12:07:51
Unknown Dataset 0009Dataset20 April 2024 11:52:00
Unknown Dataset 0010Dataset20 April 2024 11:52:00
Unknown Dataset 0011Dataset20 April 2024 11:52:11
Unknown Dataset 0012Dataset20 May 2022 09:40:11
Unknown Dataset 0013Dataset20 April 2024 15:58:36
Unknown Dataset 0014Dataset31 May 2022 15:13:24
Unknown Dataset 0015Dataset2 June 2022 11:20:34
Unknown Dataset 0016Dataset20 April 2024 15:58:36
Unknown Dataset 0017Dataset20 April 2024 15:58:37
Unknown Dataset 0018Dataset3 June 2022 13:59:42
Unknown Dataset 0019Dataset20 April 2024 15:58:37
Unknown Dataset 0020Dataset20 April 2024 15:58:37
Unknown Dataset 0021Dataset20 April 2024 15:58:37
Unknown Dataset 0022Dataset20 April 2024 15:58:38
Unknown Dataset 0023Dataset7 June 2022 09:31:52
Unknown Dataset 0024Dataset7 June 2022 13:04:13
Unknown Dataset 0025Dataset20 April 2024 11:52:24
Unknown Dataset 0026Dataset8 June 2022 20:43:28
Unknown Dataset 0027Dataset9 June 2022 12:35:20
Unknown Dataset 0028Dataset9 June 2022 13:48:11
Unknown Dataset 0029Dataset9 June 2022 18:41:29
Unknown Dataset 0030Dataset9 June 2022 20:31:01
Unknown Dataset 0031Dataset11 June 2022 09:03:11
Unknown Dataset 0032Dataset11 June 2022 10:21:10
Unknown Dataset 0033Dataset11 June 2022 14:23:21
Unknown Dataset 0034Dataset12 June 2022 15:31:02
Unknown Dataset 0035Dataset12 June 2022 17:38:48
Unknown Dataset 0036Dataset13 June 2022 17:32:42
Unknown Dataset 0037Dataset14 June 2022 14:17:56
Unknown Dataset 0038Dataset14 June 2022 17:23:30
Unknown Dataset 0039Dataset15 June 2022 06:08:54
Unknown Dataset 0040Dataset15 June 2022 16:10:55
Unknown Dataset 0041Dataset16 June 2022 11:59:24
Unknown Dataset 0042Dataset16 June 2022 15:16:47
Unknown Dataset 0043Dataset16 June 2022 15:35:22
Unknown Dataset 0044Dataset16 June 2022 16:01:46
Unknown Dataset 0045Dataset17 June 2022 14:01:38
Unknown Dataset 0046Dataset17 June 2022 14:09:11
Unknown Dataset 0047Dataset17 June 2022 14:46:33
Unknown Dataset 0048Dataset20 April 2024 11:52:25
Unknown Dataset 0049Dataset20 April 2024 11:52:25
Unknown Dataset 0050Dataset22 June 2022 13:39:03
Unknown Dataset 0051Dataset21 June 2022 17:42:57
... further results





Process:incremental creation of unknown entity pages[ ]

Extension:Create_Page function[ ]

{{#createpage:|Your page name|button text|Template:ThaWillFillPage}}

{{#createpage:|Your page name|button text|Template:ThaWillFillPage}}


which I can see being applied as

{{#createpage:|Unknown_Deployments_NNNN|Create Unknown Deployment|Template:Deployments}}

{{#createpage:|Unknown_Deployments_NNNN|Create Unknown Deployment|Template:Deployments}}

Querying unknown entity pages[ ]

{{#ask:[[~*Unknown_Deployment*]]
 |format=broadtable
 |limit=50
 |offset=0
 |link=subject
 |sort=
 |order=asc
 |headers=show
 |searchlabel=... further results
 |class=sortable wikitable smwtable
}}
 
Unknown Deployments 0000
Unknown Deployments 0000
Unknown Deployments 0000
Unknown Deployments 0001
Unknown Deployments 0001
Unknown Deployments 0001
Unknown Deployments 0002
Unknown Deployments 0002
Unknown Deployments 0002
Unknown Deployments 0002
Unknown Deployments 0003
Unknown Deployments 0003
Unknown Deployments 0003
Unknown Deployments 0004
Unknown Deployments 0004
Unknown Deployments 0004
Unknown Deployments 0004
Unknown Deployments 0005
Unknown Deployments 0005
Unknown Deployments 0005


last Unknown_Deployment[ ]

{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}

Unknown Deployments 0005

Parse the last Unknown_Deployment string[ ]

  • Start from the string: "Unknown Deployments 0001"
  • extract the last 4 characters of strings: use parser function:
    • function:
      {{#sub:{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}}
    • output: 0005
  • add 1 to int Extension:ParserFunctions##expr
    • {{#expr: 1 + {{#sub:{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}} }}
    • output: 6
  • pad with zeros: Magic_words#Formatting padleft
    • {{padleft:{{#expr: 1 + {{#sub:{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|-4}}}}|4|0}}
    • output: 0006

Default value: when no results are returned[ ]

use Extension:ParserFunctions##if to assign a default value: "000" if the results of the query are None, else return the last item from the query

Example: True

{{#if: {{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist}}|{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|000}}

Unknown Deployments 0005

Example: False

{{#if: {{#ask:[[Category:XYZ]][[~*Unknown_Deployment*]]|format=plainlist}}|{{#ask:[[Category:Deployments]][[~*Unknown_Deployment*]]|format=plainlist|limit=1|offset=0|link=none|sort=|order=desc|sep=, |searchlabel=}}|000}}

000


Discussion: Page Forms/Linking to forms[ ]

There is 3 interface options to create links to form, as seen bellow, as created by Template:Template:Unknown_Entity

  • #forminput
  • #formlink
  • #formredlink

Any of them can access the form in either a "popup" or "new window"

Which one of this 3 interface options and access methods would you prefer User:Ruben & User:Francesco

Deployments example Template:Unknown Entity

Technology example Template:Unknown Entity

  • Francesco's comments: I'm not entirely sure how these three options would look when embedded in the form (if they will be embedded in the form). But I would go for the one that looks the most intuitive - maybe 1 or 3? What became however clear by trying them out here is that the popup version is less confusing than the new window option. Thanks!
  • Ruben's comments: Great work. I largely agree with Francesco. I'd prefer the new window myself, but suspect most users would prefer the pop-in. I think the button is the "cleanest", but I can imagine the editabily of the text input field will come in handy. So I guess that version (1) has my preference.

Andre (talk) 13:41, 20 January 2022 (CET) Thanks you two. There seems to be a :

  • decision on: popup
  • option to make between one 1 and 3:
    • 3 seems less intrusive and prevents users from changing the page name
    • 1 is allow editing

In form[ ]

Andre (talk) 14:05, 20 January 2022 (CET) has put them in a form and you can decide what you prefer

User:Francesco & User:Ruben can you have a look at this form

And see the possible approaches:

  1. have all the Create unknown options at top of the form
    1. redlinks:
    2. forminput: self explanatory and clean
  2. Create Unknown_Institution_0001 (redlink)
  3. Unknown_Dataset_0001: seems messy

User:Andre prefers 1.2: cleanest, does not interfere with the form field, all options for creation are available, which can then be chosen in the Form.

Ruben (talk) 14:10, 20 January 2022 (CET) I think placing it in the relevant section of the form makes the most sense. Otherwise it could just as well be on another page. Although I agree with the sentiment that the way it looks now is a bit messy. Suggestion: making it smaller and perhaps _after_ the entry field, makes it a bit cleaner.

Francesco 14:17, 20 January 2022 (CET)I'm with Andre on this one: 1.2. I would have it as a red link in-line in the appropriate place in the form (thus not on the top). I understand Ruben's point on the possibility to change the title, but that's actually what we don't want, especially with the research assistants...And if the title really needs to be changed, we can either move individual pages.


Andre (talk) 14:50, 20 January 2022 (CET) Followed last User:Francesco last point and included all of the links to create Unknown entities of all relevant categories in Template:Unknown Entities. The template can be put at the bottom of the Form page, or anywhere where it is wished. An example can be seen at the bottom of this form


User:Ruben & User:Francesco please review the search/display of Unknown pages.



Template:Unknown Entity redlink[ ]

Unknown Technology 0001

Template:Unknown_Entity_forminput[ ]


Issue: unknown institution pop-up interface losses data[ ]

The Template:Unknown_Entity_redlink uses

  • formredlink
  • popup
  • reload - causes the page that the user ends up on after submitting the form to get reloaded with 'action=purge'.

Andre (talk) 10:50, 18 April 2022 (CEST) The solution I am currently try is is to replace the "popup" parameter with "new window" which opens a new tab for the unknown entity form, without changing the source form. The user will be able to see the name of the new unknown entity and fill it in the form. It might require a bit more effort from the user, but it prevents data loos. And once the user does it once, they will understand and be able to repeat the process easily.