Arkadiusz Ryś 3 лет назад
Родитель
Сommit
ded69b0a23

+ 1 - 0
examples/oml/Drivetrain/src/oml/ua.be/drivetrain/description/bundle.oml

@@ -1,4 +1,5 @@
 description bundle <http://ua.be/drivetrain/description/bundle#> as ^bundle {
+    includes <http://ua.be/drivetrain/description/federation#>
 	includes <http://ua.be/drivetrain/description/ftg#>
     includes <http://ua.be/drivetrain/description/pm#>
     includes <http://ua.be/drivetrain/description/pt#>

+ 22 - 0
examples/oml/Drivetrain/src/oml/ua.be/drivetrain/description/federation.oml

@@ -0,0 +1,22 @@
+@dc:description "A description of the services provided for federation."
+description <http://ua.be/drivetrain/description/federation#> as federation {
+	uses <http://purl.org/dc/elements/1.1/> as dc
+	uses <http://ua.be/sdo2l/vocabulary/federation#> as fed-voc
+    extends <http://ua.be/drivetrain/description/artifacts/artifacts#> as artifacts
+
+	ci service-1 : fed-voc:Service [
+		fed-voc:isOperationFor artifacts:drivetrain-sensor-data-v1
+		fed-voc:hasOperation operation-1
+	]
+
+	ci operation-1 : fed-voc:Operation [
+		fed-voc:hasEndPoint "<http://localhost:8000>"
+		fed-voc:hasDescription "Table structure outlier detection service."
+		fed-voc:hasSideEffect false
+		fed-voc:hasIri "<https://ontology.rys.app/dt/function/>"
+		fed-voc:hasCall "outlier"
+	]
+
+	ci param-1 : fed-voc:Parameter [ fed-voc:hasIdentifier "file" fed-voc:hasValue "sensor.csv" ]
+	ci param-2 : fed-voc:Parameter [ fed-voc:hasIdentifier "column" fed-voc:hasValue "2" ]
+}

+ 0 - 1
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/bundle.oml

@@ -12,7 +12,6 @@ vocabulary bundle <http://ua.be/sdo2l/vocabulary/bundle#> as ^bundle {
 	includes <http://ua.be/sdo2l/vocabulary/base/violation#>
 	includes <http://ua.be/sdo2l/vocabulary/base/code#>
 	includes <http://ua.be/sdo2l/vocabulary/base/file#>
-	includes <http://ua.be/sdo2l/vocabulary/base/ftg#>
 	includes <http://ua.be/sdo2l/vocabulary/base/richtext#>
 	includes <http://ua.be/sdo2l/vocabulary/base/script#>
 	includes <http://ua.be/sdo2l/vocabulary/base/tabular#>

+ 36 - 17
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/federation.oml

@@ -1,25 +1,44 @@
+@dc:description "A vocabulary about federation. Virtual data access (service and storage)."
 vocabulary <http://ua.be/sdo2l/vocabulary/federation#> as federation {
 	extends <http://www.w3.org/2000/01/rdf-schema#> as rdfs
 	extends <http://www.w3.org/2001/XMLSchema#> as xsd
+    extends <http://purl.org/dc/elements/1.1/> as dc
+    extends <http://ua.be/sdo2l/vocabulary/processtraces#> as traces
 
-    // Virtual data access (service and storage)
-    @rdfs:comment "A Callable specifies one possible call (or operation) that can be made. For example 'translate' for a Point class."
-    aspect Callable [key hasEndPoint]
-	scalar property hasEndPoint [
-		domain Callable
-		range xsd:string
-	]
-    scalar property hasSideEffect [
-		domain Callable
-		range xsd:boolean
+    // TODO Maybe add return values/names/types
+    @rdfs:comment "An Operation specifies one possible call (or operation) that can be made. For example 'translate' for a Point class."
+    concept Operation [ key hasIri ]
+	scalar property hasEndPoint [ domain Operation range xsd:string ]
+    scalar property hasDescription [ domain Operation range xsd:string ]
+    scalar property hasSideEffect [ domain Operation range xsd:boolean ]
+    // TODO Should be IRI not string
+    scalar property hasIri [ domain Operation range xsd:string ]
+    scalar property hasCall [ domain Operation range xsd:string ]
+    relation entity Parameters [
+		from Operation
+		to Parameter
+		forward hasParameter
+		reverse isParameterOf
 	]
 
-    @rdfs:comment "An Actionable specifies an element which has one or more Callables (aka a service)."
-    aspect Actionable
-    relation entity Callables [
-		from Actionable
-		to Callable
-		forward hasCallable
-		reverse isCallableFrom
+    @rdfs:comment "A Parameter is a key value store for passing around values by name."
+    concept Parameter [ key hasIdentifier ]
+	scalar property hasIdentifier [ domain Parameter range xsd:string ]
+    scalar property hasValue [ domain Parameter	range xsd:string ]
+
+    // TODO Maybe make this an aspect and create concept per type of service with restrictions
+    @rdfs:comment "A Service specifies an element which has one or more Operations available."
+    concept Service
+    relation entity Services [
+		from traces:Artifact
+		to Service
+		forward hasService
+		reverse isOperationFor
+	]
+    relation entity Operations [
+		from Service
+		to Operation
+		forward hasOperation
+		reverse isOperationOf
 	]
 }

+ 1 - 2
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/processtraces.oml

@@ -5,8 +5,7 @@ vocabulary <http://ua.be/sdo2l/vocabulary/processtraces#> as traces {
 	extends <http://www.w3.org/2001/XMLSchema#> as xsd
 	extends <http://www.w3.org/2002/07/owl#> as owl
 
-	# TODO Add time to Event (starting time and ending time of PT events)
-
+	// TODO Add time to Event (starting time and ending time of PT events)
 	@rdfs:comment "The class to represent traces of execution of a given workflow."
 	concept Trace :> base:IdentifiedThing