I first described how the UriLayer/SegmentLayer worked back in January. Since then the details have changed a bit. The key points are described below:
- URI segment names can be established by using a word prefixed with ~ at the beginning of a group. So [~foo a b c] causes the segment name of the group to be foo. The change from January is that it was foo~ (suffix instead of prefix) back then. Arguably, /foo or foo/ would be a clearer way of indicating segment name.
- In the demo I forgot to talk about the '!' character. This is used to indicate the point at which you move from the filesystem into the model (in EMF terms, it's perhaps like going from the EResource to one of the logical elements - like an EPackage - inside the resource).
- To continue with the last point
- /demo/site.gem identifies a model file (or just some arbitrary file).
- /demo/site.gem! identifies the Model element (the root node in the model).
- /demo/site.gem!/ identifies the Figure inside the Model.
- /demo/site.gem!/foo identifies a Site with segment name 'foo' inside the root Figure.
- /demo/site.gem!/foo/ identifies the Figure inside the above Site.
- So note from above that the trailing / always indicates a Figure (whereas in January it always indicate a Site).