--- /dev/null
+L0 = <http://www.simantics.org/Layer0-1.1>
+L0X = <http://www.simantics.org/Layer0X-1.1>
+SIMU = <http://www.simantics.org/Simulation-1.1>
+ISSUE = <http://www.simantics.org/Issue-1.2>
+DATATYPE = <http://www.simantics.org/Datatypes-1.1>
+
+STR = <http://www.simantics.org/Structural-1.2> : L0.Ontology
+ @L0.new
+ L0.HasResourceClass "org.simantics.structural.stubs.StructuralResource2"
+
+//// Components and types
+
+STR.Component <T L0.Entity : STR.ComponentType
+ @L0.tag L0.Abstract
+ @L0.property STR.IsConnectedTo
+ @L0.property STR.BelongsTo
+ @L0.property STR.GroupBelongsTo
+ L0.HasDescription "Defines a structure by instantiating some Type."
+
+STR.ComponentType <T L0.Type
+ //[IsDefinedBy card "0..1"]
+ L0.HasDescription "Parametric structure that can be instantiated."
+ >-- STR.ComponentType.HasDefaultPropertyRelationType <R L0.IsRelatedTo
+ >-- STR.ComponentType.HasDefaultPropertyValueType <R L0.IsRelatedTo
+ >-- STR.ComponentType.HasDefaultMonitorValueType --> STR.MonitorValueType <R L0.IsRelatedTo
+
+STR.MonitorValueType <T L0.Entity
+STR.MonitorValue <T L0.SCLValue : STR.MonitorValueType
+
+STR.IsDefinedBy <R L0.IsComposedOf : L0.FunctionalRelation
+ L0.HasRange STR.Component
+ L0.InverseOf STR.Defines
+
+STR.AbstractDefinedComponentType <T STR.ComponentType
+
+STR.DefinedComponentType <T STR.AbstractDefinedComponentType
+
+STR.ProceduralComponentType <T STR.AbstractDefinedComponentType
+ >-- STR.ProceduralComponentType.code --> STR.ProceduralComponentTypeCode <R L0.HasProperty : L0.TotalFunction
+ >-- STR.ProceduralComponentType.environment --> L0.SCLValue.Environment <R L0.IsRelatedTo : L0.FunctionalRelation
+
+STR.ProceduralComponentTypeCode <T L0.String
+
+//STR.proceduralConnectionPointPath --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+
+/*
+STR.HasParameter <R L0.IsRelatedTo
+ L0.HasDomain STR.ComponentType
+ L0.HasRange STR.Variable
+ L0.HasDescription "Denotes that the given relation is a parameter to the Type."
+ L0.InverseOf STR.IsParameterOf <R L0.IsWeaklyRelatedTo
+
+STR.ConnectionPointDefinition <T L0.PropertyDefinition
+*/
+//// Specific structures
+
+STR.Composite <T STR.Component
+// [L0.ConsistsOf all Component]
+ L0.HasDescription "A structure defined as a set of other structures."
+ >-- STR.Composite.namingFunction ==> "ComponentNamingStrategy" <R L0.HasProperty : L0.TotalFunction
+ >-- STR.Composite.instantiationFunction ==> "Resource -> String -> Resource -> Resource" <R L0.HasProperty : L0.FunctionalRelation
+ L0.HasDescription "Returns a function (Resource -> String -> Resource -> Resource) that takes the composite type, default name and target container as input and returns the created diagram."
+
+STR.OrderedComposite <T STR.Component <T L0.OrderedSet
+ // Requirements are not currently expressible
+
+//// Variables
+/*
+STR.Variable <T L0.Entity
+ @L0.tag L0.Abstract
+ @L0.singleProperty STR.Binds
+*/
+STR.Binds <R L0.IsRelatedTo
+ L0.HasRange L0.Relation
+ L0.InverseOf STR.IsBoundBy <R L0.IsWeaklyRelatedTo
+
+//// Literal properties
+
+// Find better name!!!
+/*
+STR.LiteralVariable <T STR.Variable
+ //[Binds all VariableRelation]
+
+STR.VariableRelation <T L0.Relation
+
+STR.HasVariable <R L0.DependsOn : STR.VariableRelation
+ @L0.tag L0.Abstract
+ L0.InverseOf STR.VariableOf
+
+STR.Expression <T L0.Entity
+ @L0.tag L0.Abstract
+ L0.HasDescription "Supertype of all value types that are not simple constant values or variables."
+
+STR.ValueRelation <T L0.FunctionalRelation
+
+STR.HasValue <R L0.HasProperty : STR.ValueRelation
+ @L0.tag L0.Abstract // can we use the tag for relations?
+ L0.HasDescription "Assigns a value to some parameter."
+*/
+//// Connections
+
+STR.Connection <T L0.Entity
+ @L0.property STR.Connects
+ @L0.property STR.IsJoinedBy
+/*
+STR.ConnectionVariable <T STR.Variable <T STR.Connection
+ //[STR.Binds all STR.ConnectionRelation]
+*/
+STR.ConnectionRelation <T L0.Relation
+ @L0.assert L0.SharedRange STR.ConnectionRelation
+ >-- STR.ConnectionRelation.connectionRequired --> L0.Boolean <R L0.HasProperty : L0.FunctionalRelation
+ >-- STR.ConnectionRelation.equivalentConnectionPoint --> STR.ConnectionRelation <R L0.IsRelatedTo
+ L0.InverseOf STR.ConnectionRelation.equivalentConnectionPoint
+ @L0.assert L0.valueAccessor
+ STR.Functions.connectionValueAccessor : L0.ExternalValue
+ L0.HasValueType "ValueAccessor"
+ @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
+ @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
+
+STR.SynchronizedRelation <T L0.Relation
+STR.SynchronizedConnectionRelation <T STR.ConnectionRelation
+STR.ProvidingConnectionRelation <T STR.ConnectionRelation
+
+STR.InComposite <R L0X.HasTemplate
+
+
+// deprecated
+//IsConnected <R L0.DependsOn : ConnectionRelation
+// @L0.tag L0.Abstract
+// L0.InverseOf IsConnected
+/*
+STR.DirectedConnectionRelation <T STR.ConnectionRelation
+ L0.Asserts _ : L0.Assertion
+ L0.HasPredicate L0.SharedRange
+ L0.HasObject STR.DirectedConnectionRelation
+*/
+STR.IsConnectedTo <R L0.DependsOn : STR.ConnectionRelation
+ @L0.tag L0.Abstract
+ L0.InverseOf STR.Connects
+
+//// Connection types
+
+//deprecated
+STR.SupportsConnectionType <R L0.IsRelatedTo
+ L0.HasRange STR.ConnectionType
+
+STR.HasConnectionType <R L0.IsRelatedTo : L0.FunctionalRelation
+ L0.HasRange STR.ConnectionType
+
+STR.ConnectionType <T L0.Entity
+ >-- STR.ConnectionType.isUserSelectable --> "Boolean" <R L0.HasProperty : L0.FunctionalRelation
+ @L0.assert STR.ConnectionType.isUserSelectable false
+ //[STR.HasCardinalityRestriction all STR.CardinalityRestriction]
+
+STR.SupportsDirection <R L0.IsRelatedTo
+ L0.HasRange STR.ConnectionDirection
+
+STR.ConnectionDirection <T L0.Entity
+
+STR.InputDirection : STR.ConnectionDirection
+STR.OutputDirection : STR.ConnectionDirection
+
+STR.HasCardinalityRestriction <R L0.IsRelatedTo
+
+STR.CardinalityRestriction <T L0.Entity
+ //[STR.HasLowerBound card "0..1"]
+ //[STR.HasUpperBound card "0..1"]
+ //[STR.HasConnectionDirection card "0..1"]
+
+STR.HasLowerBound <R L0.HasProperty
+STR.HasUpperBound <R L0.HasProperty
+STR.HasConnectionDirection <R L0.IsRelatedTo
+
+STR.ConnectionJoin <T L0.Entity
+ @L0.property STR.Joins
+STR.Joins <R L0.DependsOn
+ L0.InverseOf STR.IsJoinedBy <R L0.DependsOn
+ L0.HasDomain STR.Connection
+ L0.HasRange STR.ConnectionJoin
+STR.HasConnectionJoin <R L0.DependsOn
+ L0.HasDomain STR.Composite
+ L0.HasRange STR.ConnectionJoin
+ L0.InverseOf STR.JoinsComposite <R L0.IsWeaklyRelatedTo
+
+//// Modeling rules
+
+STR.ModelingRules <T L0.Entity
+ L0.HasDescription """Defines what can be populated to a composite
+and what can be connected.
+See <https://www.simantics.org/wiki/index.php/Diagram_ontology>."""
+
+STR.HasModelingRules <R L0.IsRelatedTo : L0.FunctionalRelation
+ L0.HasDomain STR.Composite
+ L0.HasDomain STR.OrderedComposite
+ L0.HasRange STR.ModelingRules
+
+STR.SimpleModelingRules <T STR.ModelingRules
+ @L0.singleProperty STR.HasConnectionType
+ @L0.singleProperty STR.HasAttachmentRelation
+ L0.HasDescription """Modeling rules that allow all connections."""
+STR.HasAttachmentRelation <R L0.IsRelatedTo : L0.FunctionalRelation
+ L0.HasRange L0.Relation
+
+STR.DefaultConnectionType : STR.ConnectionType
+STR.DefaultModelingRules : STR.SimpleModelingRules
+ STR.HasConnectionType STR.DefaultConnectionType
+STR.StandardModelingRules : STR.ModelingRules
+STR.AllowsConnectionType <R L0.DependsOn
+ L0.HasDomain L0.Relation
+ L0.HasRange STR.ConnectionType
+ L0.InverseOf STR.AllowsConnectionType.Inverse <R L0.IsWeaklyRelatedTo
+STR.OverridesConnectionType <R L0.DependsOn
+ L0.HasDomain STR.ConnectionType
+ L0.HasRange STR.ConnectionType
+STR.IsIncludedInConnectionType <R L0.DependsOn
+ L0.HasDomain STR.ConnectionType
+ L0.HasRange STR.ConnectionType
+STR.DefaultsToConnectionType <R L0.DependsOn : L0.FunctionalRelation
+ <-- L0.Relation
+ --> STR.ConnectionType
+ L0.InverseOf STR.DefaultsToConnectionType.Inverse <R L0.IsWeaklyRelatedTo
+STR.ConnectionConstraint <T L0.Entity
+STR.HasConnectionConstraint <R L0.IsRelatedTo
+ L0.HasDomain STR.ConnectionType
+ L0.HasRange STR.ConnectionConstraint
+
+// Groups
+
+STR.BelongsTo <R L0.IsRelatedTo
+ L0.HasRange STR.ComponentGroup
+ L0.InverseOf STR.BelongsToInverse <R L0.IsWeaklyRelatedTo
+STR.GroupBelongsTo <R L0.IsRelatedTo
+ L0.HasRange STR.GroupSubsumption
+ L0.InverseOf STR.GroupBelongsToInverse <R L0.IsWeaklyRelatedTo
+STR.ComponentGroup <T L0.Entity
+STR.GroupSubsumption <T L0.Entity
+ @L0.property STR.HasSubgroup
+ @L0.property STR.BelongsTo
+STR.HasSubgroup <R L0.IsRelatedTo
+ L0.HasRange STR.ComponentGroup
+
+// Support for expressions
+STR.HasExpression <R L0.HasProperty
+ >-- L0.Value
+ ==> "String"
+ L0.valueAccessor STR.Functions.expressionValueAccessor : L0.ExternalValue
+
+STR.Functions : L0.Library
+
+STR.Run <T SIMU.Run
+
+// Removed these changes after r25103 since they cause ManyObjectsForFunctionalRelationException: Functional relation has assertions from multiple inherited types.
+// problems for domainProperties and possibly valueAccessor too when simply viewing the properties of an instance whose type uses multi-inheritance.
+// Need a solution for this before enabling.
+STR.Component
+ @L0.assert L0.domainProperties
+ STR.Functions.structuralChildDomainProperties : L0.ExternalValue
+ L0.HasValueType "VariableMap"
+ @L0.assert L0.domainChildren
+ STR.Functions.structuralChildDomainChildren : L0.ExternalValue
+ L0.HasValueType "VariableMap"
+
+STR.Run
+ @L0.assert L0.domainChildren
+ STR.Functions.structuralRunDomainChildren : L0.ExternalValue
+ L0.HasValueType "VariableMap"
+
+STR.Connection
+ @L0.assert L0.domainProperties L0.Functions.standardPropertyDomainProperties
+ @L0.assert L0.domainChildren L0.Functions.standardPropertyDomainChildren
+ @L0.assert L0.valueAccessor
+ STR.Functions.connectionValueAccessor : L0.ExternalValue
+ L0.HasValueType "ValueAccessor"
+
+STR.SCLValue <T L0.SCLValue
+ @L0.assert L0.ConvertsToValueWith STR.Functions.computeExpression
+ @L0.assert L0.SCLValue.environment
+ _ : L0.SCLValue.Environment
+ L0.SCLValue.Environment.moduleName "Simantics/All"
+ L0.SCLValue.Environment.namespace ""
+
+STR.scl : L0.Template
+ @template %subject %property %expression %valueType
+ %subject
+ %property _ : STR.SCLValue
+ L0.SCLValue.expression %expression
+ L0.HasValueType %valueType
+
+STR.sclValue : L0.Template
+ @template %subject %expression %valueType
+ %subject : STR.SCLValue
+ L0.SCLValue.expression %expression
+ L0.HasValueType %valueType
+
+STR.InvalidSCLExpressionIssue <T ISSUE.Issue
+
+STR.Property <T L0.FunctionalRelation <T L0.PropertyRelation
+ @L0.assert STR.HasExpression
+ _ /* dummy */ : L0.Value
+ L0.HasValueType "String"
+
+STR.Component
+ L0.HasConstraint STR.ConnectionConstraint : L0.Constraint
+ L0.Constraint.Validator
+ STR.Functions.connectionValidator : L0.Function
+
+STR.ConnectionConstraint.ErrorIssue
+ @ISSUE.issue ISSUE.Severity.Error
+ STR.Functions.connectionIssueDescription : L0.Function
+ L0.HasValueType "String"
+
+STR.ConnectionConstraint.Source <T ISSUE.Sources.DependencyTracker
+ L0.HasLabel "Structural connection validity"
+ @L0.assert ISSUE.Sources.DependencyTracker.HasType STR.Component
+ @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.Connection
+ @L0.assert ISSUE.Sources.DependencyTracker.HasSearchType STR.ConnectionJoin
+ @L0.assert ISSUE.Sources.DependencyTracker.HasExtension STR.Functions.connectionExtension
+ @L0.assert ISSUE.Sources.DependencyTracker.HasConstraint STR.ConnectionConstraint
+
+STR.HasJoinClusterSet <R L0.IsComposedOf
+ --> L0.ClusterSet
+
+STR.structuralRevision <R L0.HasProperty : L0.FunctionalRelation
+ --> DATATYPE.GUID
+
+STR.synchronizedRevision <R L0.HasProperty : L0.FunctionalRelation
+ ==> "Long"
+
+STR.input <R L0.HasProperty : L0.FunctionalRelation
+ ==> "Variable"
+
+STR.UserDefinedProperty <T L0.Entity
+
+STR.ComponentType
+ // This relation is inherited from L0.IsComposedOf because changes in the code
+ // need to be propagated to the component type
+ >-- STR.ComponentType.hasScript --> STR.ComponentTypeScript <R L0.IsComposedOf
+STR.ComponentTypeScript <T L0.Entity
+ >-- STR.ComponentTypeScript.type --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+ >-- STR.ComponentTypeScript.code --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+
+STR.ComponentType.Locked
+ @L0.defTag
+ L0.HasDomain STR.ComponentType
+ L0.HasDescription "Indicates that the component type is locked and cannot be opened for editing."
\ No newline at end of file