/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 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
*
* Contributors:
* VTT Technical Research Centre of Finland - initial API and implementation
+ * Semantum Oy - gitlab #399
*******************************************************************************/
package org.simantics.diagram.ui;
+import java.util.Set;
+
import org.simantics.db.Resource;
import org.simantics.db.UndoContext;
import org.simantics.db.common.ResourceArray;
public static final Key KEY_DIAGRAM_RESOURCE_ARRAY = new KeyOf(ResourceArray.class, "DIAGRAM_RESOURCE_ARRAY");
+ /**
+ * Holds a value of Set<String> which should contain the type {@link Resource}
+ * URIs of all the types of the diagram resource. This allows doing
+ * type-checking for the diagram based on pure string instead of having to do
+ * database transactions to check types.
+ */
+ public static final Key KEY_DIAGRAM_RESOURCE_TYPE_URIS = new KeyOf(Set.class, "DIAGRAM_RESOURCE_TYPE_URIS");
+
+ /**
+ * Holds a value of Set<String> which should contain the type {@link Resource}
+ * URIs of all the types of the composite resource mapped to the diagram
+ * resource. This allows doing type-checking for the diagram based on pure
+ * string instead of having to do database transactions to check types.
+ */
+ public static final Key KEY_MAPPED_COMPOSITE_RESOURCE_TYPE_URIS = new KeyOf(Set.class, "MAPPED_DIAGRAM_COMPOSITE_RESOURCE_TYPE_URIS");
+
+ /**
+ * Set to the object value if the current diagram editor has a single
+ * statement/object for the {@link ModelingResources#URIs#HasDiagramSource}
+ * relation.
+ */
+ public static final Key KEY_HAS_DIAGRAM_SOURCE = new KeyOf(Resource.class, "MOD.HasDiagramSource");
+
/**
* A hint for defining and extra pass for loading/initializing an element
* after the current pass. It is possible to request for infinitely many