public ItemData getItemData ( NodeData parent , QPathEntry [ ] relPathEntries , ItemType itemType ) throws RepositoryException { ItemData item = parent ; for ( int i = 0 ; i < relPathEntries . length ; i ++ ) { if ( i == relPathEntries . length - 1 ) { item = getItemData ( parent , relPathEntries [ i ] , itemType ) ; } else { item = getItemData ( parent , relPathEntries [ i ] , ItemType . UNKNOWN ) ; } if ( item == null ) { break ; } if ( item . isNode ( ) ) { parent = ( NodeData ) item ; } else if ( i < relPathEntries . length - 1 ) { throw new IllegalPathException ( "Path can not contains a property as the intermediate element" ) ; } } return item ; }
Return item data by parent NodeDada and relPathEntries If relpath is JCRPath . THIS_RELPATH = . it return itself