Skip to content

Commit

Permalink
fix: update hMAS ontology URI from /hmas/core/ to /hmas/
Browse files Browse the repository at this point in the history
  • Loading branch information
cake-lier committed Jan 20, 2024
1 parent ff8d6b0 commit f9050d5
Show file tree
Hide file tree
Showing 40 changed files with 63 additions and 63 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ curl -i -X POST \
http://localhost:8080/workspaces/ \
-H 'content-type: text/turtle' \
-H 'slug: wksp1' \
-d '<> a <https://purl.org/hmas/core/Workspace> .'
-d '<> a <https://purl.org/hmas/Workspace> .'
```

When retrieving the representation of a resource from Yggdrasil, the HTTP response contains 2 `Link`
Expand All @@ -101,9 +101,9 @@ Link: <http://yggdrasil.andreiciortea.ro/hub>; rel="hub"
Link: <http://yggdrasil.andreiciortea.ro/workspaces/wksp1>; rel="self"

<http://yggdrasil.andreiciortea.ro/workspaces/wksp1>
a <https://purl.org/hmas/core/Workspace> ;
<https://purl.org/hmas/core/hasName> "wksp1" ;
<https://purl.org/hmas/core/contains>
a <https://purl.org/hmas/Workspace> ;
<https://purl.org/hmas/hasName> "wksp1" ;
<https://purl.org/hmas/contains>
<http://85.204.10.233:8080/artifacts/hue1> ,
<http://yggdrasil.andreiciortea.ro/artifacts/event-gen> .
```
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/c0_counter_artifact_sub_td.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/sub/artifacts/c0> a td:Thing, <http://example.org/Counter>,
hmas:Artifact;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/output_sub_workspace_td.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/sub> a td:Thing, hmas:Workspace;
td:title "sub";
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/output_test_workspace_td.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/platform_test_td.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/sub_workspace_c0_td.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/sub> a td:Thing, hmas:Workspace;
td:title "sub";
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/sub_workspace_td.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/sub> a td:Thing, hmas:Workspace;
td:title "sub";
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/test_workspace_sub_td.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/test_workspace_td.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/test> a td:Thing, hmas:Workspace;
td:title "test";
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil-cartago/src/test/resources/a0_adder_artifact.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/test/artifacts/a0> a td:Thing, <http://example.org/Adder>,
hmas:Artifact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/test/artifacts/c0> a td:Thing, <http://example.org/Counter>,
hmas:Artifact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/sub/artifacts/c1> a td:Thing, <http://example.org/Counter>,
hmas:Artifact;
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil-cartago/src/test/resources/sub2_workspace_td.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/sub2> a td:Thing, hmas:Workspace;
td:title "sub2";
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil-cartago/src/test/resources/sub_workspace_td.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/sub> a td:Thing, hmas:Workspace;
td:title "sub";
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil-cartago/src/test/resources/test_workspace_td.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/test> a td:Thing, hmas:Workspace;
td:title "test";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ private void createEntity(final RoutingContext context, final String entityRepre
entityGraph.contains(
entityIri,
RdfModelUtils.createIri(RDF.TYPE.stringValue()),
RdfModelUtils.createIri("https://purl.org/hmas/core/Artifact")
RdfModelUtils.createIri("https://purl.org/hmas/Artifact")
)
) {
this.rdfStoreMessagebox
Expand All @@ -493,7 +493,7 @@ private void createEntity(final RoutingContext context, final String entityRepre
entityGraph.contains(
entityIri,
RdfModelUtils.createIri(RDF.TYPE.stringValue()),
RdfModelUtils.createIri("https://purl.org/hmas/core/Workspace")
RdfModelUtils.createIri("https://purl.org/hmas/Workspace")
)
) {
this.rdfStoreMessagebox
Expand All @@ -504,7 +504,7 @@ private void createEntity(final RoutingContext context, final String entityRepre
.filter(t ->
t.getSubject().equals(entityIri)
&& t.getPredicate().equals(RdfModelUtils.createIri(
"https://purl.org/hmas/core/isContainedIn"
"https://purl.org/hmas/isContainedIn"
))
)
.map(Statement::getObject)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
*/
public class RdfStoreVerticle extends AbstractVerticle {
private static final Logger LOGGER = LogManager.getLogger(RdfStoreVerticle.class);
private static final String WORKSPACE_HMAS_IRI = "https://purl.org/hmas/core/Workspace";
private static final String CONTAINS_HMAS_IRI = "https://purl.org/hmas/core/contains";
private static final String WORKSPACE_HMAS_IRI = "https://purl.org/hmas/Workspace";
private static final String CONTAINS_HMAS_IRI = "https://purl.org/hmas/contains";

private Messagebox<HttpNotificationDispatcherMessage> dispatcherMessagebox;
private RdfStore store;
Expand Down Expand Up @@ -176,7 +176,7 @@ private void handleCreateArtifact(
);
entityModel.add(
entityIri,
RdfModelUtils.createIri("https://purl.org/hmas/core/isContainedIn"),
RdfModelUtils.createIri("https://purl.org/hmas/isContainedIn"),
workspaceIri
);
entityModel.add(
Expand All @@ -195,7 +195,7 @@ private void handleCreateArtifact(
workspaceModel.add(
entityIri,
RdfModelUtils.createIri(RDF.TYPE.toString()),
RdfModelUtils.createIri("https://purl.org/hmas/core/Artifact")
RdfModelUtils.createIri("https://purl.org/hmas/Artifact")
);
this.store.replaceEntityModel(workspaceIri, workspaceModel);
this.dispatcherMessagebox.sendMessage(
Expand Down Expand Up @@ -247,7 +247,7 @@ private void handleCreateWorkspace(
final var parentIri = RdfModelUtils.createIri(content.parentWorkspaceUri().get());
entityModel.add(
entityIri,
RdfModelUtils.createIri("https://purl.org/hmas/core/isContainedIn"),
RdfModelUtils.createIri("https://purl.org/hmas/isContainedIn"),
parentIri
);
entityModel.add(
Expand Down Expand Up @@ -283,20 +283,20 @@ private void handleCreateWorkspace(
);
entityModel.add(
entityIri,
RdfModelUtils.createIri("https://purl.org/hmas/core/isHostedOn"),
RdfModelUtils.createIri("https://purl.org/hmas/isHostedOn"),
platformIri
);
entityModel.add(
platformIri,
RdfModelUtils.createIri(RDF.TYPE.toString()),
RdfModelUtils.createIri("https://purl.org/hmas/core/HypermediaMASPlatform")
RdfModelUtils.createIri("https://purl.org/hmas/HypermediaMASPlatform")
);
this.store
.getEntityModel(platformIri)
.ifPresent(Failable.asConsumer(platformModel -> {
platformModel.add(
platformIri,
RdfModelUtils.createIri("https://purl.org/hmas/core/hosts"),
RdfModelUtils.createIri("https://purl.org/hmas/hosts"),
entityIri
);
platformModel.add(
Expand Down Expand Up @@ -365,7 +365,7 @@ private void handleDeleteEntity(final IRI requestIri, final Message<RdfStoreMess
if (entityModel.contains(
requestIri,
RdfModelUtils.createIri(RDF.TYPE.stringValue()),
RdfModelUtils.createIri("https://purl.org/hmas/core/Artifact")
RdfModelUtils.createIri("https://purl.org/hmas/Artifact")
)) {
final var artifactIri = requestIri.toString();
final var workspaceIri =
Expand All @@ -383,7 +383,7 @@ private void handleDeleteEntity(final IRI requestIri, final Message<RdfStoreMess
workspaceModel.remove(
requestIri,
RdfModelUtils.createIri(RDF.TYPE.toString()),
RdfModelUtils.createIri("https://purl.org/hmas/core/Artifact")
RdfModelUtils.createIri("https://purl.org/hmas/Artifact")
);
this.store.replaceEntityModel(workspaceIri, workspaceModel);
this.dispatcherMessagebox.sendMessage(
Expand Down Expand Up @@ -411,15 +411,15 @@ private void handleDeleteEntity(final IRI requestIri, final Message<RdfStoreMess
);
if (entityModel.contains(
requestIri,
RdfModelUtils.createIri("https://purl.org/hmas/core/isHostedOn"),
RdfModelUtils.createIri("https://purl.org/hmas/isHostedOn"),
platformIri
)) {
this.store
.getEntityModel(platformIri)
.ifPresent(Failable.asConsumer(platformModel -> {
platformModel.remove(
platformIri,
RdfModelUtils.createIri("https://purl.org/hmas/core/hosts"),
RdfModelUtils.createIri("https://purl.org/hmas/hosts"),
requestIri
);
platformModel.remove(
Expand All @@ -439,7 +439,7 @@ private void handleDeleteEntity(final IRI requestIri, final Message<RdfStoreMess
entityModel
.filter(
requestIri,
RdfModelUtils.createIri("https://purl.org/hmas/core/isContainedIn"),
RdfModelUtils.createIri("https://purl.org/hmas/isContainedIn"),
null
)
.objects()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class QueryHttpHandlersTest {
private static final String QUERY =
"""
PREFIX td: <https://www.w3.org/2019/wot/td#>
PREFIX hmas: <https://purl.org/hmas/core/>
PREFIX hmas: <https://purl.org/hmas/>
PREFIX ex: <http://example.org/>
ASK WHERE {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private Future<Message<String>> testTupleQueryRequest(
.sendMessage(new RdfStoreMessage.QueryKnowledgeGraph(
"""
PREFIX td: <https://www.w3.org/2019/wot/td#>
PREFIX hmas: <https://purl.org/hmas/core/>
PREFIX hmas: <https://purl.org/hmas/>
PREFIX ex: <http://example.org/>
SELECT ?workspace ?artifact
Expand Down Expand Up @@ -338,7 +338,7 @@ private Future<Message<String>> testBooleanQueryRequest(
.sendMessage(new RdfStoreMessage.QueryKnowledgeGraph(
"""
PREFIX td: <https://www.w3.org/2019/wot/td#>
PREFIX hmas: <https://purl.org/hmas/core/>
PREFIX hmas: <https://purl.org/hmas/>
PREFIX ex: <http://example.org/>
ASK WHERE {
Expand Down Expand Up @@ -424,7 +424,7 @@ private Future<Message<String>> testGraphQueryRequest(
.sendMessage(new RdfStoreMessage.QueryKnowledgeGraph(
"""
PREFIX td: <https://www.w3.org/2019/wot/td#>
PREFIX hmas: <https://purl.org/hmas/core/>
PREFIX hmas: <https://purl.org/hmas/>
PREFIX ex: <http://example.org/>
DESCRIBE ?workspace ?artifact
Expand Down Expand Up @@ -556,7 +556,7 @@ private Future<Message<String>> testQueryRequestWithUnassignedBinding(
.sendMessage(new RdfStoreMessage.QueryKnowledgeGraph(
"""
PREFIX td: <https://www.w3.org/2019/wot/td#>
PREFIX hmas: <https://purl.org/hmas/core/>
PREFIX hmas: <https://purl.org/hmas/>
PREFIX ex: <http://example.org/>
SELECT ?workspace ?artifact
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil-core/src/test/resources/a0_adder_artifact.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/test/artifacts/a0> a td:Thing, <http://example.org/Adder>,
hmas:Artifact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/sub/artifacts/c0> a td:Thing, <http://example.org/Counter>,
hmas:Artifact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/test/artifacts/c0> a td:Thing, <http://example.org/Counter>,
hmas:Artifact;
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil-core/src/test/resources/default_query_result.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil-core/src/test/resources/named_query_result.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/test/artifacts/c0> a td:Thing, <http://example.org/Counter>,
hmas:Artifact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/workspaces/sub> a td:Thing, hmas:Workspace;
td:title "sub";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil-core/src/test/resources/platform_td.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@prefix wotsec: <https://www.w3.org/2019/wot/security#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix js: <https://www.w3.org/2019/wot/json-schema#> .
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .

<http://localhost:8080/> a td:Thing, hmas:HypermediaMASPlatform;
td:title "yggdrasil";
Expand Down
2 changes: 1 addition & 1 deletion yggdrasil-core/src/test/resources/platform_test_td.ttl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@prefix hmas: <https://purl.org/hmas/core/> .
@prefix hmas: <https://purl.org/hmas/> .
@prefix td: <https://www.w3.org/2019/wot/td#> .
@prefix htv: <http://www.w3.org/2011/http#> .
@prefix hctl: <https://www.w3.org/2019/wot/hypermedia#> .
Expand Down
Loading

0 comments on commit f9050d5

Please sign in to comment.