public boolean isTypeOrSubtype ( Name nodeTypeName , Name candidateSupertypeName ) { if ( JcrNtLexicon . BASE . equals ( candidateSupertypeName ) ) { // If the candidate is 'nt:base', then every node type is a subtype ... return true ; } if ( nodeTypeName . equals ( candidateSupertypeName ) ) return true ; JcrNodeType nodeType = getNodeType ( nodeTypeName ) ; return nodeType != null && nodeType . isNodeType ( candidateSupertypeName ) ; }
Determine whether the node s given node type matches or extends the node type with the supplied name .