[Cubicweb] About cwuri
Nicolas Chauvat
nicolas.chauvat at logilab.fr
Mon Feb 17 11:54:12 CET 2014
On Wed, Feb 12, 2014 at 10:58:44PM +0100, aurélien campéas wrote:
> > > CWURI was introduced during a sprint back in 2009. Another object born at
> > > about the same time is ExternalUri (see cube datafeed).
>
> What's their relationship ?
ExternalUri was born when trying to reuse external data and developing
the datafeed cube.
CWURI was introduced when trying to generalize ExternalUri by putting
it into the core.
> > > The goal was more or less to handle local copies of remote data, while
> > > keeping the "true" location of these copied objects, in order for
> > > example to be able to refresh the data regurlarly.
>
> Can you elaborate ?
Let us assume you want to import the data displayed at
http://www.theatredelaville-paris.com/saison-calendrier-mensuel into a
CW app.
Each item in the calendar has its own page. For example
http://www.theatredelaville-paris.com/spectacle-Phedre-589 where you
can get the time and places of the shows
http://www.theatredelaville-paris.com/spectacle-Phedre-589#box-horaires_details
If you write a scrapper that outputs data such as (Title, abstract,
time, place) and if you do not want to insert duplicates each time you
run the scrapper to get new data or update the data you have (maybe
the typo in the abstract was fixed or the time changed), you need a
permanent id for the objects.
Use the URL and the Web will be with you.
--
Nicolas Chauvat
logilab.fr - services en informatique scientifique et gestion de connaissances
More information about the Cubicweb
mailing list