class AdhocOpear implements Opear {

    public static Result<AdhocOpear> fromPlanFile(final @NotNull File planFile, final @Nullable File baseDir) {
        final Function<File, Result<URL>> fnFileUrl = compose1(File::toURI, result1(URI::toURL));
        final Result<URL> planFileUrlResult = fnFileUrl.apply(planFile);
        return planFileUrlResult
                .flatMap(planFileUrl -> fnFileUrl.apply(Optional.ofNullable(baseDir).orElse(planFile.getParentFile()))
                        .flatMap(baseUrl ->
                                OakpalPlan.fromJson(planFileUrl).map(plan ->
                                        new AdhocOpear(planFileUrl, baseUrl))));
    }

    public  AdhocOpear(final @NotNull URL planFileUrl, final @NotNull URL baseUrl);

}