]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.event.ontology/graph/Event.pgraph
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.event.ontology / graph / Event.pgraph
diff --git a/bundles/org.simantics.event.ontology/graph/Event.pgraph b/bundles/org.simantics.event.ontology/graph/Event.pgraph
new file mode 100644 (file)
index 0000000..c48cda2
--- /dev/null
@@ -0,0 +1,122 @@
+L0 = <http://www.simantics.org/Layer0-1.1>
+
+EVENT = <http://www.simantics.org/Event-1.2> : L0.Ontology
+    @L0.new
+    L0.HasResourceClass "org.simantics.event.ontology.EventResource"
+
+EVENT.EventLog <T L0.Entity
+    L0.HasDescription "A log is an entity that composes events with L0.ConsistsOf. This type can be inherited to customize its behavior."
+    @L0.optionalProperty L0.HasName
+    @L0.optionalProperty L0.HasLabel
+    @L0.optionalProperty L0.HasDescription
+    @L0.property L0.ConsistsOf
+    @L0.property L0.HasComment
+    @L0.singleProperty EVENT.HasTimestamp
+    @L0.property EVENT.Hidden
+    >-- EVENT.EventLog.HasBaselineEvent --> EVENT.Event <R L0.DependsOn : L0.FunctionalRelation
+    @L0.singleProperty EVENT.HasModificationCounter
+
+EVENT.EventSlice <T L0.Entity
+
+
+EVENT.Event <T L0.Entity
+    L0.HasDescription """An entity that represents a single event occurring at a point in time.
+Different types of events can be created by instantiating and/or inheriting new event types.
+Events can be adapted into tab contributions for the selection view."""
+    // Name is unique identifier of the event.
+    @L0.singleProperty L0.HasName
+    @L0.optionalProperty L0.HasLabel
+    @L0.optionalProperty L0.HasDescription
+    @L0.property L0.HasComment
+    @L0.singleProperty EVENT.HasTimestamp
+    @L0.property EVENT.Hidden
+    @L0.property EVENT.Milestone
+    >-- EVENT.Event.sourceName --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+        L0.HasDescription "Name of the event source entity."
+    >-- EVENT.Event.source --> L0.Entity <R L0.IsWeaklyRelatedTo : L0.FunctionalRelation
+        L0.InverseOf EVENT.Event.source.inverse <-- L0.Entity --> EVENT.Event <R L0.IsWeaklyRelatedTo
+        L0.HasDescription "Source entity of the event. Both it and its inverse are weak relations that are reconstructed when necessary."
+    >-- EVENT.Event.type --> EVENT.EventType <R L0.IsRelatedTo : L0.FunctionalRelation
+        L0.HasDescription "Identifies event type. Not intended to have an inverse relation."
+    >-- EVENT.Event.typeNumber --> L0.Integer <R L0.HasProperty : L0.FunctionalRelation
+        L0.HasDescription "Identifies event type number."
+    >-- EVENT.Event.milestoneLabel --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+        L0.HasDescription "Short label as milestone. The value is one or two characters."
+    >-- EVENT.Event.index --> L0.Integer <R L0.HasProperty : L0.FunctionalRelation
+        L0.HasDescription "Index of event"
+    >-- EVENT.Event.tag --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+        L0.HasDescription "System tag attached to event"
+    >-- EVENT.Event.message --> L0.String <R L0.HasProperty : L0.FunctionalRelation
+        L0.HasDescription "Message attached to event"
+    @L0.optionalProperty EVENT.Event.sourceName
+    @L0.optionalProperty EVENT.Event.source
+    @L0.optionalProperty EVENT.Event.type
+    @L0.optionalProperty EVENT.Event.typeNumber
+    @L0.optionalProperty EVENT.Event.milestoneLabel
+    @L0.optionalProperty EVENT.Event.index
+    @L0.optionalProperty EVENT.Event.tag
+    @L0.optionalProperty EVENT.Event.message
+
+EVENT.TimeStamp <T L0.Double
+    L0.HasDescription "Used for being able to easily track all time stamp literal instances in TG export/import for time shifting purposes."
+    @L0.assert L0.HasDataType $(Double(unit="event timestamp"))
+
+EVENT.HasTimestamp <R L0.HasProperty : L0.FunctionalRelation
+    L0.HasDescription "Identifies a modeled timestamp for an event or event log. Timestamps are represented in seconds."
+    <-- EVENT.EventLog
+    <-- EVENT.Event
+    --> EVENT.TimeStamp
+
+EVENT.HasModificationCounter <R L0.HasProperty : L0.FunctionalRelation
+    <-- EVENT.EventLog
+    --> L0.Integer
+
+EVENT.HasEventLog <R L0.IsRelatedTo
+    L0.HasDescription "Identifies a single log of events for the domain resource."
+    L0.InverseOf EVENT.IsEventLogOf <R L0.IsWeaklyRelatedTo
+    --> EVENT.EventLog
+
+EVENT.HasEventProducer <R L0.IsWeaklyRelatedTo
+    L0.HasDescription "Identifies the source of a single event log. This can be any resource."
+    L0.InverseOf EVENT.IsEventProducerOf <R L0.IsWeaklyRelatedTo
+    L0.HasDomain EVENT.EventLog
+
+EVENT.EventType <T L0.Entity
+    L0.HasDescription "Use enumerated event type instances to specify the type of an event."
+    >-- EVENT.EventType.severity --> L0.Integer <R L0.HasProperty : L0.FunctionalRelation
+        L0.HasDescription "Describes the severity of events of this type as an integer number."
+
+EVENT.Hidden
+    L0.HasDescription "A tag for marking events hidden. This can be used as a hint for user interfaces."
+    @L0.defTag
+    @L0.symmetric
+
+EVENT.Milestone
+    L0.HasDescription "A tag for marking events as milestones. Any event can be marked as one."
+    @L0.defTag
+    @L0.symmetric
+
+EVENT.Returns <R L0.IsRelatedTo : L0.FunctionalRelation
+    L0.InverseOf EVENT.ReturnedBy <R L0.IsRelatedTo : L0.FunctionalRelation
+        L0.HasDescription "This relation implies that the domain event is the event returned by the range event. See EVENT.Returns."
+    L0.HasDescription "Some events can be considered to be states or flags that may be returned at some point in time. This relation implies that the domain event is the returning event for range event."
+    <-- EVENT.Event --> EVENT.Event
+
+EVENT.NoReturn
+    L0.HasDescription "A tag for marking events that are not expected to be returned. This can be used as a hint for user interfaces."
+    @L0.defTag
+    @L0.symmetric
+
+EVENT.ReturnEvent
+    L0.HasDescription "Indicates that an event is a return event."
+    @L0.defTag
+    @L0.symmetric
+    <-- EVENT.Event --> EVENT.Event
+
+/*
+// Future ideas:
+EVENT.Concerns <R L0.IsRelatedTo
+    L0.HasDescription "A relation for relating events to different resources it concerns."
+    L0.HasDomain EVENT.Event
+
+*/