[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Handle-info] OpenHandle: An RDF Serializer for Handle
Hi Ed:
Many thanks for the feedback. And you anticipate me - just a touch. ;)
I've been working on the RDF schema. It's still a work in progress but
getting much closer to the original handle RFC. I'll get the schema hooked
into the URL published maybe by next week but for now you can access the
latest public version from here:
http://nurture.nature.com/tony/schemas/handle.rdfs
Like I said a still a "wip" - I've timestamped the version posted. Fwiw,
it's well-formed XML and passes (or parses?) through cwm:
% cwm --rdf handle.rdfs --n3
Will also upgrade the OpenHandle serializer to reflect the schema following
my final tidy-up's and including any feedback received. Expect some changes
by next week.
Note that the schema now supports the 7 handle value fields (see below).
I've also been aligning the schema with the RFC (my previous version was
based on the draft RFC and/or code, and some licence in naming). There is
some rationalization. E.g. bit-fields are dealt with as xsd:boolean sets,
which seems tidier that introducing bespoke xsd datatypes. Am still closing
in on the datatyping proper.
And yes, when we modify the serializer we'll look to add support for both N3
and JSON. Did you have any model for JSON in mind? I would probably incline
for something like the following (from earlier YADS model) wrt namespaces:
{
"@prefix" : {
"" : "<http://example.org/yads-schema-2002-04-03#>" ,
"dc" : "<http://purl.org/dc/elements/1.1/>" ,
"xsd" : "<http://www.w3.org/2001/XMLSchema#>"
} ,
"resource" : "<http://example.org/n_ccc_rp.map>" ,
"collection" : [
{
"resource" : "<http://example.org/n_ccc_rp>" ,
"property" : {
"dc:publisher" : "Tony Hammond" ,
"dc:date" : "2007-06-04"
}
]
}
I had thought about conneg. Thanks for mentioning it. We've played with that
before here so should be cool to add that.
Oh - and you'll be wanting 3651 (not 3650) to critique. ;) I've added in
refs into the schema and followed the section ordering to make it easier to
review. Also copied over the ASCII art examples.
Cheers,
Tony
<!-- "index" property -->
<r:Property r:ID="index">
<s:label>index</s:label>
<s:comment>Property attributing an "Index" field.</s:comment>
<s:domain r:resource="#HandleValue"/>
<s:range r:resource="&xsd;nonNegativeInteger"/>
</r:Property>
<!-- "type" property -->
<r:Property r:ID="type">
<s:label>type</s:label>
<s:comment>Property attributing a "Type" field.</s:comment>
<s:domain r:resource="#HandleValue"/>
<s:range r:resource="&xsd;string"/>
</r:Property>
<!-- "data" property -->
<r:Property r:ID="data">
<s:label>data</s:label>
<s:comment>Property attributing a "Data" field.</s:comment>
<s:domain r:resource="#HandleValue"/>
<!-- Range for generic data types -->
<s:range r:resource="&xsd;string"/>
<!-- Ranges for pre-defined data types -->
<s:range r:resource="#HS_ADMIN"/>
<s:range r:resource="#HS_SITE"/>
<s:range r:resource="#HS_NA_DELEGATE"/>
<s:range r:resource="#HS_SERV"/>
<s:range r:resource="#HS_ALIAS"/>
<s:range r:resource="#HS_PRIMARY"/>
<s:range r:resource="#HS_VLIST"/>
</r:Property>
<!-- "ttl" property -->
<r:Property r:ID="ttl">
<s:label>ttl</s:label>
<s:comment>Property attributing a "TTL" field.</s:comment>
<s:domain r:resource="#HandleValue"/>
<s:range r:resource="#TTL"/>
</r:Property>
<!-- "permission" property -->
<r:Property r:ID="permission">
<s:label>permission</s:label>
<s:comment>Property attributing a "Permission" field.</s:comment>
<s:domain r:resource="#HandleValue"/>
<s:range r:resource="#Permission"/>
</r:Property>
<!-- "timestamp" property -->
<r:Property r:ID="timestamp">
<s:label>timestamp</s:label>
<s:comment>Property attributing a "Timestamp" field.</s:comment>
<s:domain r:resource="#HandleValue"/>
<s:range r:resource="&xsd;dateTime"/>
</r:Property>
<!-- "reference" property -->
<r:Property r:ID="reference">
<s:label>reference</s:label>
<s:comment>Property attributing a "Reference" field.</s:comment>
<s:domain r:resource="#HandleValue"/>
<s:range r:resource="#Reference"/>
</r:Property>
On 7/2/08 15:02, "Ed Summers" <ehs@pobox.com> wrote:
> Thanks for the heads up Tony. I went and grabbed a handle from
> memory.loc.gov and it worked (see turtle below).
>
> It would be interesting to see your RDF vocabulary but
> http://nascent.nature.com/schemas/rdf/handle currently 404s. I would
> need a better understanding of RFC 3650 to critique it though. I've
> been meaning to read that RFC more closely, so this is a good excuse
> :-)
>
> If you look below at the turtle serialization I believe that the is
> essentially describing the URI:
>
> http://nascent.nature.com/openhandle/handle?id=loc.pnp/cph.3c19765
>
> But shouldn't the subject being described be the handle itself?
>
> info:hdl/loc.pnp/cph.3c19765
>
> Lastly, if the goal is to make handle data more readily available in
> XUL (Firefox) and other web applications you might want to consider
> using content negotiation so someone could fetch the metadata not only
> as RDF, but also JSON (JavaScript Object Notation). JSON is
> particularly useful to provide in browser functionality with
> JavaScript, AJAX, etc.
>
> It's nice to see work being done in this area.
>
> //Ed
>
> --
>
> ed@curry:~$ rapper -o turtle
> http://nascent.nature.com/openhandle/handle?id=loc.pnp/cph.3c19765
> rapper: Parsing URI
> http://nascent.nature.com/openhandle/handle?id=loc.pnp/cph.3c19765
> with parser rdfxml
> rapper: Serializing with serializer turtle
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix h: <http://nascent.nature.com/schemas/rdf/handle#> .
>
> []
> a h:Handle;
> h:handleValues (
> [
> a h:HandleValue;
> h:index "100";
> h:type "HS_ADMIN";
> h:data [
> a h:Admin;
> h:adminReference "info:hdl/0.NA/loc.pnp#index=200";
> h:adminPermissions [
> a h:AdminPermissions;
> h:readValue "true";
> h:addNa "true";
> h:deleteHandle "true";
> h:addAdmin "true";
> h:removeValue "true";
> h:deleteNa "true";
> h:addValue "true";
> h:addHandle "true";
> h:listHandles "true";
> h:removeAdmin "true";
> h:modifyValue "true";
> h:modifyAdmin "true"
> ]
> ];
> h:ttlType "0";
> h:ttl "86400";
> h:timestamp "Wed Mar 15 20:10:35 GMT 2006";
> h:adminRead "true";
> h:adminWrite "true";
> h:publicRead "true";
> h:publicWrite "false"
> ]
> [
> a h:HandleValue;
> h:index "1";
> h:type "URL";
> h:data
> "http://lcweb2.loc.gov/cgi-bin/query/h?pp/PPALL:@field(NUMBER+@1(cph+3c19765))
> ";
> h:ttlType "0";
> h:ttl "86400";
> h:timestamp "Wed Mar 15 20:10:35 GMT 2006";
> h:adminRead "true";
> h:adminWrite "true";
> h:publicRead "true";
> h:publicWrite "false"
> ]
> ) .
>
> rapper: Parsing returned 44 triples
********************************************************************************
DISCLAIMER: This e-mail is confidential and should not be used by anyone who is
not the original intended recipient. If you have received this e-mail in error
please inform the sender and delete it from your mailbox or any other storage
mechanism. Neither Macmillan Publishers Limited nor any of its agents accept
liability for any statements made which are clearly the sender's own and not
expressly made on behalf of Macmillan Publishers Limited or one of its agents.
Please note that neither Macmillan Publishers Limited nor any of its agents
accept any responsibility for viruses that may be contained in this e-mail or
its attachments and it is your responsibility to scan the e-mail and
attachments (if any). No contracts may be concluded on behalf of Macmillan
Publishers Limited or its agents by means of e-mail communication. Macmillan
Publishers Limited Registered in England and Wales with registered number 785998
Registered Office Brunel Road, Houndmills, Basingstoke RG21 6XS
********************************************************************************
_______________________________________________
Handle-Info mailing list
Handle-Info@cnri.reston.va.us
http://www.handle.net/mailman/listinfo/handle-info