Multi-User-Domain / mud-jena

0 stars 0 forks source link

Action Server: Transit Action #3

Closed calummackervoy closed 3 years ago

calummackervoy commented 3 years ago

The Transit action is a kind of task which involves changing of a character or party's location

Notes

See this thread on the initial design points

The task is initially planned to use an N3 formula (a node which points to a graph) to describe the changes to world/character state in the endState or consequences of the task. I'm not sure that the clientside will be able to handle it, so we may need to revert to something which can be implemented solely in Turtle

calummackervoy commented 3 years ago

Currently blocked by https://issues.apache.org/jira/browse/JENA-2034

calummackervoy commented 3 years ago

The response seems to be that N3 formulae aren't supported by Jena. It's a shame, I suppose it's a little hacky but for now we can support the functionality without N3 by representing an equivalent to deletes and inserts using turtle, e.g.

<http://localhost:8080/actions/tasks/65/#endState>
        a       <http://www.w3.org/ns/solid/terms#Patch> ;
        <http://www.w3.org/ns/solid/terms#patches>
                <https://calum.inrupt.net/public/collections/characters.ttl#161029123877821644243288363907> ;
        <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudlogic.ttl#inserts>
                <http://localhost:8080/actions/tasks/65c8b2b3be2d4633ace7d06d8e336f72/#characterCopy> . # notice - a copy of the character with the new properties

<http://localhost:8080/actions/tasks/65c8b2b3be2d4633ace7d06d8e336f72/#characterInsert-8a3d0db3332d4f75850a832a645f2680>
        a       <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudchar.ttl#Character> ;
        <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mud.ttl#locatedAt>
                <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mud.ttl#Building> . # new value

<http://localhost:8080/actions/tasks/65c8b2b3be2d4633ace7d06d8e336f72/#task-d6ec313ab678473793a2dda90bf9d9ff>
        a       <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudlogic.ttl#Task> , <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudlogic.ttl#Transit> ;
        <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudlogic.ttl#endState>
                <http://localhost:8080/actions/tasks/65c8b2b3be2d4633ace7d06d8e336f72/#endState-21c0df3333a54f21b0ae3792616cd4aa> ;
        <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudlogic.ttl#taskImplements>
                <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudlogic.ttl#Transit> .