]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fix Layer0 definitions that cause unnecessary warnings in SCLTypeUtils 81/2181/3
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Sep 2018 07:28:36 +0000 (10:28 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 14 Sep 2018 08:15:22 +0000 (11:15 +0300)
gitlab #120

Change-Id: I752331250a46f0e01f48ad128458460d3e9061cc

bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StructuredProperty.java [new file with mode: 0644]
bundles/org.simantics.layer0/graph/Layer0.pgraph
bundles/org.simantics.layer0/graph/Layer0Literals.pgraph
bundles/org.simantics.modeling/src/org/simantics/modeling/SCLTypeUtils.java
bundles/org.simantics.scl.db/scl/Simantics/Variables.scl

diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StructuredProperty.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StructuredProperty.java
new file mode 100644 (file)
index 0000000..fa6469c
--- /dev/null
@@ -0,0 +1,10 @@
+package org.simantics.db.layer0.variable;
+
+/**
+ * Java interface for StructuredProperty SCL value type.
+ * 
+ * @author Tuukka Lehtonen
+ * @since 1.36.0
+ */
+public interface StructuredProperty {
+}
\ No newline at end of file
index 5fe74ec0175fd9e358bd724dc2e36f47672c2fdb..225a4f17ee79c075da4c75164749dec77de459dc 100644 (file)
@@ -22,6 +22,7 @@ L0.Entity : L0.Type
     >-- L0.identifier <R L0.HasProperty : L0.FunctionalRelation
         L0.HasLabel "Identifier"
         --> L0.GUID
+        ==> "GUID"
     >-- L0.typeURI <R L0.HasProperty : L0.FunctionalRelation
         L0.HasLabel "Type URI"
         --> L0.String
@@ -42,7 +43,7 @@ L0.Entity : L0.Type
     @L0.assert L0.Entity.methods
       _ : L0.Value
     
-L0.Entity.methods --> L0.Value <R L0.HasProperty : L0.FunctionalRelation
+L0.Entity.methods ==> "StructuredProperty" <R L0.HasProperty : L0.FunctionalRelation
   L0.domainProperties L0.Functions.methodsPropertyDomainProperties
   
 L0.Entity.method <R L0.HasProperty : L0.FunctionalRelation
index 329cfa12dc7576c302420de57bd1586b1517466f..08f6f27a819de56191fa197ace79976618b194db 100644 (file)
@@ -103,7 +103,7 @@ L0.Literal.FloatValidator <T L0.Value
 L0.Literal.DoubleValidator <T L0.Value
 
 L0.GUID <T L0.Literal
-    @L0.assert L0.HasValueType "(Long,Long)"
+    @L0.assert L0.HasValueType "GUID"
     @L0.assert L0.HasDataType ${ mostSigBits : Long, leastSigBits : Long }
     
 L0.TypeWithIdentifier <T L0.Entity
index 9632090e3acf342255dce3dc151ea9558479efc0..d0a777caa8ffbdf061c1f64b003ae24f2d4d3608 100644 (file)
@@ -60,6 +60,9 @@ public class SCLTypeUtils {
         TYPE_MAP.put("ByteArray", Types.BYTE_ARRAY);
         
         add((TCon)Types.RESOURCE);
+        add(Types.con("Simantics/GUID", "GUID")); // L0.GUID
+        add(Types.con("Simantics/Variables", "StructuredProperty")); // L0.methods
+        add(Types.con("Simantics/Variables", "ValueAccessor")); // L0.ValueAccessor
         add(Types.con("Simantics/Variables", "VariableMap"));
     }
     
index 12d06b76b0c5fff84d9af479cb33e7eb8d888366..43be6defbb6ee486957572caff2abe9d0a93f226 100644 (file)
@@ -96,6 +96,9 @@ importJava "org.simantics.db.layer0.function.All" where
 importJava "org.simantics.db.layer0.variable.VariableMap" where
     data VariableMap
 
+importJava "org.simantics.db.layer0.variable.StructuredProperty" where
+    data StructuredProperty
+
 importJava "org.simantics.db.layer0.variable.ResourceCollectionVariableMap" where
     @JavaName "<init>"
     createVariableMap :: [Resource] -> VariableMap