Buses and Actors
On this page
This page gives an overview of all buses and actors that are used in the default Comunica engines, such as Comunica SPARQL and Comunica SPARQL File Other configurations such as Comunica SPARQL HDT contain additional actors and buses.
This builds upon the core architecture of actors, mediators, and buses. An overview of how these buses and actors are connected can be found in the SPARQL architecture.
Init
Package: @comunica/bus-init
All Comunica engines start here. This is where they accept generic input parameters, such as CLI arguments.
Subscribed actors need to implement ActorInit
.
Actors
Name | Package | Description |
---|---|---|
Comunica SPARQL | @comunica/actor-init-sparql | Initializes SPARQL query execution by parsing the given query, optimizing, executing, and serializing results. |
Context Preprocess
Package: @comunica/bus-context-preprocess
A bus in which actors can optionally modify the query context.
Subscribed actors need to implement ActorContextPreprocess
.
Contains no actors yet.
SPARQL Parse
Package: @comunica/bus-sparql-parse
Parsing an input query into SPARQL algebra.
Subscribed actors need to implement ActorSparqlParse
.
Actors
Name | Package | Description |
---|---|---|
SPARQL Algebra | @comunica/actor-sparql-parse-algebra | Uses SPARQLAlgebra.js for parsing SPARQL query strings into SPARQL algebra. |
GraphQL | @comunica/actor-sparql-parse-graphql | Parses GraphQL strings into SPARQL algebra following the GraphQL-LD approach. |
Optimize Query Operation
Package: @comunica/bus-optimize-query-operation
Apply optional optimizations to the SPARQL algebra before actual execution.
Subscribed actors need to implement ActorOptimizeQueryOperation
.
Actors
Name | Package | Description |
---|---|---|
Join BGP | @comunica/actor-optimize-query-operation-join-bgp | Merges joins of multiple BGPs into a single BGP. |
Query Operation
Package: @comunica/bus-query-operation
Evaluates SPARQL algebra operations.
Subscribed actors need to implement ActorQueryOperation
or ActorQueryOperationTyped
.
Actors
Name | Package | Description |
---|---|---|
Ask | @comunica/actor-query-operation-ask | Handles ASK operations. |
BGP empty | @comunica/actor-query-operation-bgp-empty | Handles empty BGPs. |
BGP left deep smallest | @comunica/actor-query-operation-bgp-left-deep-smallest | Handles BGPs in a left-deep manner based on the pattern with the smallest item count. |
BGP left deep smallest sort | @comunica/actor-query-operation-bgp-left-deep-smallest-sort | Handles BGPs in a left-deep manner based on the pattern with the smallest item count and sorting by variable count in triple patterns. |
BGP single | @comunica/actor-query-operation-bgp-single | Handles a BGP with one triple pattern. |
Construct | @comunica/actor-query-operation-construct | Handles CONSTRUCT operations. |
Describe subject | @comunica/actor-query-operation-describe-subject | Handles DESCRIBE operations. |
Distinct hash | @comunica/actor-query-operation-distinct-hash | Handles DISTINCT operations through hashing. |
Extend | @comunica/actor-query-operation-extend | Handles EXTEND operations. |
Filter direct | @comunica/actor-query-operation-filter-direct | Handles FILTER operations in a direct, but non-spec-compliant manner. |
Filter Sparqlee | @comunica/actor-query-operation-filter-sparqlee | Handles FILTER operations using Sparqlee |
From quad | @comunica/actor-query-operation-from-quad | handles FROM operations by considering FROM and FROM NAMED as target graph elements in quads. |
Group | @comunica/actor-query-operation-group | Handles GROUP BY operations. |
Join | @comunica/actor-query-operation-join | Handles join operations by delegating to @comunica/bus-rdf-join . |
Left join left deep | @comunica/actor-query-operation-leftjoin-left-deep | Handles OPTIONAL operations in a left-deep manner. |
Left join nested loop | @comunica/actor-query-operation-leftjoin-nested-loop | Handles OPTIONAL operations in a nested loop manner. |
Minus | @comunica/actor-query-operation-minus | Handles MINUS operations. |
Order by direct | @comunica/actor-query-operation-orderby-direct | Handles ORDER BY operations in a direct, but non-spec-compliant manner. |
Order by Sparqlee | @comunica/actor-query-operation-orderby-sparqlee | Handles ORDER BY operations using Sparqlee |
Path Alt | @comunica/actor-query-operation-path-alt | Handles alt property path expressions. |
Path Inv | @comunica/actor-query-operation-path-inv | Handles inv property path expressions. |
Path Link | @comunica/actor-query-operation-path-link | Handles link property path expressions. |
Path Nps | @comunica/actor-query-operation-path-nps | Handles nps property path expressions. |
Path One or more | @comunica/actor-query-operation-path-one-or-more | Handles one-or-more property path expressions. |
Path Seq | @comunica/actor-query-operation-path-seq | Handles seq property path expressions. |
Path Zero or more | @comunica/actor-query-operation-path-zero-or-more | Handles zero-or-more property path expressions. |
Path Zero or one | @comunica/actor-query-operation-path-zero-or-one | Handles zero-or-one property path expressions. |
Project | @comunica/actor-query-operation-project | Handles SELECT operations. |
Quad pattern | @comunica/actor-query-operation-quadpattern | Handles triple/quad patterns. |
Reduced hash | @comunica/actor-query-operation-reduced-hash | Handles REDUCED operations through hashing. |
Service | @comunica/actor-query-operation-service | Handles SERVICE operations. |
Slice | @comunica/actor-query-operation-slice | Handles LIMIT and OFFSET operations. |
SPARQL endpoint | @comunica/actor-query-operation-sparql-endpoint | Delegates a full SPARQL query to a SPARQL endpoint if there is only a single SPARQL endpoint source. |
Union | @comunica/actor-query-operation-union | Handles UNION operations. |
Values | @comunica/actor-query-operation-values | Handles VALUES operations. |
SPARQL Serialize
Package: @comunica/bus-sparql-serialize
Serializes the query result into a text-based serialization.
Subscribed actors need to implement ActorSparqlSerialize
.
Actors
Name | Package | Description |
---|---|---|
JSON | @comunica/actor-sparql-serialize-json | Serializes to a simple JSON format. |
RDF | @comunica/actor-sparql-serialize-rdf | Serializes to an RDF format by delegating to @comunica/bus-rdf-serialize . |
Simple | @comunica/actor-sparql-serialize-simple | Serializes to a simple format. |
SPARQL CSV | @comunica/actor-sparql-serialize-sparql-csv | Serializes to SPARQL/CSV. |
SPARQL JSON | @comunica/actor-sparql-serialize-sparql-json | Serializes to SPARQL/JSON. |
SPARQL TSV | @comunica/actor-sparql-serialize-sparql-tsv | Serializes to SPARQL/TSV. |
SPARQL XML | @comunica/actor-sparql-serialize-sparql-xml | Serializes to SPARQL/XML. |
Stats | @comunica/actor-sparql-serialize-stats | Serializes basic statistics. |
Table | @comunica/actor-sparql-serialize-table | Serializes in a simple table format. |
Tree | @comunica/actor-sparql-serialize-tree | Serializes to a JSON tree. |
RDF Serialize
Package: @comunica/bus-rdf-serialize
Serializes quads to an RDF serialization format.
Subscribed actors need to implement ActorRdfSerialize
.
Actors
Name | Package | Description |
---|---|---|
JSON-LD | @comunica/actor-rdf-serialize-jsonld | Serializes to JSON-LD. |
N3 | @comunica/actor-rdf-serialize-n3 | Serializes to Turtle, Trig, N-triples, or N-Quads. |
RDF Join
Package: @comunica/bus-rdf-join
Handles joining of bindings streams.
Subscribed actors need to implement ActorRdfJoin
.
Actors
Name | Package | Description |
---|---|---|
Hash | @comunica/actor-rdf-join-jsonld | Hash join. |
Multi sequential | @comunica/actor-rdf-join-multi-sequential | Multi-join by just picking the two of them hierarchically. |
Multi smallest | @comunica/actor-rdf-join-multi-smallest | Multi-join by always picking the first two streams with smallest estimate cardinality. |
Nested loop | @comunica/actor-rdf-join-nestedloop | Nested loop join. |
Symmetric hash | @comunica/actor-rdf-join-symmetrichash | Symmetric hash join. |
RDF Resolve Quad Pattern
Package: @comunica/bus-rdf-resolve-quad-pattern
Translates a quad pattern into a stream of quad.
Subscribed actors need to implement ActorRdfResolveQuadPattern
.
Actors
Name | Package | Description |
---|---|---|
Federated | @comunica/actor-rdf-resolve-quad-pattern-federated | Translates the array of sources in the query context into the union of quad streams by resolving each source separately in the RDF Resolve Quad Pattern bus. |
Hypermedia | @comunica/actor-rdf-resolve-quad-pattern-hypermedia | Resolves the quad stream of a resource by interpreting hypermedia links and controls. |
RDF/JS Source | @comunica/actor-rdf-resolve-quad-pattern-rdfjs-source | Resolves the quad stream from an RDF/JS Source |
RDF Dereference
Package: @comunica/bus-rdf-dereference
Dereferences a path or URL into a stream of quads.
Subscribed actors need to implement ActorRdfDereference
.
Actors
Name | Package | Description |
---|---|---|
File | @comunica/actor-rdf-dereference-file | Dereferences RDF from a local file. Invokes parsing with @comunica/bus-rdf-parse . |
HTTP | @comunica/actor-rdf-dereference-http-parse | Dereferences RDF from a remote file. Invokes parsing with @comunica/bus-rdf-parse , and HTTP lookups with @comunica/bus-http . |
RDF Parse
Package: @comunica/bus-rdf-parse
Parses quads from a serialization format.
Subscribed actors need to implement ActorRdfParse
.
Actors
Name | Package | Description |
---|---|---|
HTML | @comunica/actor-rdf-parse-html | Parses HTML documents by delegating to @comunica/bus-rdf-parse-html . |
JSON-LD | @comunica/actor-rdf-parse-jsonld | Parses JSON-LD. |
N3 | @comunica/actor-rdf-parse-n3 | Parses Turtle, Trig, N-triples, or N-Quads. |
RDF/XML | @comunica/actor-rdf-parse-rdfxml | Parses RDF/XML. |
XML RDFa | @comunica/actor-rdf-parse-xml-rdfa | Parses RDFa in XML. |
RDF Parse HTML
Package: @comunica/bus-rdf-parse-html
Parses quads from an HTML document.
Subscribed actors need to implement ActorRdfParseHtml
.
Actors
Name | Package | Description |
---|---|---|
RDFa | @comunica/actor-rdf-parse-html-rdfa | Parses RDFa. |
Microdata | @comunica/actor-rdf-parse-html-microdata | Parses Microdata to RDF. |
Script | @comunica/actor-rdf-parse-html-script | Parses script tags and attempts to parse them by delegating to @comunica/bus-rdf-parse . |
HTTP
Package: @comunica/bus-http
Performs HTTP(S) requests.
Subscribed actors need to implement ActorHttp
.
Actors
Name | Package | Description |
---|---|---|
Memento | @comunica/actor-http-memento | Implements the Memento protocol. |
Native | @comunica/actor-http-native | Performs requests using Node's request library. |
Fetch | @comunica/actor-http-fetch | Performs requests using the fetch API. |
Proxy | @comunica/actor-http-proxy | Run requests through a proxy. |
RDF Metadata
Package: @comunica/bus-rdf-metadata
Extracts the quads relevant for metadata from the stream of data quads.
Subscribed actors need to implement ActorRdfMetadata
.
Actors
Name | Package | Description |
---|---|---|
All | @comunica/actor-rdf-metadata-all | Considers all incoming quads as both data and metadata quads. |
Primary topic | @comunica/actor-rdf-metadata-primary-topic | Splits off the metadata based on the existence of a foaf:primaryTopic link. |
Triple predicate | @comunica/actor-rdf-metadata-triple-predicate | Splits off the metadata based on the existence of a preconfigured set of predicates with the page url as subject. |
RDF Metadata Extract
Package: @comunica/bus-rdf-metadata-extract
Create an object with metadata for a given metadata quad stream.
Subscribed actors need to implement ActorRdfMetadataExtract
.
Actors
Name | Package | Description |
---|---|---|
Hydra Controls | @comunica/actor-rdf-metadata-extract-hydra-controls | Extract controls using the Hydra vocabulary. |
Hydra Count | @comunica/actor-rdf-metadata-extract-hydra-count | Extract count estimates using the Hydra vocabulary. |
SPARQL Service | @comunica/actor-rdf-metadata-extract-sparql-service | Extract SPARQL service description metadata. |
RDF Resolve Hypermedia Links
Package: @comunica/bus-rdf-resolve-hypermedia-links
Determines which links should be followed from the metadata of the current source.
Subscribed actors need to implement ActorRdfResolveHypermediaLinks
.
Actors
Name | Package | Description |
---|---|---|
Next | @comunica/actor-rdf-resolve-hypermedia-links-next | Follow next page links. |
RDF Resolve Hypermedia
Package: @comunica/bus-rdf-resolve-hypermedia
Handle a source based on the extracted metadata.
Subscribed actors need to implement ActorRdfResolveHypermedia
.
Actors
Name | Package | Description |
---|---|---|
None | @comunica/actor-rdf-resolve-hypermedia-none | The source is considered a raw RDF file, for which all data quads matching the quad pattern are returned. |
QPF | @comunica/actor-rdf-resolve-hypermedia-qpf | The source is considered a Triple/Quad Pattern Fragments interface. |
SPARQL | @comunica/actor-rdf-resolve-hypermedia-sparql | The source is considered a SPARQL endpoint if it has a service description, for which we use the SPARQL protocol. |