Interface IdResolver

All Known Subinterfaces:
IdFactory
All Known Implementing Classes:
SimpleIdFactory

public interface IdResolver
  • Method Details

    • getObject

      Gets the object for the specified id. Returns null if the id has no object.
      Parameters:
      id - the id or null
      Returns:
      the object if present
    • getObject

      default <T> @Nullable T getObject(@NonNull Class<T> clazz, @Nullable String id)
      Gets the object of the specified class for the specified id. Returns null if the id has no object of this type.
      Parameters:
      clazz - the clazz
      id - the id or null
      Returns:
      the object if present with the specified type
    • absolutize

      @NonNull URI absolutize(@NonNull URI uri)
      Absolutize the given external URI, so that it can be used inside of a drawing (e.g. to access data from the URI).

      In the internal representation of a drawing, we store all URIs with absolute paths.

      In the external representation of a drawing, we try to store all URIs relative to the home folder of the document (document home).

      Parameters:
      uri - an external URI (typically relative to document home)
      Returns:
      an internal URI (typically an absolute path)