On Dec 17, 2009, at 3:36 PM, Vincent Massol wrote: > > On Dec 17, 2009, at 3:08 PM, Fabio Mancinelli wrote: > >> >> On Dec 17, 2009, at 1:48 PM, Vincent Massol wrote: >> >>> Proposal >>> ======= >>> >>> I'd like to propose ModelReference for the base object and then >>> DocumentReference, SpaceReference, WikiReference, >>> AttachmentReference. >>> Note: This is different from Identity which is unique (a UUID). >>> References do not point to unique objects. >>> >> I am not sure of having understood the note. In particular what you >> mean when you say "references do not point to unique objects" > > The way I view it is that an object (or Entity or Resource) will have > 2 methods: > - getReference() (corresponds to Node.getPath() in JCR I believe) > - getUUID() > > In other words, it's possible to have several References pointing to > the same object (or Entity or Resource). This is very useful for > implementing renames for example. > If I understand well you are suggesting that every object-or-entity-or-resource have a UUID and can be addressed by using a reference that contains declarative information.
So, for example a page P will have a UUID X and "Main.WebHome" could be a reference to the page P. A rename is just a change of components of the reference so that now the new reference "Foo.Bar" will still point to page P whose UUID is X but appears to be in the space "Foo" and having the "Bar" name. This could also allow for "symbolic linking"... For example the page P with UUID X might be pointed by a set of references "Main.WebHome", "Foo.Bar", "X.Y" making it appear in different spaces under different names. In this case the objects-or-entities-or-resources exist in a flat space and the structural organization (i.e., a page is in a space that is in another space in a given wiki, etc.) is subsumed by the references like what happens in RDF graphs. > In addition, FTM I'm not sure if a Reference should include the version > > I need for think a bit more about this since I'm not 100% sure. If you > have ideas let me know. > Maybe not... Versions could be first-class bject-or-entity-or-resource that can be referenced (this is what happens in the REST API for example). -Fabio _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

