[Cubicweb] cubicweb and the well-known calendar sharing use-case

Sylvain Thénault sylvain.thenault at logilab.fr
Mon Jan 25 13:28:50 CET 2010

On 25 janvier 13:04, Nicolas Chauvat wrote:
> On Mon, Jan 25, 2010 at 12:13:12PM +0100, Sylvain Thénault wrote:
> > Would a solution like the following suits your needs:
> > 
> > * use a kindof link entities describing a rdf file to use as a source of
> >   event (not a source as a repository source)
> You mean something like:
> class RdfFile(EntityType):
>     url = String()
>     source_of = SubjectRelation('CWType')
> ?    

In a first time I would think of a simpler

class EventsSource(EntityType):
  url = String()
  cache_time = Int()
  last_retreival = Datetime()

> > * an import script will periodically search for those entities, maintaining
> >   on attribute telling the cache life time (set according to HTTP caching
> >   header got while fetching the url), another the last fetch time
> > * when importing a file, create Event entities with a cwuri set to the
> >   event's url (uid), if it doesn't exist yet. We could also used ExternalUri
> >   entities here.
> The difference between CWUri and ExternalUri is not clear yet. In CW
> there is an internal unique identifier for everything. In the Linked
> Data world there is a unique url for everything. We need a clear
> mapping between the two.
> An object that belongs to a cubicweb instance is identifiable by
> http://server.name/appname/eid
> But an object imported from the file at url_of_rdf_file and identified
> by its url url_of_object will exist in CW at the url_of_object_in_cw
As I see it:
* entity's eid == cw *internal* unique identifier (doesn't make sense alone outside 
  the instance it belongs to)
* cwuri == cw *public* url of an entity, may be wget'ed and shouldn't ever change
* ExternalURL == URL of an external resource which an entity represent.

So in our case :

* url_of_rdf_file == EventsSource.url
* url_of_object_in_cw == Event.cwuri, with Event imported_from EventsSource
* url_of_object (in rdf file) == ExternalUri.uri, with Event same_as ExternalUri

Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

More information about the Cubicweb mailing list