// NOTE: we inherit the old connection to break as little old code as possible
DIA.RouteGraphConnection <T DIA.Connection
@L0.property DIA.HasInteriorRouteNode
+ @L0.property DIA.CommandBasedSynchronization
DIA.HasInteriorRouteNode <R L0.IsComposedOf
L0.HasDomain DIA.Connection
DIA.IsHorizontal <R L0.HasProperty : L0.FunctionalRelation
L0.HasRange L0.Boolean
+DIA.CommandBasedSynchronization
+ @L0.defTag
+
DIA.RouteNode <T L0.Entity
@L0.property DIA.AreConnected
DIA.InteriorRouteNode <T DIA.RouteNode
public class RouteGraphConnection {
private static final boolean DEBUG_SYNC = false;
- private static final boolean USE_COMMAND_BASED_SYNCHRONIZATION = true;
-
+
public static Write synchronizer(final Resource connection, final RouteGraphChangeEvent event) {
return new WriteRequest() {
@Override
private DiagramResource DIA;
private ConnectionUtil cu;
private Resource connection;
+ private boolean commandBasedSynchronization;
- public RouteGraphConnection(WriteGraph graph, Resource connection) {
+ public RouteGraphConnection(WriteGraph graph, Resource connection) throws DatabaseException {
this.L0 = Layer0.getInstance(graph);
this.DIA = DiagramResource.getInstance(graph);
this.cu = new ConnectionUtil(graph);
this.connection = connection;
+ this.commandBasedSynchronization = graph.hasStatement(connection, DIA.CommandBasedSynchronization);
}
private static Function ConnectionPoint;
if (DEBUG_SYNC)
delta.print();
- if(USE_COMMAND_BASED_SYNCHRONIZATION) {
+ if(commandBasedSynchronization) {
initialize(graph);
Layer0 L0 = Layer0.getInstance(graph);