X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.objmap2%2Fsrc%2Forg%2Fsimantics%2Fobjmap%2Fgraph%2Fschema%2FMappingSchemas.java;h=cf2f3bf45065c5bee4951da094d67b8e94686767;hb=refs%2Fchanges%2F08%2F3108%2F1;hp=56aa5da205ed21fb0cde31f9e3fd325d18a0a7f3;hpb=240fea4f9c0aa8dba1e1af496aebb4157740fa20;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/MappingSchemas.java b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/MappingSchemas.java index 56aa5da20..cf2f3bf45 100644 --- a/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/MappingSchemas.java +++ b/bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/MappingSchemas.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2013 Association for Decentralized Information Management in + * Copyright (c) 2012, 2013, 2019 Association for Decentralized Information Management in * Industry THTH ry. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,6 +8,7 @@ * * Contributors: * VTT Technical Research Centre of Finland - initial API and implementation + * Semantum oy - linked list mapping API and implementation *******************************************************************************/ package org.simantics.objmap.graph.schema; @@ -27,6 +28,8 @@ import org.simantics.objmap.graph.annotations.GraphType; 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.LinkedListGet; +import org.simantics.objmap.graph.annotations.LinkedList; import org.simantics.objmap.graph.annotations.OptionalRelatedElements; import org.simantics.objmap.graph.annotations.OrderedElementsGet; import org.simantics.objmap.graph.annotations.OrderedSetType; @@ -39,6 +42,8 @@ import org.simantics.objmap.graph.annotations.RelatedOrderedSetElements; import org.simantics.objmap.graph.annotations.RelatedValue; import org.simantics.objmap.graph.annotations.UpdateMethod; import org.simantics.objmap.graph.annotations.factories.CompoundRelatedGetSetValueRuleFactory; +import org.simantics.objmap.graph.annotations.factories.LinkedListRuleFactory; +import org.simantics.objmap.graph.annotations.factories.LinkedListRuleFactory2; import org.simantics.objmap.graph.annotations.factories.OptionalRelatedElementsRuleFactory; import org.simantics.objmap.graph.annotations.factories.OrderedElementsRuleFactory; import org.simantics.objmap.graph.annotations.factories.RelatedElementRuleFactory; @@ -240,6 +245,8 @@ public class MappingSchemas { return new OptionalRelatedElementsRuleFactory(); if (annotation.annotationType().equals(RelatedOrderedSetElements.class)) return new RelatedOrderedSetElementsRuleFactory(); + if (annotation.annotationType().equals(LinkedList.class)) + return new LinkedListRuleFactory(); return null; } @@ -264,6 +271,8 @@ public class MappingSchemas { return new RelatedElementsRuleFactory2(); if (annotation.annotationType().equals(OrderedElementsGet.class)) return new OrderedElementsRuleFactory(); + if (annotation.annotationType().equals(LinkedListGet.class)) + return new LinkedListRuleFactory2<>(); return null; }