incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandru Popescu <the.mindstorm.mailingl...@gmail.com>
Subject Re: OCM - Inheritance & Interface
Date Fri, 10 Feb 2006 09:31:35 GMT
#: Christophe Lombart changed the world a bit at a time by saying (astral date: 2/9/2006 10:21
PM) :#
> Hi all,
> 
> Here is some ideas on the inheritance and interface support for our
> JCR mapping framework. In the first time, I'm focusing mainly on the
> modification required in the file descriptor.
> 
>  :
> 1/ Inheritance : the class-descriptor can contain a new element
> (extent-class) like this :
> 
> <class-descriptor class="CmsObjectImpl" jcrName="graffio:cmsobject">
>  .....
> </class-desciptor>
> 
> <class-descriptor class="FolderImpl" jcrName=""graffito:folder >
>    <extent-class class-ref = "CmsObjectImpl">
>   ...
> </class-desciptor>
> 
> <class-descriptor class="ContentImpl" jcrName="graffito:content" >
>    <extent-class class-ref = "CmsObjectImpl">
>    ....
> </class-desciptor>
> 
> the extent-class is use to make a reference to the "ancestor" class-descriptor.
> 
> A query can be done like this :
> 
> Filter filter = queryManager.createFilter(CmsObjectImpl.class);
> filter.setScope("/test/node1//");
> Query query = queryManager.createQuery(filter);
> Collection result = persistenceManager.getObjects(query);
> 
> the collection result can contain ContentImpl and/or FolderImpl element.
> If the JCR query is build with the ancestor node type, it should
> work with no many changes in the current code.This solution doesn't
> work if the nt:unstructured type is used.
> 
> This is just an idea and it needs to be review in more details - what
> do you think ?
> 
> 2/ Interface  : I don't understand why mixin node types should be use.
> Java interface have not some attributes. So, I don't see how it can be
> set into the JCR node type hierarchy.
> I think we can also reuse the extent-class element but more
> modification in the current code is required. Still thinking about
> that.
> 
> 
> 
> --
> Best regards,
> 
> Christophe
> 

Hi Chris,

I had put some thoughts into this late last night and I think that I will be able to come
up with a 
full vision about inheritance (interface). Hope to find the energy and time to write it all
down. 
Stay tuned ;-)!

./alex
--
.w( the_mindstorm )p.


Mime
View raw message