Template:Workflow: Difference between revisions

From MaRDI portal
T4 reidelbach (talk | contribs)
T4 reidelbach (talk | contribs)
 
(9 intermediate revisions by the same user not shown)
Line 16: Line 16:
<div class="no-pagination no-filter">
<div class="no-pagination no-filter">
{{#sparql:
{{#sparql:
PREFIX mdb: <https://mardi4nfdi.de/mathmoddb#>
SELECT ?Label ?Description ?Time ?Space WHERE {
SELECT ?Label ?Description ?Time ?Space WHERE {
   wd:{{#invoke:Wd|label|raw|}} wdt:P557 ?item .
   wd:{{#invoke:Wd|label|raw|}} wdt:P557 ?item .
   ?item wdt:P31 wd:Q68663;
   ?item wdt:P31 wd:Q68663;
        wdt:P188 ?url;
         rdfs:label ?Label;
         rdfs:label ?Label.
        schema:description ?Description;
  SERVICE <https://sparql.mtsr2024.m1.mardi.ovh/mathalgodb/query> {
        BIND(
        ?url rdfs:comment ?Description;
              IF(EXISTS { ?item wdt:P31 wd:Q6672091 }, "continuous",
        OPTIONAL {?url mdb:isTimeContinuous ?isTimeContinuous.}
                        IF(EXISTS { ?item wdt:P31 wd:Q6672095 }, "discrete",  
          BIND(
                        "independent"
                IF(BOUND(?isTimeContinuous),
                          )
                IF(?isTimeContinuous = true, "continuous", "discrete"),
                 ) AS ?Time
                 "independent") AS ?Time )
            )
        OPTIONAL {?url mdb:isSpaceContinuous ?isSpaceContinuous.}
        BIND(
            BIND(
              IF(EXISTS { ?item wdt:P31 wd:Q6672089 }, "continuous",
                IF(BOUND(?isSpaceContinuous),
                        IF(EXISTS { ?item wdt:P31 wd:Q6672093 }, "discrete",  
                IF(?isSpaceContinuous = true, "continuous", "discrete"),
                        "independent"
                    "independent") AS ?Space )
                          )
  }
                ) AS ?Space
            )            
}
}
| chart=bordercloud.visualization.DataTable
| chart=bordercloud.visualization.DataTable
Line 44: Line 43:
=== Variables ===
=== Variables ===
{{#sparql:
{{#sparql:
PREFIX mdb: <https://mardi4nfdi.de/mathmoddb#>
SELECT ?Name ?Unit ?Symbol ?Task (?Type AS ?Dependency_Type) WHERE {
SELECT ?Name ?Unit ?Symbol ?Task (?Type AS ?Dependency_Type) 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 quantities
   ?task rdfs:label ?Task .
  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)
         # Define type based on connection type (Input or Output)
         {
         {
             ?task mdb:containsInput ?item .
             ?task p:P1560 ?inner_statement .
            ?inner_statement ps:P1560 ?item.
            ?inner_statement pq:P560 ?role.
            FILTER (?role = wd:Q6480299)
             ?item rdfs:label ?Name .
             ?item rdfs:label ?Name .
             BIND("independent" AS ?Type)
             BIND("independent" AS ?Type)
Line 65: Line 63:
         UNION
         UNION
         {
         {
             ?task mdb:containsOutput ?item .
             ?task p:P1560 ?inner_statement .
            ?inner_statement ps:P1560 ?item.
            ?inner_statement pq:P560 ?role.
            FILTER (?role = wd:Q6480295)
             ?item rdfs:label ?Name .
             ?item rdfs:label ?Name .
             BIND("dependent" AS ?Type)
             BIND("dependent" AS ?Type)
Line 72: Line 73:
         # 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 .
            ?inner_inner_statement ps:P983 ?Symbol.
            ?inner_inner_statement pq:P984 ?quantity
        }
        FILTER (?quantity = ?item)


            # 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("&lt;math&gt;", ?cleanSymbol, "&lt;/math&gt;") AS ?Symbol)
         
        }
        BIND(STR(?Name) AS ?plainItemLabel)
        FILTER(?quantityLabel = ?plainItemLabel)     
       
    }
    # Initialize the Unit variable as empty
     BIND("" AS ?Unit)
     BIND("" AS ?Unit)
}
}
ORDER BY ?taskLabel ?itemLabel
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 103: 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 207: Line 181:
   OPTIONAL {
   OPTIONAL {
     ?stepID wdt:P557 ?methodID.
     ?stepID wdt:P557 ?methodID.
     ?methodID wdt:P31 wd:Q68669.
     ?methodID wdt:P31 wd:Q127020.
     ?methodID rdfs:label ?methodLabel.
     ?methodID rdfs:label ?methodLabel.
     FILTER (lang(?methodLabel) = 'en')
     FILTER (lang(?methodLabel) = 'en')
Line 250: Line 224:
</div>
</div>


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


=== Software used ===
=== Software ===
<div class='no-pagination no-filter'>
<div class='no-pagination no-filter'>
{{#sparql:
{{#sparql:
Line 397: Line 371:
       (GROUP_CONCAT(DISTINCT ?nodes; separator=", ") AS ?Node_Number)
       (GROUP_CONCAT(DISTINCT ?nodes; separator=", ") AS ?Node_Number)
       (GROUP_CONCAT(DISTINCT ?cores; separator=", ") AS ?Core_Number)
       (GROUP_CONCAT(DISTINCT ?cores; separator=", ") AS ?Core_Number)
      (GROUP_CONCAT(DISTINCT ?softwareLink; separator=", ") AS ?Software)
        
        
WHERE {
WHERE {
Line 435: Line 410:
   }
   }
    
    
  OPTIONAL {
    wd:{{#invoke:Wd|label|raw|}} p:P557 ?softwareStatement.
    ?softwareStatement ps:P557 ?softwareID;
                      pq:P143 ?hardwareID.
    ?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)
  }
}
}
GROUP BY ?ID ?Name ?Description
GROUP BY ?ID ?Name ?Description

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