Skip to content

Commit

Permalink
Generalize channel definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
julianrojas87 committed Aug 2, 2024
1 parent 707d724 commit 4c5a51d
Show file tree
Hide file tree
Showing 2 changed files with 342 additions and 333 deletions.
338 changes: 6 additions & 332 deletions rdf-connect-js.ttl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
Expand Down Expand Up @@ -41,78 +42,6 @@ rdfc-js:JSWriterChannel a rdfs:Class ;
rdfs:comment "Writing end of a channel to which JavaScript processors can write/push in-memory data flows" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSFileChannel a rdfs:Class ;
rdfs:subClassOf rdfc:Channel ;
rdfs:label "JavaScript file channel" ;
rdfs:comment "A channel that enables file-based communication for JavaScript processors" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSFileReaderChannel a rdfs:Class ;
rdfs:subClassOf rdfc:ReaderChannel ;
rdfs:label "JavaScript file reader channel" ;
rdfs:comment "Reading end of a file channel from which JavaScript processors can read/listen to data flows" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSFileWriterChannel a rdfs:Class ;
rdfs:subClassOf rdfc:WriterChannel ;
rdfs:label "JavaScript file writer channel" ;
rdfs:comment "Writing end of a file channel to which JavaScript processors can write/push data flows" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSHttpChannel a rdfs:Class ;
rdfs:subClassOf rdfc:Channel ;
rdfs:label "JavaScript HTTP channel" ;
rdfs:comment "A channel that enables HTTP-based communication for JavaScript processors" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSHttpReaderChannel a rdfs:Class ;
rdfs:subClassOf rdfc:ReaderChannel ;
rdfs:label "JavaScript HTTP reader channel" ;
rdfs:comment "Reading end of an HTTP channel from which JavaScript processors can read/listen to data flows" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSHttpWriterChannel a rdfs:Class ;
rdfs:subClassOf rdfc:WriterChannel ;
rdfs:label "JavaScript HTTP writer channel" ;
rdfs:comment "Writing end of an HTTP channel to which JavaScript processors can write/push data flows" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSWebSocketChannel a rdfs:Class ;
rdfs:subClassOf rdfc:Channel ;
rdfs:label "JavaScript WebSocket channel" ;
rdfs:comment "A channel that enables WebSocket-based communication for JavaScript processors" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSWebSocketReaderChannel a rdfs:Class ;
rdfs:subClassOf rdfc:ReaderChannel ;
rdfs:label "JavaScript WebSocket reader channel" ;
rdfs:comment "Reading end of a WebSocket channel from which JavaScript processors can read/listen to data flows" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSWebSocketWriterChannel a rdfs:Class ;
rdfs:subClassOf rdfc:WriterChannel ;
rdfs:label "JavaScript WebSocket writer channel" ;
rdfs:comment "Writing end of a WebSocket channel to which JavaScript processors can write/push data flows" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSKafkaChannel a rdfs:Class ;
rdfs:subClassOf rdfc:Channel ;
rdfs:label "JavaScript Kafka channel" ;
rdfs:comment "A channel that enables Kafka-based communication for JavaScript processors" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSKafkaReaderChannel a rdfs:Class ;
rdfs:subClassOf rdfc:ReaderChannel ;
rdfs:label "JavaScript Kafka reader channel" ;
rdfs:comment "Reading end of a Kafka channel from which JavaScript processors can read/listen to data flows" ;
dct:created "2024-08-01"^^xsd:date .

rdfc-js:JSKafkaWriterChannel a rdfs:Class ;
rdfs:subClassOf rdfc:WriterChannel ;
rdfs:label "JavaScript Kafka writer channel" ;
rdfs:comment "Writing end of a Kafka channel to which JavaScript processors can write/push data flows" ;
dct:created "2024-08-01"^^xsd:date .

#################################################################
# JavaScript Shapes
#################################################################
Expand All @@ -130,10 +59,10 @@ rdfc-js:JSRunnerShape a sh:NodeShape ;
sh:name "supports channel" ;
sh:minCount 0 ;
sh:class rdfc-js:JSChannel,
rdfc-js:JSFileChannel,
rdfc-js:JSHttpChannel,
rdfc-js:JSWebSocketChannel,
rdfc-js:JSKafkaChannel
rdfc:FileChannel,
rdfc:HttpChannel,
rdfc:WebSocketChannel,
rdfc:KafkaChannel
] .

rdfc-js:JSProcessorShape a sh:NodeShape ;
Expand Down Expand Up @@ -237,259 +166,4 @@ rdfc-js:WriterChannelShape a sh:NodeShape ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:class rdfl:TypedExtract
] .

rdfc-js:JSFileChannelShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSFileChannel ;
sh:property [
sh:path rdfc:reader ;
sh:name "reader" ;
sh:maxCount 1 ;
sh:class rdfc-js:JSFileReaderChannel
], [
sh:path rdfc:writer ;
sh:name "writer" ;
sh:maxCount 1 ;
sh:class rdfc-js:JSFileWriterChannel
] .

rdfc-js:JSFileRWChannelShape a sh:NodeShape;
sh:targetClass rdfc-js:JSFileReaderChannel, rdfc-js:JSFileWriterChannel ;
sh:property [
sh:path rdfc-js:filePath ;
sh:name "path" ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:datatype xsd:string ;
sh:description "Path of the used file"
], [
sh:path rdfc-js:fileOnReplace ;
sh:name "onReplace" ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:datatype xsd:boolean ;
sh:description "Boolean indicating if the files is always replaced, or appended to"
], [
sh:path rdfc-js:fileReadFirstContent ;
sh:name "readFirstContent" ;
sh:maxCount 1 ;
sh:datatype xsd:boolean ;
sh:description "Boolean indicating whether or not the initial content is also a message"
], [
sh:path rdfc-js:fileEncoding ;
sh:name "encoding" ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:description "The encoding used for the file"
].

rdfc-js:JSHttpChannelShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSHttpChannel ;
sh:property [
sh:path rdfc:reader ;
sh:name "reader" ;
sh:maxCount 1 ;
sh:class rdfc-js:JSHttpReaderChannel
], [
sh:path rdfc:writer ;
sh:name "writer" ;
sh:maxCount 1 ;
sh:class rdfc-js:JSHttpWriterChannel
] .

rdfc-js:JSHttpChannelReaderShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSHttpReaderChannel ;
sh:property [
sh:path rdfc-js:httpEndpoint ;
sh:name "endpoint" ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:description "Used endpoint"
], [
sh:path rdfc-js:httpPort ;
sh:name "port" ;
sh:maxCount 1 ;
sh:datatype xsd:integer ;
sh:description "Used port" ;
], [
sh:path rdfc-js:binary ;
sh:name "binary" ;
sh:maxCount 1 ;
sh:datatype xsd:boolean ;
sh:description "Stream raw bytes if true" ;
], [
sh:path rdfc-js:waitHandled ;
sh:name "waitHandled" ;
sh:maxCount 1 ;
sh:datatype xsd:boolean ;
sh:description "Wait for handlers to be have handled the incoming message"
], [
sh:path rdfc-js:responseCode ;
sh:name "responseCode" ;
sh:maxCount 1 ;
sh:datatype xsd:integer ;
sh:description "Specify the expected response code (default 200)"
] .

rdfc-js:JSHttpChannelWriterShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSHttpWriterChannel ;
sh:property [
sh:path rdfc-js:httpEndpoint ;
sh:name "endpoint" ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:datatype xsd:string ;
sh:description "Used endpoint"
], [
sh:path rdfc-js:httpMethod ;
sh:name "method" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:description "Used method"
] .

rdfc-js:JSWebSocketChannelShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSHWebSocketChannel ;
sh:property [
sh:path rdfc:reader ;
sh:name "reader" ;
sh:maxCount 1 ;
sh:class rdfc-js:JSWebSocketReaderChannel
], [
sh:path rdfc:writer ;
sh:name "writer" ;
sh:maxCount 1 ;
sh:class rdfc-js:JSWebSocketWriterChannel
] .

rdfc-js:JSWebSocketReaderChannelShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSWebSocketReaderChannel ;
sh:property [
sh:name "url" ;
sh:path rdfc-js:wsUrl ;
sh:datatype xsd:string ;
sh:maxCount 1 ;
sh:minCount 1
] .

rdfc-js:JSWebSocketWriterChannelShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSWebSocketWriterChannel ;
sh:property [
sh:name "port" ;
sh:path rdfc-js:wsPort ;
sh:datatype xsd:integer ;
sh:maxCount 1 ;
sh:minCount 1 ;
], [
sh:name "host" ;
sh:path rdfc-js:wsHost ;
sh:datatype xsd:string ;
sh:maxCount 1 ;
sh:minCount 1 ;
] .

rdfc-js:JSKafkaChannelShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSKafkaChannel ;
sh:property [
sh:path rdfc:reader ;
sh:name "reader" ;
sh:maxCount 1 ;
sh:class rdfc-js:JSKafkaReaderChannel
], [
sh:path rdfc:writer ;
sh:name "writer" ;
sh:maxCount 1 ;
sh:class rdfc-js:JSKafkaWriterChannel
] .

rdfc-js:JSKafkaReaderChannelShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSKafkaReaderChannel ;
sh:property [
sh:path rdfc-js:kafkaTopic ;
sh:name "topic" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:class rdfc-js:KafkaTopic ;
sh:description "Information about the used topic"
], [
sh:path rdfc-js:kafkaConsumer ;
sh:name "consumer" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:class rdfc-js:KafkaConsumer ;
sh:description "Information about the kafka consumer"
], [
sh:path rdfc-js:kafkaBroker ;
sh:name "broker" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:class rdfc-js:KafkaBroker ;
sh:description "Information about the kafka broker"
] .

rdfc-js:JSKafkaWriterChannelShape a sh:NodeShape ;
sh:targetClass rdfc-js:JSKafkaWriterChannel ;
sh:property [
sh:path rdfc-js:kafkaTopic ;
sh:name "topic" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:class rdfc-js:KafkaTopic ;
sh:description "Information about the used topic"
], [
sh:path rdfc-js:kafkaBroker ;
sh:name "broker" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:class :KafkaBroker ;
sh:description "Information about the kafka broker"
], [
sh:path rdfc-js:kafkaProducer ;
sh:name "producer" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:class rdfc-js:KafkaProducer ;
sh:description "Information about the kafka producer"
] .

rdfc-js:KafkaTopicShape a sh:NodeShape ;
sh:targetClass rdfc-js:KafkaTopic ;
sh:property [
sh:path rdfc-js:topicName ;
sh:name "name" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:description "Name of the topic"
], [
sh:path rdfc-js:topicFromBeginning ;
sh:name "fromBeginning" ;
sh:maxCount 1 ;
sh:datatype xsd:boolean ;
sh:description "Restart the topic from the beginning"
] .

rdfc-js:KafkaConsumerShape a sh:NodeShape ;
sh:targetClass rdfc-js:KafkaConsumer ;
sh:property [
sh:path rdfc-js:groupId ;
sh:name "groupId" ;
sh:minCount 1 ;
sh:maxCount 1 ;
sh:datatype xsd:string ;
sh:description "Group identifier"
].

rdfc-js:KafkaBrokerShape a sh:NodeShape ;
sh:targetClass rdfc-js:KafkaBroker ;
sh:property [
sh:path rdfc-js:brokerHost ;
sh:name "hosts" ;
sh:minCount 1 ;
sh:datatype xsd:string ;
sh:description "Broker host to connect to"
].

rdfc-js:KafkaProducerShape a sh:NodeShape ;
sh:targetClass rdfc-js:KafkaProducer .
] .
Loading

0 comments on commit 4c5a51d

Please sign in to comment.