There isn't necessarily a mapping between Sling Resource Type and the JCR Node 
type. The sling resource type is determined based on the value or the 
sling:resourceType property on the node, where as the JCR Node type is 
determined based on jcr:primaryType value. In most cases nodes of 
sling:resourceType will always be the same jcr:primaryType, but technical that 
isn't a requirement. In  reality there are most jcr:primaryTypes map to many 
different sling:resourceType (or no sling resource type). 


Paul McMahon
Acquity Group, Part of Accenture Interactive


On Wednesday, September 10, 2014 9:56 AM, Jason E Bailey 
<[email protected]> wrote:
 


Lets say I have a node of type sling:Folder.



Calling

node.isNodeType("nt:folder")

will return true, since sling:Folder extends nt:folder



However

resource.isResourceType("nt:folder")

will return false. I'm assuming since it's attempting to
resolve up the resource heirarchy(?)



My question, is there a Foo utility to determine if a given
resource is of a particular type via the node definition?



TIA.

--
Jason E Bailey

Reply via email to