(...)
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
