code: private Boolean isMainId(String id, String resource, String lastElement) {
  		Boolean isMainId = false;
  		if (id == null) {
  			if (!utils.singularize(utils.cleanURL(lastElement)).equals(resource) && resource == null) {
  				isMainId = true;
  			}
  		}
  		return isMainId;
  	}
docs: Checks if is the main id, or it is a secondary id.
  
  @param id
  Current id.
  @param resource
  Current resource.
  @param lastElement
  Last element of the URL.
  @return true if is the main id, false otherwise.