You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Damien Antipa (JIRA)" <ji...@apache.org> on 2012/08/14 17:35:38 UTC
[jira] [Commented] (SLING-2467) Define Document-like node type with
jcr:content child and default handling servlet
[ https://issues.apache.org/jira/browse/SLING-2467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434199#comment-13434199 ]
Damien Antipa commented on SLING-2467:
--------------------------------------
I propose the following elements:
sling:Document = Root entry
sling:Container
sling:Component
This is very specific for my use case though I think a root entry node is necessary. In a file system paradigm the root would be the drive.
> 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