public ResourceHandle getParent ( String resourceType ) { ResourceHandle result = getResource ( ) ; while ( result . isValid ( ) && ! result . isResourceType ( resourceType ) ) { result = result . getParent ( ) ; } if ( ! result . isValid ( ) ) { result = getParent ( resourceType , getPath ( ) ) ; // implicit fallback to the path } return result ; }
Determine a typed parent resource .