@base <http://yggdrasil.interactions.ics.unisg.ch/> .
@prefix websub: <https://purl.org/hmas/websub/> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/> .
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix jacamo: <https://purl.org/hmas/jacamo/> .
@prefix td: <https://www.w3.org/2019/wot/td#> .

<#platform> a td:Thing, hmas:HypermediaMASPlatform;
  td:title "Yggdrasil Node";
  td:hasSecurityConfiguration [ a wotsec:NoSecurityScheme
    ];
  td:hasActionAffordance [ a td:ActionAffordance, jacamo:createWorkspace;
      td:name "createWorkspace";
      td:hasForm [
          htv:methodName "POST";
          hctl:hasTarget <workspaces/>;
          hctl:forContentType "text/turtle";
          hctl:hasOperationType td:invokeAction
        ]
    ], [ a td:ActionAffordance, jacamo:sparqlGetQuery;
      td:name "sparqlGetQuery";
      td:hasForm [
          htv:methodName "GET";
          hctl:hasTarget <query/>;
          hctl:forContentType "application/sparql-query";
          hctl:hasOperationType td:invokeAction
        ]
    ], [ a td:ActionAffordance, jacamo:sparqlPostQuery;
      td:name "sparqlPostQuery";
      td:hasForm [
          htv:methodName "POST";
          hctl:hasTarget <query/>;
          hctl:forContentType "application/sparql-query";
          hctl:hasOperationType td:invokeAction
        ]
    ], [ a td:ActionAffordance;
      td:name "subscribeToWorkspaces";
      td:hasForm [
          htv:methodName "GET";
          hctl:hasTarget <workspaces/>;
          hctl:forContentType "application/json";
          hctl:hasOperationType td:invokeAction;
          hctl:forSubProtocol "websub"
        ]
    ], [ a td:ActionAffordance, websub:subscribeToPlatform;
      td:name "subscribeToPlatform";
      td:hasForm [
          htv:methodName "POST";
          hctl:hasTarget <hub/>;
          hctl:forContentType "application/json";
          hctl:hasOperationType td:invokeAction;
          hctl:forSubProtocol "websub"
        ];
      td:hasInputSchema [ a js:ObjectSchema;
          js:properties [ a js:StringSchema;
              js:propertyName "mode"
            ], [ a js:StringSchema;
              js:propertyName "topic"
            ], [ a js:StringSchema;
              js:propertyName "callbackIri"
            ]
        ]
    ], [ a td:ActionAffordance, websub:unsubscribeFromPlatform;
      td:name "unsubscribeFromPlatform";
      td:hasForm [
          htv:methodName "POST";
          hctl:hasTarget <hub/>;
          hctl:forContentType "application/json";
          hctl:hasOperationType td:invokeAction;
          hctl:forSubProtocol "websub"
        ];
      td:hasInputSchema [ a js:ObjectSchema;
          js:properties [ a js:StringSchema;
              js:propertyName "mode"
            ], [ a js:StringSchema;
              js:propertyName "topic"
            ], [ a js:StringSchema;
              js:propertyName "callbackIri"
            ]
        ]
    ];
  hmas:hosts <workspaces/61#workspace> .

<> a hmas:ResourceProfile;
  hmas:isProfileOf <#platform> .

<workspaces/61#workspace> a hmas:Workspace .
