Comments (8)
note: the formatting of this issue-post is hiding some of the TTL ... relates to angle-brackets "<" and ">" marking up hypertext ... edit the page to see everything. What syntax should I use for formatting???
from ukl-registry-poc.
As the error messages says, the problem with the use of relative URIs[*] for updates. If you use the correct absolute URI it should work.
It would seem reasonable to allow <> for update, I'll investigate and add that feature.
[*] Note that in RDF there is technically no such thing as a relative URI. It is just that by leaving the @base out of the payload we can inject it externally at the time the payload is parsed.
Regarding formatting, for the documentation I used textile with "bc. code" for code formatting. With the default markdown syntax you should be able to use block indenting by four spaces
from ukl-registry-poc.
Thanks. I will try with absolute URI. The "bc." formatting doesn't appear to work in issue posts; only the wiki. Maybe I'm missing something.
from ukl-registry-poc.
Ah sorry, you don't seem to be able to switch away from markdown so indent four spaces is the only option.
from ukl-registry-poc.
Re "markdown" ... noted.
from ukl-registry-poc.
Have tried using absolute URIs. This works provided that I also include the reg:notation property that matches.
Also note that this does include the domain-specific additional metadata that I am having trouble adding in issue #39. This works fine and displays in the web UI too under "metadata".
As expected this extra metadata property is applied to the Version (/def/numbers/_eight:1) rather than the VersionedThing (/def/numbers/_eight).
Here's what I did:
file:
@Prefix rdfs: http://www.w3.org/2000/01/rdf-schema# .
@Prefix dct: http://purl.org/dc/terms/ .
@Prefix reg: http://purl.org/linked-data/registry# .
@Prefix skos: http://www.w3.org/2004/02/skos/core# .
@Prefix prov: http://www.w3.org/ns/prov# .
<>
a reg:RegisterItem ;
reg:definition
[ reg:entity http://ukgovld-registry.dnsalias.net/def/numbers/eight
] ;
reg:itemClass skos:Concept ;
reg:register http://ukgovld-registry.dnsalias.net/def/numbers ;
prov:wasAttributedTo http://jeremytandy.me.uk/self#id ;
reg:status reg:statusStable ;
reg:notation "eight" ;
.
http://ukgovld-registry.dnsalias.net/def/numbers/eight
a skos:Concept ;
rdfs:label "eight"@en ;
dct:description "Equivalent to the product of two and four; one more than seven, or two less than ten; 8."@en ;
.
Action:
curl -i -H "Accept:text/plain" -H "Content-Type:text/turtle" -X POST --data "@number-eight-post2.ttl" http://ukgovld-registry.dnsalias.net/def/numbers
Response:
HTTP/1.1 201 Created
Server: nginx/1.2.6
Date: Sun, 03 Mar 2013 15:06:50 GMT
Content-Length: 0
Connection: keep-alive
Location: http://ukgovld-registry.dnsalias.net/def/numbers/_eight
from ukl-registry-poc.
So as far as I can see this all works. I've added test cases based on your example.
With your example:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix reg: <http://purl.org/linked-data/registry#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
<>
a reg:RegisterItem ;
reg:definition
[ reg:entity <http://ukgovld-registry.dnsalias.net/def/numbers/eight>
] ;
reg:itemClass skos:Concept ;
reg:register <http://ukgovld-registry.dnsalias.net/def/numbers> ;
prov:wasAttributedTo <http://jeremytandy.me.uk/self#id> ;
reg:status reg:statusStable ;
reg:notation "eight" ;
.
<http://ukgovld-registry.dnsalias.net/def/numbers/eight>
a skos:Concept ;
rdfs:label "eight"@en ;
dct:description "Equivalent to the product of two and four; one more than seven, or two less than ten; 8."@en ;
.
then you need a notation because you are posting to the register with an empty "relative" URI for the RegisterItem.
It is equally possible to get an explicit URI (relative or absolute) for the RegisterItem and let the registry infer the notation:
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix reg: <http://purl.org/linked-data/registry#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
<_eightb>
a reg:RegisterItem ;
reg:definition
[ reg:entity <http://ukgovld-registry.dnsalias.net/def/numbers/eight>
] ;
reg:itemClass skos:Concept ;
reg:register <http://ukgovld-registry.dnsalias.net/def/numbers> ;
prov:wasAttributedTo <http://jeremytandy.me.uk/self#id> ;
reg:status reg:statusStable ;
.
<http://ukgovld-registry.dnsalias.net/def/numbers/eight>
a skos:Concept ;
rdfs:label "eight"@en ;
dct:description "Equivalent to the product of two and four; one more than seven, or two less than ten; 8."@en ;
.
from ukl-registry-poc.
Closing to tidy up the issues list since I don't think there is a bug here and the test cases now include these examples.
from ukl-registry-poc.
Related Issues (20)
- Configuring a SLAVE Registry instance as "read only"
- Batch-upload that fails during payload validation still creates the Register associated with the collection-root
- (Batch-)upload payload validation requires use of rdfs:label; skos:prefLabel is not sufficient
- Add support for OAuth 2.0 (OpenID Connect) HOT 1
- Additional roles in security model
- API security documentation bug
- Bootstrap duplication
- Remove owner/manager for bootstrap system registers
- Enhancements to release tagging behaviour.
- Requesting version of top-level register (or its register item) using webUI throws HTTP 500 exception HOT 1
- Support subproperties of rdfs:label
- Incomplete listing in native "View" mode
- Modification of NamespaceForward resource (code 200) is redirected to delegationTarget HOT 1
- HTTP 404 error encountered by IE8 users HOT 3
- Code migration and maintenance
- Data dictionary support
- Customisable lifecycle for Register items
- Change text indexing strategy
- Improve security for authenticated users HOT 4
- Propagation of content "patches" from MASTER Registry instance to SLAVE instances HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ukl-registry-poc.