Class ResourceIOManager

java.lang.Object
org.episteme.core.io.ResourceIOManager

public final class ResourceIOManager extends Object
Manager for Resource Readers and Writers. Discovers implementations via SPI and selects the best one for a given file.
Since:
1.1
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • getReader

      public static <T> Optional<ResourceReader<T>> getReader(String resourceId, Class<T> type)
      Finds a suitable reader for the given resource and destination.
    • getWriter

      public static <T> Optional<ResourceWriter<T>> getWriter(String destinationId, Class<T> type)
      Finds a suitable writer for the given resource and destination.
    • load

      public static <T> T load(String resourceId, Class<T> type) throws Exception
      Loads a resource of the specified type.
      Throws:
      Exception
    • save

      public static <T> void save(T resource, String destinationId) throws Exception
      Saves a resource to the specified destination.
      Throws:
      Exception