Template:Workflow: Difference between revisions
From MaRDI portal
EloiFerrer (talk | contribs) No edit summary Tag: Reverted |
EloiFerrer (talk | contribs) No edit summary Tag: Manual revert |
||
(143 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
{{#if: {{#invoke:Wd|label|raw|}} | {{Template:Badge|[[Help:MaRDI QID|MaRDI QID]]|https://portal.mardi4nfdi.de/wiki/Item:{{#invoke:Wd|label|raw|}}|{{#invoke:Wd|label|raw|}}}} }} | {{#if: {{#invoke:Wd|label|raw|}} | {{Template:Badge|[[Help:MaRDI QID|MaRDI QID]]|https://portal.mardi4nfdi.de/wiki/Item:{{#invoke:Wd|label|raw|}}|{{#invoke:Wd|label|raw|}}}} }} | ||
== Problem | == Problem statement == | ||
{{#invoke:Wd|property|P1604|}} | {{#invoke:Wd|property|P1604|}} | ||
=== Object of | === Object of research and objective === | ||
{{#invoke:wd|description}} | {{#invoke:wd|description}} | ||
=== Involved | === Involved disciplines === | ||
< | <ol>{{#invoke:wd|properties|P437|format=<li>%p</li>}}</ol> | ||
== Model == | |||
<div class="no-pagination no-filter"> | |||
{{#sparql: | |||
PREFIX mdb: <https://mardi4nfdi.de/mathmoddb#> | |||
SELECT ?Label ?Description ?Time ?Space WHERE { | |||
wd:{{#invoke:Wd|label|raw|}} wdt:P557 ?item . | |||
?item wdt:P31 wd:Q68663; | |||
wdt:P188 ?url; | |||
rdfs:label ?Label. | |||
SERVICE <https://sparql.mtsr2024.m1.mardi.ovh/mathalgodb/query> { | |||
?url rdfs:comment ?Description; | |||
OPTIONAL {?url mdb:isTimeContinuous ?isTimeContinuous.} | |||
BIND( | |||
IF(BOUND(?isTimeContinuous), | |||
IF(?isTimeContinuous = true, "continuous", "discrete"), | |||
"independent") AS ?Time ) | |||
OPTIONAL {?url mdb:isSpaceContinuous ?isSpaceContinuous.} | |||
BIND( | |||
IF(BOUND(?isSpaceContinuous), | |||
IF(?isSpaceContinuous = true, "continuous", "discrete"), | |||
"independent") AS ?Space ) | |||
} | |||
} | |||
| chart=bordercloud.visualization.DataTable | |||
}} | |||
</div> | |||
=== Variables === | |||
{{#sparql: | |||
PREFIX mdb: <https://mardi4nfdi.de/mathmoddb#> | |||
SELECT ?Name ?Unit ?Symbol ?Task (?Type AS ?Dependency_Type) WHERE { | |||
# Starting from the central item | |||
wd:{{#invoke:Wd|label|raw|}} wdt:P557 ?centralItem . | |||
?centralItem wdt:P31 wd:Q68663; | |||
wdt:P188 ?url; | |||
rdfs:label ?Label. | |||
# Service query to get tasks and connect them to quantities | |||
SERVICE <https://sparql.mtsr2024.m1.mardi.ovh/mathalgodb/query> { | |||
?url mdb:appliedByTask ?task . | |||
?task rdfs:label ?Task . | |||
# Define type based on connection type (Input or Output) | |||
{ | |||
?task mdb:containsInput ?item . | |||
?item rdfs:label ?Name . | |||
BIND("independent" AS ?Type) | |||
} | |||
UNION | |||
{ | |||
?task mdb:containsOutput ?item . | |||
?item rdfs:label ?Name . | |||
BIND("dependent" AS ?Type) | |||
} | |||
# Filter results to only show defining statements that match the current quantity label | |||
OPTIONAL { | |||
?task mdb:containsFormulation ?formulation . | |||
?formulation mdb:inDefiningFormulation ?definingStatement . | |||
# Convert definingStatement to a plain string to strip off datatype markup | |||
BIND(STR(?definingStatement) AS ?plainStatement) | |||
# Clean up spaces around commas, making the format consistent | |||
BIND(REPLACE(?plainStatement, "\\s*,\\s*", ",") AS ?cleanedStatement) | |||
# Extract symbol and quantity label | |||
BIND(STRBEFORE(?cleanedStatement, ",") AS ?Symbolraw) | |||
BIND(STRAFTER(?cleanedStatement, ",") AS ?quantityLabel) | |||
BIND(REPLACE(?Symbolraw, "\\$", "") AS ?cleanSymbol) | |||
BIND(CONCAT("<math>", ?cleanSymbol, "</math>") AS ?Symbol) | |||
} | |||
BIND(STR(?Name) AS ?plainItemLabel) | |||
FILTER(?quantityLabel = ?plainItemLabel) | |||
} | |||
# Initialize the Unit variable as empty | |||
BIND("" AS ?Unit) | |||
} | |||
ORDER BY ?taskLabel ?itemLabel | |||
| chart=bordercloud.visualization.DataTable | |||
}} | |||
=== Parameters === | |||
{{#sparql: | |||
PREFIX mdb: <https://mardi4nfdi.de/mathmoddb#> | |||
SELECT ?Name ?Unit ?Symbol WHERE { | |||
# Starting from the central item | |||
wd:{{#invoke:Wd|label|raw|}} wdt:P557 ?centralItem . | |||
?centralItem wdt:P31 wd:Q68663; | |||
wdt:P188 ?url; | |||
rdfs:label ?Label. | |||
# Service query to get tasks and connect them to parameters | |||
SERVICE <https://sparql.mtsr2024.m1.mardi.ovh/mathalgodb/query> { | |||
?url mdb:appliedByTask ?task . | |||
?task rdfs:label ?Task . | |||
# Retrieve parameters associated with the task | |||
?task mdb:containsParameter ?item . | |||
?item rdfs:label ?Name . | |||
# Filter results to only show defining statements that match the current quantity label | |||
OPTIONAL { | |||
?task mdb:containsFormulation ?formulation . | |||
?formulation mdb:inDefiningFormulation ?definingStatement . | |||
# Convert definingStatement to a plain string to strip off datatype markup | |||
BIND(STR(?definingStatement) AS ?plainStatement) | |||
# Clean up spaces around commas, making the format consistent | |||
BIND(REPLACE(?plainStatement, "\\s*,\\s*", ",") AS ?cleanedStatement) | |||
# Extract symbol and quantity label | |||
BIND(STRBEFORE(?cleanedStatement, ",") AS ?Symbolraw) | |||
BIND(STRAFTER(?cleanedStatement, ",") AS ?quantityLabel) | |||
BIND(REPLACE(?Symbolraw, "\\$", "") AS ?cleanSymbol) | |||
BIND(CONCAT("<math>", ?cleanSymbol, "</math>") AS ?Symbol) | |||
} | |||
# Initialize the Unit variable as empty | |||
BIND("" AS ?Unit) | |||
} | |||
} | |||
ORDER BY ?Name | |||
| chart=bordercloud.visualization.DataTable | |||
}} | |||
== Process information == | |||
=== Process steps === | |||
<div class="no-pagination no-filter"> | |||
{{#sparql: | |||
SELECT ?Number | |||
?Name | |||
?Description | |||
(GROUP_CONCAT(DISTINCT ?inputLink; separator=", ") AS ?Input) | |||
(GROUP_CONCAT(DISTINCT ?outputLink; separator=", ") AS ?Output) | |||
(GROUP_CONCAT(DISTINCT ?methodLink; separator=", ") AS ?Method) | |||
(GROUP_CONCAT(DISTINCT ?environmentLabel; separator=", ") AS ?Environment) | |||
(GROUP_CONCAT(DISTINCT ?disciplineLink; separator=", ") AS ?Discipline) | |||
WHERE { | |||
# Get Step Label and Description | |||
wd:{{#invoke:Wd|label|raw|}} p:P557 ?mainStatement. | |||
?mainStatement ps:P557 ?stepID. | |||
?stepID wdt:P31 wd:Q6486603. | |||
?stepID rdfs:label ?NameLabel. | |||
FILTER (lang(?NameLabel) = 'en') | |||
BIND(replace( xsd:string(?stepID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?qid) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?qid,'\'>',?NameLabel,'</a>') as ?Name) | |||
?mainStatement pq:P146 ?Number. | |||
OPTIONAL { | |||
?stepID schema:description ?Description. | |||
FILTER (lang(?Description) = 'en') | |||
} | |||
# Get Step Input(s) | |||
OPTIONAL { | |||
?stepID wdt:P1605 ?inputID. | |||
?inputID rdfs:label ?inputLabel. | |||
FILTER (lang(?inputLabel) = 'en') | |||
BIND(replace( xsd:string(?inputID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?inputQID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?inputQID,'\'>',?inputLabel,'</a>') as ?inputLink) | |||
} | |||
# Get Step Output(s) | |||
OPTIONAL { | |||
?stepID wdt:P1606 ?outputID. | |||
?outputID rdfs:label ?outputLabel. | |||
FILTER (lang(?outputLabel) = 'en') | |||
BIND(replace( xsd:string(?outputID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?outputQID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?outputQID,'\'>',?outputLabel,'</a>') as ?outputLink) | |||
} | |||
# Get Step Method(s) | |||
OPTIONAL { | |||
?stepID wdt:P557 ?methodID. | |||
?methodID wdt:P31 wd:Q68669. | |||
?methodID rdfs:label ?methodLabel. | |||
FILTER (lang(?methodLabel) = 'en') | |||
BIND(replace( xsd:string(?methodID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?methodQID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?methodQID,'\'>',?methodLabel,'</a>') as ?methodLink) | |||
} | |||
# Get Step Environment(s) | |||
OPTIONAL { | |||
?stepID wdt:P143 ?environmentID. | |||
?environmentID rdfs:label ?environmentLabel. | |||
FILTER (lang(?environmentLabel) = 'en') | |||
} | |||
# Get Step Discipline | |||
OPTIONAL { | |||
?stepID wdt:P437 ?fieldID. | |||
?fieldID rdfs:label ?fieldLabel. | |||
FILTER (lang(?fieldLabel) = 'en') | |||
BIND(replace( xsd:string(?fieldID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?fieldQID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?fieldQID,'\'>',?fieldLabel,'</a>') as ?fieldLink) | |||
} | |||
OPTIONAL { | |||
?stepID wdt:P226 ?mscID. | |||
} | |||
BIND(COALESCE(?fieldLink, ?mscID) AS ?disciplineLink) | |||
} GROUP BY ?Name ?Description ?Number | |||
ORDER BY ASC(?Number) | |||
| chart=bordercloud.visualization.DataTable | |||
| options=width=100%! | |||
}} | |||
</div> | |||
=== Applied methods === | |||
<div class='no-pagination no-filter'> | |||
{{#sparql: | |||
SELECT ?ID | |||
?Name | |||
?Description | |||
(GROUP_CONCAT(DISTINCT ?stepLink; separator=", ") AS ?ProcessStep) | |||
(GROUP_CONCAT(DISTINCT ?softwareLink; separator=", ") AS ?ImplementedBy) | |||
WHERE { | |||
# Get Method Label and Description | |||
wd:{{#invoke:Wd|label|raw|}} p:P557 ?mainStatement. | |||
?mainStatement ps:P557 ?methodID. | |||
?methodID wdt:P31 wd:Q68669. | |||
?methodID rdfs:label ?NameLabel. | |||
FILTER (lang(?NameLabel) = 'en') | |||
BIND(replace( xsd:string(?methodID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?qid) | |||
BIND (CONCAT('mardi:','<a href=\'/wiki/Item:',?qid,'\'>',?qid,'</a>') as ?ID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?qid,'\'>',?NameLabel,'</a>') as ?Name) | |||
OPTIONAL { | |||
?methodID schema:description ?Description. | |||
FILTER (lang(?Description) = 'en') | |||
} | |||
# Get Software | |||
OPTIONAL { | |||
?mainStatement pq:P147 ?softwareID. | |||
?softwareID rdfs:label ?softwareLabel. | |||
FILTER (lang(?softwareLabel) = 'en') | |||
BIND(replace( xsd:string(?softwareID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?softwareQID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?softwareQID,'\'>',?softwareLabel,'</a>') as ?softwareLink) | |||
} | |||
# Get Process Step | |||
OPTIONAL { | |||
?stepID wdt:P557 ?methodID. | |||
?stepID rdfs:label ?stepLabel. | |||
FILTER (lang(?stepLabel) = 'en') | |||
BIND(replace( xsd:string(?stepID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?stepQID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?stepQID,'\'>',?stepLabel,'</a>') as ?stepLink) | |||
} | |||
} | |||
GROUP BY ?ID ?Name ?Description | |||
| chart=bordercloud.visualization.DataTable | |||
| options=width=100%! | |||
}} | |||
</div> | |||
=== Software used === | |||
<div class='no-pagination no-filter'> | |||
{{#sparql: | |||
SELECT ?ID | |||
?Name | |||
?Description | |||
?Version | |||
(GROUP_CONCAT(DISTINCT ?plLink; separator=", ") AS ?ProgrammingLanguage) | |||
WHERE { | |||
# Get Software Label and Description | |||
wd:{{#invoke:Wd|label|raw|}} p:P557 ?mainStatement. | |||
?mainStatement ps:P557 ?softwareID. | |||
?softwareID wdt:P1460 wd:Q5976450. | |||
?softwareID rdfs:label ?NameLabel. | |||
FILTER (lang(?NameLabel) = 'en') | |||
BIND(replace( xsd:string(?softwareID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?qid) | |||
BIND (CONCAT('mardi:','<a href=\'/wiki/Item:',?qid,'\'>',?qid,'</a>') as ?ID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?qid,'\'>',?NameLabel,'</a>') as ?Name) | |||
OPTIONAL { | |||
?softwareID schema:description ?Description. | |||
FILTER (lang(?Description) = 'en') | |||
} | |||
# Get Software Version | |||
OPTIONAL { | |||
?mainStatement pq:P132 ?Version. | |||
} | |||
# Get Programming Language | |||
OPTIONAL { | |||
?softwareID wdt:P114 ?plID. | |||
?plID rdfs:label ?plLabel. | |||
FILTER (lang(?plLabel) = 'en') | |||
BIND(replace( xsd:string(?plID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?plQID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?plQID,'\'>',?plLabel,'</a>') as ?plLink) | |||
} | |||
} | |||
GROUP BY ?ID ?Name ?Description ?Version | |||
| chart=bordercloud.visualization.DataTable | |||
| options=width=100%! | |||
}} | |||
</div> | |||
=== Hardware === | |||
<div class='no-pagination no-filter'> | |||
{{#sparql: | |||
SELECT ?ID | |||
?Name | |||
?Description | |||
(GROUP_CONCAT(DISTINCT ?processorLink; separator=", ") AS ?Processor) | |||
(GROUP_CONCAT(DISTINCT ?nodes; separator=", ") AS ?NumberOfNodes) | |||
(GROUP_CONCAT(DISTINCT ?cores; separator=", ") AS ?NumberOfCores) | |||
WHERE { | |||
# Get Hardware Label and Description | |||
wd:{{#invoke:Wd|label|raw|}} p:P557 ?mainStatement. | |||
?mainStatement ps:P557 ?hardwareID. | |||
?hardwareID wdt:P31 wd:Q56583. | |||
?hardwareID rdfs:label ?NameLabel. | |||
FILTER (lang(?NameLabel) = 'en') | |||
BIND(replace( xsd:string(?hardwareID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?qid) | |||
BIND (CONCAT('mardi:','<a href=\'/wiki/Item:',?qid,'\'>',?qid,'</a>') as ?ID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?qid,'\'>',?NameLabel,'</a>') as ?Name) | |||
OPTIONAL { | |||
?hardwareID schema:description ?Description. | |||
FILTER (lang(?Description) = 'en') | |||
} | |||
# Get Processors(s), Nodes and Cores | |||
OPTIONAL { | |||
?hardwareID p:P1540 ?mainStatement2. | |||
?mainStatement2 ps:P1540 ?processorID. | |||
?processorID rdfs:label ?processorLabel. | |||
?processorID wdt:P1565 ?cores. | |||
FILTER (lang(?processorLabel) = 'en') | |||
BIND(replace( xsd:string(?processorID), | |||
'https://portal.mardi4nfdi.de/entity/', | |||
'') as ?processorQID) | |||
BIND (CONCAT('<a href=\'/wiki/Item:',?processorQID,'\'>',?processorLabel,'</a>') as ?processorLink) | |||
# Get Number of Nodes | |||
OPTIONAL { | |||
?mainStatement2 pq:P149 ?nodes. | |||
} | |||
} | |||
} | |||
GROUP BY ?ID ?Name ?Description | |||
| chart=bordercloud.visualization.DataTable | |||
| options=width=100%! | |||
}} | |||
</div> | |||
=== Input data === | |||
=== Output data === |
Latest revision as of 12:02, 31 October 2024