Interface IdSupplier

All Known Subinterfaces:
IdFactory
All Known Implementing Classes:
SimpleIdFactory

public interface IdSupplier
  • Method Details

    • getId

      @Nullable String getId(Object object)
      Gets an id for the specified object. Returns null if the object has no id.
      Parameters:
      object - the object
      Returns:
      the id
    • relativize

      @NonNull URI relativize(@NonNull URI uri)
      Relativize the given URI, so that it can be used for storage in a file.

      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 internal URI (typically an absolute path)
      Returns:
      an external URI (typically relative to document home)