[ 
https://issues.apache.org/jira/browse/SLING-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271882#comment-13271882
 ] 

Justin Edelson commented on SLING-2467:
---------------------------------------

I like this idea, but I'm concerned about using the term "Document". That feels 
too much like an application-specific type, rather than an expression of the 
generic concept described here. I've seen people get tripped up by cq:Page, 
which is roughly similar to this proposal. In other words, I don't want to 
create the impression that this is _just_ for DMS applications.

That said, I'm struggling to come up with an alternative. The best I can come 
up with is sling:Entity. Other thoughts: sling:Thing (sounds too much like a 
joke), sling:Content, sling:Node, and sling:ContentNode.
                
> Define Document-like node type with jcr:content child and default handling 
> servlet
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-2467
>                 URL: https://issues.apache.org/jira/browse/SLING-2467
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR
>            Reporter: Felix Meschberger
>
> The JCR specification allows for nodes to have a dual nature: As part of a 
> hierarchy containing documents (as a folder in a filesystem) and as a 
> container for actual data (as a file in a filesystem). There are also two 
> node types defined to reflect the filesystem notions: nt:folder for folders 
> and nt:file for Files.
> The nt:file nodetype requries a child node "jcr:content" to provide the 
> actual contents of the file. This child node defaults to be of type 
> nt:resource but can actually be anything and as such provide structured data 
> in addition to just plain binary data (in the jcr:data property).
> Yet, nt:file and nt:folder are just that: nt:file for file data not 
> containing children and nt:file for folders but to not contain structured 
> data.
> We should define a node type which can be used to really convey this dual 
> nature as a data container (file) and document container (folder) at the same 
> time.
> So I propose the following node types:
> [sling:Document] > nt:hierarchyNode, sling:Resource
>   - sling:resourcetype (String) = "sling/document" auto mandatory
>   - * (undefined)
>   - * (undefined) multiple
>   + jcr:content (nt:base) = nt:unstructured mandatory
>   + * (nt:base) = sling:Document version
> [sling:OrderedDocument] > sling:Document
>      orderable
>   + * (nt:base) = sling:OrderedDocument version
> In addition we create default GET servlet for handling the sling/document 
> resource type:
>   if the resource has a jcr:content child
>       then include jcr:content
>       else sendError 404

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to