*/
public static Resource create(WriteGraph g, Iterable<Resource> elements) throws DatabaseException {
Layer0 L0 = Layer0.getInstance(g);
- return ListUtils.create(g,L0.List, L0.List_ElementWithInverse, L0.List_ElementWithInverse_Inverse, elements);
+ return ListUtils.create(g,L0.List, L0.List_Element, null, elements);
}
-
+
+ public static Resource createWithInverses(WriteGraph g, Iterable<Resource> elements) throws DatabaseException {
+ Layer0 L0 = Layer0.getInstance(g);
+ return ListUtils.create(g,L0.ListWithInverses, L0.List_ElementWithInverse, L0.List_ElementWithInverse_Inverse, elements);
+ }
+
/**
* Creates a list of the given list type containing the given {@code elements}.
*/
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;
}