Class Sources

java.lang.Object
com.axelor.ai.seed.Sources

public final class Sources extends Object
Helpers for deriving AiSources.
  • Method Details

    • sub

      public static AiSource sub(AiSource source, String prefix)
      A view of source restricted to entries under prefix/, with the prefix removed.
    • reroot

      public static AiSource reroot(AiSource source, Set<String> knownRoots)
      Normalizes a bundle whose type dirs are nested under wrapper directories — zipping a folder yields myBundle/skills/... rather than skills/.... When no knownRoots dir appears at the top level but every entry shares a single leading segment, that segment is stripped, repeated until a known root surfaces. A source already rooted at a known dir (e.g. the classpath ai/ bundle) is returned unchanged.