Template:Workflow: Difference between revisions

From MaRDI portal
T4 reidelbach (talk | contribs)
T4 reidelbach (talk | contribs)
 
(2 intermediate revisions by the same user not shown)
Line 46: Line 46:
   # Starting from the central item
   # Starting from the central item
   wd:{{#invoke:Wd|label|raw|}} p:P557 ?statement.
   wd:{{#invoke:Wd|label|raw|}} p:P557 ?statement.
   ?statement ps:557 ?model.
   ?statement ps:P557 ?model.
   ?statement pq:147 task.
   ?statement pq:P147 ?task.
   ?model wdt:P31 wd:Q68663.
   ?model wdt:P31 wd:Q68663.


Line 78: Line 78:
             ?inner_inner_statement ps:P983 ?Symbol.
             ?inner_inner_statement ps:P983 ?Symbol.
             ?inner_inner_statement pq:P984 ?quantity
             ?inner_inner_statement pq:P984 ?quantity
            FILTER (?quantity = ?item)
         }
         }
          
         FILTER (?quantity = ?item)
    }
 
    # Initialize the Unit variable as empty
     BIND("" AS ?Unit)
     BIND("" AS ?Unit)
}
}
Line 92: Line 90:
=== Parameters ===
=== Parameters ===
{{#sparql:
{{#sparql:
PREFIX mdb: <https://mardi4nfdi.de/mathmoddb#>
SELECT ?Name ?Unit ?Symbol ?Task WHERE {
SELECT ?Name ?Unit ?Symbol WHERE {
   # Starting from the central item
   # Starting from the central item
   wd:{{#invoke:Wd|label|raw|}} wdt:P557 ?centralItem .
   wd:{{#invoke:Wd|label|raw|}} p:P557 ?statement.
   ?centralItem wdt:P31 wd:Q68663;
  ?statement ps:P557 ?model.
                wdt:P188 ?url;
   ?statement pq:P147 ?task.
                rdfs:label ?Label.
  ?model wdt:P31 wd:Q68663.


   # Service query to get tasks and connect them to parameters
   ?task rdfs:label ?Task .
  SERVICE <https://sparql.mtsr2024.m1.mardi.ovh/mathalgodb/query> {
        ?url mdb:appliedByTask ?task .
        ?task rdfs:label ?Task .
          
          
         # Retrieve parameters associated with the task
         # Define type based on connection type (Parameter)
         ?task mdb:containsParameter ?item .
        ?task p:P1560 ?inner_statement .
         ?inner_statement ps:P1560 ?item.
        ?inner_statement pq:P560 ?role.
        FILTER (?role = wd:Q6480341)
         ?item rdfs:label ?Name .
         ?item rdfs:label ?Name .
          
          
         # Filter results to only show defining statements that match the current quantity label
         # Filter results to only show defining statements that match the current quantity label
         OPTIONAL {
         OPTIONAL {
             ?task mdb:containsFormulation ?formulation .
             ?task wdt:P1560 ?formulation.
             ?formulation mdb:inDefiningFormulation ?definingStatement .
             ?formulation wdt:P31 wd:Q6481152.
 
             ?formulation p:P983 ?inner_inner_statement .
             # Convert definingStatement to a plain string to strip off datatype markup
             ?inner_inner_statement ps:P983 ?Symbol.
            BIND(STR(?definingStatement) AS ?plainStatement)
             ?inner_inner_statement pq:P984 ?quantity
 
            # 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("&lt;math&gt;", ?cleanSymbol, "&lt;/math&gt;") AS ?Symbol)
         }
         }
        FILTER (?quantity = ?item)


        # Initialize the Unit variable as empty
    BIND("" AS ?Unit)
        BIND("" AS ?Unit)
    }
}
}
ORDER BY ?Name
ORDER BY ?task ?item| chart=bordercloud.visualization.DataTable
| chart=bordercloud.visualization.DataTable
| endpoint=https://query.portal.mardi4nfdi.de/proxy/wdqs/bigdata/namespace/wdq/sparql
| endpoint=https://query.portal.mardi4nfdi.de/proxy/wdqs/bigdata/namespace/wdq/sparql
}}
}}
Line 239: Line 224:
</div>
</div>


=== Algorithms ===
=== Methods ===
<div class='no-pagination no-filter'>
<div class='no-pagination no-filter'>
{{#sparql:
{{#sparql:

Latest revision as of 12:10, 28 April 2025


Available identifiers

Problem statement

Object of research and objective

Involved disciplines

    Model

    Variables

    Parameters

    Process information

    Process steps

    Methods

    Software

    Hardware

    Data Sets

    Reproducibility