]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.objmap2/src/org/simantics/objmap/graph/impl/Link.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.objmap2 / src / org / simantics / objmap / graph / impl / Link.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2013 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 /**\r
13  * \r
14  */\r
15 package org.simantics.objmap.graph.impl;\r
16 \r
17 import org.simantics.objmap.graph.schema.ILinkType;\r
18 \r
19 \r
20 /**\r
21  * An indication that the domain element corresponds to the range element\r
22  * in the mapping. The link type describes how source and target objects\r
23  * are updated. There are additionally flags for dirtiness of the link.\r
24  * @author Hannu Niemistö\r
25  */\r
26 public class Link<Domain,Range> {\r
27         public ILinkType<Domain,Range> type;\r
28         public Domain domainElement;\r
29         public Range rangeElement;\r
30         \r
31         public boolean domainModified = false;\r
32         public boolean rangeModified = false;\r
33         public boolean removed = false;\r
34         \r
35         public Link(ILinkType<Domain,Range> type, Domain domainElement, Range rangeElement) {\r
36                 this.type = type;\r
37                 this.domainElement = domainElement;\r
38                 this.rangeElement = rangeElement;               \r
39         }               \r
40 }