/**
   * Return the appropriate JSP, depending on the type of the relation end. Basically checks if the
   * target type is a Woko-managed class, and defaults to <code>renderPropertyValue</code> if the
   * relation cannot be modified. Also handles enumerated types (Java enums).
   *
   * @return the path to the JSP fragment to be used
   */
  public String getPath() {
    // check if the property is an enum
    Class<?> propertyType = getPropertyType();
    if (propertyType != null) {
      if (propertyType.isEnum()) {
        return ENUM_FRAGMENT_PATH;
      }

      // not an enum : we check if the target object is persistent or not.
      // if persistent, then forward to another JSP
      OsType os = getFacetContext().getWoko().getObjectStore();
      List<Class<?>> mappedClasses = os.getMappedClasses();
      if (mappedClasses.contains(propertyType)) {
        return FRAGMENT_PATH;
      }
    }
    getRequest()
        .setAttribute(
            RenderPropertyValue.FACET_NAME,
            this); // NEEDED because the JSP expects the facet to be found.
    return super.getPath();
  }