You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by "J. Wolfgang Kaltz" <jw...@apache.org> on 2005/05/10 11:52:47 UTC

[RT] documents, resources, resource types (was: Re: [trunk] metadata handling)

Andreas Hartmann schrieb:
> (...)
> 
> The DocumentTypeResolver could be removed, but I'd change
> 
>   String Document.getResourceType() throws DocumentException;
> 
> to
> 
>   DocumentType getResourceType() throws DocumentException;
> 
> or better
> 
>   ResourceType getResourceType() throws DocumentException;
> 
> which would use the DocumentTypeBuilder (ResourceTypeBuilder) for
> lazy loading the ResourceType object.

I was about to rename DocumentType to ResourceType, but then I noticed 
that we have Resource, which is something completely different :(
By that I mean, a ResourceType would not be the type of a Resource and I 
think that's quite confusing.

I think this is a good time to start a discussion about the Lenya object 
model regarding content.

What we have now IIUC is
- documents (class Document), which can contain one piece of XML content 
of a certain type (the "resource type")
- resource types (class DocumentType), which gives information about a 
resource type (name, schema location, ...) and a factory for creating 
documents of this type
- assets (class Resource), which belong to a Document

I was thinking a while back about how the Lenya object model might be 
changed to better support key features such as content aggregation and 
global assets. Initial thoughts are summarized in 
http://wiki.apache.org/lenya/ContentModelProposal and although it is far 
from complete it may provide a basis for discussion.

Any input is appreciated, either here in the mailing list or as comments 
in the Wiki-page.

Bottom-line for short-term name changes would be
- change Resource to ContentItem
- change DocumentType to ResourceType
Any actual structural changes obviously require more analysis and 
discussion.

WDYT ?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: [RT] documents, resources, resource types

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
J. Wolfgang Kaltz wrote:

> What we have now IIUC is
> - documents (class Document), which can contain one piece of XML content 
> of a certain type (the "resource type")
> - resource types (class DocumentType), which gives information about a 
> resource type (name, schema location, ...) and a factory for creating 
> documents of this type
> - assets (class Resource), which belong to a Document

now that we store metadata seperately, we can store the resource type in 
the private lenya metadata, and treat them the same. the idea was also 
to have assets independant of documents (global assets)

> I was thinking a while back about how the Lenya object model might be 
> changed to better support key features such as content aggregation and 
> global assets. Initial thoughts are summarized in 
> http://wiki.apache.org/lenya/ContentModelProposal and although it is far 
> from complete it may provide a basis for discussion.
> 
> Any input is appreciated, either here in the mailing list or as comments 
> in the Wiki-page.

will take a look

> Bottom-line for short-term name changes would be
> - change Resource to ContentItem
> - change DocumentType to ResourceType
> Any actual structural changes obviously require more analysis and 
> discussion.

not sure we should do this at this point

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org