X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.api.acr%2Fsrc%2Forg%2Fargeo%2Fapi%2Facr%2FContent.java;fp=org.argeo.api.acr%2Fsrc%2Forg%2Fargeo%2Fapi%2Facr%2FContent.java;h=4956037c8ab268dfc38e101681337e4353bce477;hb=57fee63bc8960d71f8bcb15f2a4ca0d90398b979;hp=d48f583fd7c84e4fc33c5f97f8493664c609f3b6;hpb=1880924eb6c8320bb39996aee07ac9c5975568fe;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.api.acr/src/org/argeo/api/acr/Content.java b/org.argeo.api.acr/src/org/argeo/api/acr/Content.java index d48f583fd..4956037c8 100644 --- a/org.argeo.api.acr/src/org/argeo/api/acr/Content.java +++ b/org.argeo.api.acr/src/org/argeo/api/acr/Content.java @@ -82,25 +82,11 @@ public interface Content extends Iterable, Map { } List res = getMultiple(key, type); return res; -// if (res == null) -// return null; -// else { -// if (res.isEmpty()) -// throw new IllegalStateException("Metadata " + key + " is not availabel as list of type " + type); -// return res.get(); -// } } /* * CONTENT OPERATIONS */ -// default CompletionStage edit(Consumer work) { -// return CompletableFuture.supplyAsync(() -> { -// work.accept(this); -// return this; -// }).minimalCompletionStage(); -// } - Content add(QName name, QName... classes); default Content add(String name, QName... classes) { @@ -282,6 +268,16 @@ public interface Content extends Iterable, Map { return attr(unqualified(key)); } + /* + * CONTEXT + */ + /** + * A content within this repository + * + * @param path either an abolute path or a path relative to this content + */ + Content getContent(String path); + /* * EXPERIMENTAL UNSUPPORTED */