- All Known Subinterfaces:
IdFactory
- All Known Implementing Classes:
SimpleIdFactory
public interface IdResolver
-
Method Summary
Modifier and TypeMethodDescriptionabsolutize(@NonNull URI uri) Absolutize the given external URI, so that it can be used inside of a drawing (e.g.default <T> @Nullable TGets the object of the specified class for the specified id.Gets the object for the specified id.
-
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
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 clazzid- the id or null- Returns:
- the object if present with the specified type
-
absolutize
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)
-