public static List < CSNodeWrapper > getAllChildrenNodes ( final CSNodeWrapper csNode ) { final List < CSNodeWrapper > nodes = new LinkedList < CSNodeWrapper > ( ) ; if ( csNode . getChildren ( ) != null ) { final List < CSNodeWrapper > childrenNodes = csNode . getChildren ( ) . getItems ( ) ; for ( final CSNodeWrapper childNode : childrenNodes ) { nodes . add ( childNode ) ; nodes . addAll ( getAllChildrenNodes ( childNode ) ) ; } } return nodes ; }
Recursively find all of a Content Spec Nodes children .