+
+ public static Resource create(WriteOnlyGraph g, Resource type, Resource elementPredicate, Resource elementPredicateInverse, Iterable<Resource> elements) throws DatabaseException {
+ Layer0 L0 = g.getService(Layer0.class);
+ Resource list = g.newResource();
+ g.claim(list, L0.InstanceOf, null, type);
+ if (!elementPredicate.equals(L0.List_Element))
+ g.claim(list, L0.List_ElementPredicate, L0.List_ElementPredicate_Inverse, elementPredicate);
+ createExisting(g, list, elementPredicate, elementPredicateInverse, elements);
+ return list;
+ }
+
+ public static Resource create(WriteOnlyGraph g, Resource type, Resource elementPredicate, Resource elementPredicateInverse, Resource... elements) throws DatabaseException {
+ return create(g, type, elementPredicate, elementPredicateInverse, Arrays.asList(elements));
+ }
+