code: public static String getResourceName(RamlResource resource, boolean singularize) {
  		String url = resource.getRelativeUri();
  
  		if (StringUtils.hasText(url) && url.contains("/") && (url.lastIndexOf('/') < url.length())) {
  			return getResourceName(url.substring(url.lastIndexOf('/') + 1), singularize);
  		}
  
  		return null;
  	}
docs: Attempts to infer the name of a resource from a resources's relative URL
  
  @param resource
  The raml resource being parsed
  @param singularize
  indicates if the resource name should be singularized or not
  @return A name representing this resource or null if one cannot be
  inferred