private static boolean isFile ( Node node ) throws RepositoryException { if ( ! node . isNodeType ( "nt:file" ) ) { return false ; } if ( ! node . getNode ( "jcr:content" ) . isNodeType ( "nt:resource" ) ) { return false ; } return true ; }
Check is node represents file .