1 /*******************************************************************************
2 * Copyright (c) 2007, 2013 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
15 package org.simantics.objmap.graph.impl;
17 import org.simantics.objmap.graph.schema.ILinkType;
21 * An indication that the domain element corresponds to the range element
22 * in the mapping. The link type describes how source and target objects
23 * are updated. There are additionally flags for dirtiness of the link.
24 * @author Hannu Niemistö
26 public class Link<Domain,Range> {
27 public ILinkType<Domain,Range> type;
28 public Domain domainElement;
29 public Range rangeElement;
31 public boolean domainModified = false;
32 public boolean rangeModified = false;
33 public boolean removed = false;
35 public Link(ILinkType<Domain,Range> type, Domain domainElement, Range rangeElement) {
37 this.domainElement = domainElement;
38 this.rangeElement = rangeElement;