Ontology Blueprint Walkthrough "dataspects KIM MentalPathsExtension Framework"

From SMW CindyKate - Main
Component0089745627
Jump to: navigation, search

Content

In the sense of "write the code you wish you had" we start by examining our main user interface, the page Template:MentalPathwaysExtensionInterface.

Template:MentalPathwaysExtensionInterface (edit)
<includeonly>
= Subjects =

<div class="compilationAskQuery">{{code|{{#replace:{{{ComponentsFacetSelectionStatement|[[Category:Subject]]}}}|[|&#91;}}}} {{#tip-info:This is the selection part of the ask query that compiles the table below.}}</div>

{|class="display dskim_datatables"
!Subject
![[Component0907067149|Properties]]
{{#ask:{{{ComponentsFacetSelectionStatement|[[Category:Subject]]}}}
|?HasEntityKeyword
|limit=500
|format=list
|template=SubjectsResultRow2
|link=none
|sep=;
}}
|}

= Types =

<div class="compilationAskQuery">{{code|{{#replace:{{{TypesFacetSelectionStatement|[[Category:DSKIMSubjectType]]}}}|[|&#91;}}}} {{#tip-info:This is the selection part of the ask query that compiles the table below.}} [[Component0509011885|Add new component type]]</div>

{|class="display dskim_datatables"
!Type
!Keywords
!Links
!Building Blocks
{{#ask:{{{TypesFacetSelectionStatement|[[Category:DSKIMSubjectType]]}}}
|?HasEntityKeyword
|format=template
|template=TypesResultRow
|link=none
}}
|}

= Roles =

<div class="compilationAskQuery">{{code|{{#replace:{{{RolesFacetSelectionStatement|[[Category:Role]]}}}|[|&#91;}}}} {{#tip-info:This is the selection part of the ask query that compiles the table below.}}</div>

{{#ask:{{{RolesFacetSelectionStatement|[[Category:Role]]}}}
|format=template
|template=RolesResultRow
|link=none
}}

= Properties =

<div class="compilationAskQuery">{{code|{{#replace:{{{PropertiesFacetSelectionStatement|[[Category:Property]]}}}|[|&#91;}}}} {{#tip-info:This is the selection part of the ask query that compiles the table below.}} [[:Category:Property|See all properties]]</div>

{|class="display dskim_datatables"
!Property
!Used with Value
{{#ask:{{{PropertiesFacetSelectionStatement|[[Category:Property]]}}}
|?HasEntityKeyword
|format=list
|template=PropertyResultRow2
|link=none
}}
|}
<headertabs/>
__NOTOC__
</includeonly>
<noinclude>[[Category:DSKIMMPETopLevelOntology]]</noinclude>
Template:SubjectsResultRow2 (edit)
<includeonly>|-
|'''[[{{{1}}}]]'''
{{#arraymap:{{{2|}}}|;|@@@@@@|<span class="Keyword">[[@@@@@@]]</span>|&ensp;&middot;&ensp;}}

{{#ask:[subobject::{{{1}}}]AnnotationPredicate::MentionsDomainTerm
|?AnnotationObject
|format=template
|template=DomainTermResultRow
|link=none
|sep=&ensp;&middot;&ensp;
}}
|{{#ask:[subobject::{{{1}}}][[AnnotationPredicate::+]]AnnotationType::SubjectAnnotation
|mainlabel=-
|?AnnotationPredicate
|?AnnotationObject
|format=template
|template=PropertyResultRow
|link=none
|sort=AnnotationPredicate
}}
|-</includeonly><noinclude>[[Category:DSKIMMPETopLevelOntology]]</noinclude>
Template:Show (edit)
<noinclude><!-- This template is a wrapper for SMW's show parser function. There are 2 parameters:

- The first parameter is the page whose property you want to get. Use 'this' for the current page.
- The second parameter is the property you want to get.

Example: {{show|this|HasContentReference}} gets the actual page's HasContentReference property.
Design Pattern: Component0735526958
--></noinclude>{{#show:{{#ifeq:{{{1}}}|this|{{PAGENAME}}|{{{1}}}}}|?{{{2}}}}}<noinclude>[[Category:DSKIMMPETopLevelOntology]]</noinclude>
Template:Property3 (edit)
{{my|This is the SMW implementation of floating properties.}}
* {{PropName|[[Property:{{{PropertyName}}}]]}} {{PropVal|{{{PropertyValue}}}}}
{{#subobject:
|PropertyName={{{PropertyName}}}
|PropertyValue={{{PropertyValue}}}
}}<noinclude>[[Category:DSKIMMPETopLevelOntology]]</noinclude>