|
@@ -1,10 +1,9 @@ |
|
|
package org.cobbzilla.wizard.model.entityconfig; |
|
|
package org.cobbzilla.wizard.model.entityconfig; |
|
|
|
|
|
|
|
|
import org.cobbzilla.util.json.JsonUtil; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.LinkedHashMap; |
|
|
import java.util.LinkedHashMap; |
|
|
|
|
|
|
|
|
import static org.cobbzilla.util.io.FileUtil.dirname; |
|
|
import static org.cobbzilla.util.io.FileUtil.dirname; |
|
|
|
|
|
import static org.cobbzilla.util.json.JsonUtil.FULL_MAPPER_ALLOW_COMMENTS; |
|
|
import static org.cobbzilla.util.json.JsonUtil.json; |
|
|
import static org.cobbzilla.util.json.JsonUtil.json; |
|
|
|
|
|
|
|
|
public interface ModelManifestResolver { |
|
|
public interface ModelManifestResolver { |
|
@@ -14,7 +13,7 @@ public interface ModelManifestResolver { |
|
|
String jsonAtPath(String path); |
|
|
String jsonAtPath(String path); |
|
|
|
|
|
|
|
|
default LinkedHashMap<String, String> buildModel(String path) { |
|
|
default LinkedHashMap<String, String> buildModel(String path) { |
|
|
final String[] models = json(jsonAtPath(path), String[].class, JsonUtil.FULL_MAPPER_ALLOW_COMMENTS); |
|
|
|
|
|
|
|
|
final String[] models = json(jsonAtPath(path), String[].class, FULL_MAPPER_ALLOW_COMMENTS); |
|
|
final LinkedHashMap<String, String> modelJson = new LinkedHashMap<>(models.length); |
|
|
final LinkedHashMap<String, String> modelJson = new LinkedHashMap<>(models.length); |
|
|
final String parent = dirname(path); |
|
|
final String parent = dirname(path); |
|
|
for (String model : models) { |
|
|
for (String model : models) { |
|
|