X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.objmap2%2Fsrc%2Forg%2Fsimantics%2Fobjmap%2Fgraph%2Fschema%2FMappingSchemas.java;fp=org.simantics.objmap2%2Fsrc%2Forg%2Fsimantics%2Fobjmap%2Fgraph%2Fschema%2FMappingSchemas.java;h=b91928492bf52a7609d7ebce30fe366b7fb48fc5;hb=8777c3b17827b29aa42c78b288a3a20a421e0ffb;hp=0007d2bae54cac80b7f356a1538b78dc8daa070b;hpb=810f51543ff2b5f927f6cf35c434fc4ffe4c88a5;p=simantics%2F3d.git diff --git a/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/MappingSchemas.java b/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/MappingSchemas.java index 0007d2ba..b9192849 100644 --- a/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/MappingSchemas.java +++ b/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/MappingSchemas.java @@ -28,6 +28,7 @@ import org.simantics.objmap.graph.annotations.HasCollectionAdder; import org.simantics.objmap.graph.annotations.HasCollectionRemover; import org.simantics.objmap.graph.annotations.HasSetter; import org.simantics.objmap.graph.annotations.OptionalRelatedElements; +import org.simantics.objmap.graph.annotations.OrderedSetType; import org.simantics.objmap.graph.annotations.RelatedElements; import org.simantics.objmap.graph.annotations.RelatedElementsGet; import org.simantics.objmap.graph.annotations.RelatedGetObj; @@ -80,6 +81,13 @@ public class MappingSchemas { return new DynamicSimpleLinkType(g.getResource(dynamicType.value()), clazz, rules); } + OrderedSetType orderedSetType = clazz.getAnnotation(OrderedSetType.class); + if (orderedSetType != null) { + ArrayList> rules = new ArrayList>(); + collectRulesFromAnnotations(g, clazz, rules); + + return new OrderedSetSimpleLinkType(g.getResource(orderedSetType.value()), clazz, rules); + } throw new IllegalArgumentException("Class " + clazz.toString() + " does not contain annotations."); }