-Elias
> ------------------------------------------------------------------------
>
>
> There is still a lot of auto generated mapping in there. Search for
> awol:... for the mappings I have written.
> I am using the slight change to the ontology that I discussed
> recently on AtomOwl, and that I have not yet written out.
>
> [] a :Entry;
> :link [ :href <http://eg.com/alternate/1> ] .
>
> I would need to have a place to put a server online to demo this. But
> I don't at present.
>
> Henry
>
> Home page: http://bblfish.net/
> Sun Blog: http://blogs.sun.com/bblfish/
> Foaf name: http://bblfish.net/people/henry/card#me
>
>
>
https://sommer.dev.java.net/atom/2006-06-06/applications/
d2rq_mapping.ttl
see https://sommer.dev.java.net/atom/
feedback welcome.
Now there are a lot more things to do here:
1. links from entries to comments
(should we add the comments extension http://www.ietf.org/rfc/
rfc4685.txt to AtomOwl? )
2. remove the mappings for all the fields that we don't really
want to see.
They are very helpful at present. It would be nice to be able
to set visibility on some mappings.
3. The latest Roller has a new notion of tags. Are these the same
as our awol:Categories?
I don't see where they appear in the UI though. Well Dave
Johnson tells me that they will appear in feeds as
<categories> so I think that answers the question.
So I could also add a scheme:
- for tags this should be something like
<category scheme="http://blogs.sun.com/tags" term="/animals/
kangaroos" label="My kangaroos" />
- for older category types this should be
<category scheme="http://blogs.sun.com/bblfish" term="/General"
label="General" />
Here I am going a little ahead of the latest Roller trunk, as
that does not specify this in the atom xml.
If the above is true then this would automatically convert to
[] a :Entry;
:category [ :scheme "http://blogs.sun.com/tags";
:term "/animals/kangaroos";
:label "My kangaroos" ] .
And so the interesting question is should one not perhaps
just give the category the url that can be got by pasting those
pieces together?
[] a :Entry;
:category [ = <http://blogs.sun.com/tags/animals/kangaroos>;
:scheme "http://blogs.sun.com/tags";
:term "/animals/kangaroos";
:label "My kangaroos" ] .
I tried this but I think D2RQ requires the d2rq:uriPattern to
contain the primary key of a table...
4. Add an awol:updated on the weblog feed
5. Add relations for the service ontology.
Question: should we create a separate ontology for the
Services document or should we add that in AtomOwl?
In Roller everyone's service document has the same url btw (I
wonder if that is such a good idea btw)
That's all I can think of at present.
Henry
d2rq:uriPatterns are supposed to work with non-PK columns as well.
I'll try to help if you give some more details.
Richard
Ah so the documentation is wrong then?
[[
d2rq:uriPattern
Pattern used for URIref construction and reversing. A Pattern is a
string containing database column names separated by the rest of the
pattern by @@ deliminators. Column names are replaced by values from
the database in the mapping process. A uriPattern has to contain the
primary key column or columns for identifying a class instance.
Database column names have to be given in the form
"TableName.ColumnName". If a pattern contains more than one column,
then a separating string, which must not occur in the column values,
has to be used to separate the column names, in order to allow D2RQ
reversing given URIrefs into column values.
Example pattern:
"http://example.org/lineItems/item@@Orders.orderID@@-
@@LineItems.itemID@@"
]] ./d2rq-map04/doc/manual/index.htm#classmap
I am going off "A uriPattern has to contain the primary key column or
columns for identifying a class instance."
I'll try without it then.
Richard
For the following table:
CREATE TABLE `roller`.`weblogentrytag` (
`id` VARCHAR(48) NOT NULL DEFAULT '',
`entryid` VARCHAR(48) NOT NULL DEFAULT '',
`websiteid` VARCHAR(48) NOT NULL DEFAULT '',
`userid` VARCHAR(48) NOT NULL DEFAULT '',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`time` DATETIME NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
INDEX `wet_entryid_idx` (`entryid`),
INDEX `wet_websiteid_idx` (`websiteid`),
INDEX `wet_userid_idx` (`userid`),
INDEX `wet_name_idx` (`name`)
)
I have the following mapping
# Table weblogentrytag
map:weblogtag a d2rq:ClassMap;
d2rq:dataStorage map:database;
d2rq:uriPattern "weblogtag/@@weblogentrytag.name@@";
d2rq:class awol:Category;
d2rq:additionalProperty map:tag_scheme;
.
map:weblotag_label a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:weblogtag;
d2rq:property awol:label ;
d2rq:column "weblogentrytag.name";
.
map:weblotag_term a d2rq:PropertyBridge;
d2rq:belongsToClassMap map:weblogtag;
d2rq:property awol:term ;
d2rq:column "weblogentrytag.name";
.
map:tag_scheme a d2rq:AdditionalProperty;
d2rq:propertyName awol:scheme;
d2rq:propertyValue <weblogtag>;
.
I have placed a new version up on https://sommer.dev.java.net/
And we should have an example server up soonish hopefully.
Henry