Difference between revisions of "Template:Semantic Element"
From KIproBatt Wiki
Simon Stier (talk | contribs) (Pushed from ELI Database.) |
Simon Stier (talk | contribs) m (Text replacement - "Is a" to "IsA") |
||
(34 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude> | + | <noinclude>{{AccessControl/Public}} |
This is the "Semantic Element" template. | This is the "Semantic Element" template. | ||
It should be called in the following format: | It should be called in the following format: | ||
<pre> | <pre> | ||
{{Semantic Element | {{Semantic Element | ||
+ | |iri: ontology iri | ||
+ | |label: display name | ||
+ | |description: description | ||
+ | |relations: List of semantic links | ||
}} | }} | ||
</pre> | </pre> | ||
Edit the page to see the template text. | Edit the page to see the template text. | ||
− | |||
− | |||
− | |||
− | + | === Subpages === | |
+ | {{#subpages: }} | ||
+ | </noinclude><includeonly><div style="display:none">{{:{{ROOTPAGENAME}}/_acl}}</div>[[Category:Semantic Element]]<!-- {{Purge link}} --> | ||
+ | {{#formlink:form=Semantic Element|target={{PAGENAME}}|link text=Edit this element|link type=button}} | ||
{{#forminput:form=Semantic Element|button text=Create new element|placeholder=Name of new element}} | {{#forminput:form=Semantic Element|button text=Create new element|placeholder=Name of new element}} | ||
+ | |||
+ | == Description == | ||
+ | {{{description|}}} | ||
+ | <!-- {{#formlink:form=Semantic Element|target={{PAGENAME}}|link text=Edit this element}} --> | ||
+ | |||
+ | |||
== Semantic Links == | == Semantic Links == | ||
+ | {{{relations|}}} | ||
{{#formlink:form=Semantic Element|target={{PAGENAME}}|link text=Add or edit outgoing links}}<br/>To edit incoming links, go to the subjects site. | {{#formlink:form=Semantic Element|target={{PAGENAME}}|link text=Add or edit outgoing links}}<br/>To edit incoming links, go to the subjects site. | ||
− | <!-- {{Set inverted property|property name= | + | <!-- {{Set inverted property|property name=HasPart|inverse property name=IsPartOf|semantic link=True}} --> |
=== Outgoing === | === Outgoing === | ||
− | + | <div class='link-to-form-if-new' id='Semantic Element'> | |
{{#ask: [[subject::{{FULLPAGENAME}}]] [[Category:Semantic Link]] | {{#ask: [[subject::{{FULLPAGENAME}}]] [[Category:Semantic Link]] | ||
|?property | |?property | ||
Line 25: | Line 36: | ||
|format=table | |format=table | ||
|mainlabel=Subject | |mainlabel=Subject | ||
− | |@deferred | + | <!-- |@deferred --> |
− | }} | + | }}</div> |
=== Incoming === | === Incoming === | ||
Line 39: | Line 50: | ||
== Semantic Statements == | == Semantic Statements == | ||
− | {{#ifeq: {{#ask: [[{{PAGENAME}}]] [[Category:Semantic Reference]] |link=none}} | {{PAGENAME}} | {{#formlink:form=Semantic Statement|link text=Add statement|query string=Semantic Statement[reference]={{PAGENAME}}}}| {{DISPLAYTITLE:{{ | + | {{#ifeq: {{#ask: [[{{PAGENAME}}]] [[Category:Semantic Reference]] |link=none}} | {{PAGENAME}} | {{#formlink:form=Semantic Statement|link text=Add statement|query string=Semantic Statement[reference]={{PAGENAME}}}}| {{DISPLAYTITLE: {{{label|{{PAGENAME}}}}}}} {{#formlink:form=Semantic Statement|link text=Add statement|query string=Semantic Statement[subject]={{PAGENAME}}}} }} |
<!-- | <!-- | ||
{{#ask: [[Category:Semantic Statement]] [[{{#ifeq: {{#ask: [[{{PAGENAME}}]] [[Category:Semantic Reference]] |link=none}} | {{PAGENAME}} |has reference|has subject}}::{{PAGENAME}}]] --> | {{#ask: [[Category:Semantic Statement]] [[{{#ifeq: {{#ask: [[{{PAGENAME}}]] [[Category:Semantic Reference]] |link=none}} | {{PAGENAME}} |has reference|has subject}}::{{PAGENAME}}]] --> | ||
Line 45: | Line 56: | ||
[[Category:Semantic Statement]] [[has subject::{{PAGENAME}}]] OR | [[Category:Semantic Statement]] [[has subject::{{PAGENAME}}]] OR | ||
[[Category:Semantic Statement]] [[has object::{{PAGENAME}}]] | [[Category:Semantic Statement]] [[has object::{{PAGENAME}}]] | ||
− | |? | + | <!-- |?Has subject=Subject |
− | |? | + | |?Has property=Property |
− | |? | + | |?Has object=Object --> |
− | |? | + | <!-- |?Has quantity=Quantity |
− | |? | + | |?Has value=Value |
− | |? | + | |?Has unit=Unit |
− | |? | + | |?Has quantity type=Type |
− | |? | + | |?Has relation qualifier=Relation type |
− | |? | + | |?Has relation reference=Relation target --> |
− | |? | + | <!-- |?Has quality=Quality |
− | |? | + | |?Has reference=Reference --> |
− | |@deferred | + | |mainlabel=Statement |
+ | <!-- |@deferred --> | ||
+ | |format=plainlist | ||
+ | |introtemplate=Semantic_Element/Table_header | ||
+ | |template=Semantic_Element/Table_subquery | ||
+ | |outrotemplate=Semantic_Element/Table_footer | ||
+ | |named args=yes | ||
+ | |link=none | ||
+ | }} | ||
+ | |||
+ | == External Identifiers == | ||
+ | IRI: {{{iri|}}} | ||
+ | |||
+ | {{{external_identifiers|}}} | ||
+ | |||
+ | <!-- Process specific: Add properties from statements --> | ||
+ | {{#arraymap: | ||
+ | {{#ask: [[Has subject::{{FULLPAGENAME}}]] [[Has property::Property:Correlation to]] [[Has subobject.Has object::Correlation/Defined direct correlation]] | ||
+ | |?Has object= | ||
+ | |mainlabel=- | ||
+ | |link=none | ||
+ | |format=plain | ||
+ | }} | ||
+ | |,|__PARAM__|{{#set: Has defined direct correlation to=__PARAM__}}{{#set: Has direct correlation to=__PARAM__}}|\s}} | ||
+ | {{#arraymap: | ||
+ | {{#ask: [[Has subject::{{FULLPAGENAME}}]] [[Has property::Property:Correlation to]] [[Has subobject.Has object::Correlation/Undefined direct correlation]] | ||
+ | |?Has object= | ||
+ | |mainlabel=- | ||
+ | |link=none | ||
+ | |format=plain | ||
}} | }} | ||
+ | |,|__PARAM__|{{#set: Has undefined direct correlation to=__PARAM__}}{{#set: Has direct correlation to=__PARAM__}}|\s}} | ||
− | <!-- | + | <!-- [[Has defined direct correlation to::__PARAM__]] --> |
+ | {{#if: {{#ask: [[{{FULLPAGENAME}}]] [[IsA::Process parameter]]}} | {{Semantic Element/Process parameter}} |<!-- No process parameter -->}} | ||
</includeonly> | </includeonly> |
Latest revision as of 05:41, 4 September 2022
This is the "Semantic Element" template. It should be called in the following format:
{{Semantic Element |iri: ontology iri |label: display name |description: description |relations: List of semantic links }}
Edit the page to see the template text.