DL Query cookbook¶
Manchester class-expression queries via CLI (Query Workbench DL mode and LSP strixonomy/dlQuery share the same engine).
Honesty and limits: DL Query guide.
Requires a clone (or your own files)
Samples below use repo fixtures/. After cargo install, replace fixtures with your ontology directory or the First success tutorial folder.
Usage: strixonomy dl-query <expression> [--workspace PATH] — expression is the only positional; workspace defaults to . via --workspace.
Expressions accept prefix:local QNames (resolved from indexed ontology prefixes) or angle-bracket IRIs <http://…>. There is no --prefix CLI flag. Prefer <…> when several files bind the same short prefix (for example both tutorial fixtures use ex:). Flags: --workspace, --profile, --mode, --format only — CLI reference.
Named class (inferred)¶
strixonomy dl-query 'ex:ClinicPerson' --workspace fixtures \
--profile rl \
--mode inferred
strixonomy dl-query '<http://example.org/clinic#ClinicPerson>' --workspace fixtures \
--format json
(ex: comes from complex-classes.ttl.)
Asserted instances¶
strixonomy dl-query '<http://example.org/people#Person>' --workspace fixtures \
--mode asserted \
--format json
Use the absolute IRI here so Person resolves to the people ontology even when other fixtures also bind ex:.
Anonymous expression¶
strixonomy dl-query \
'ex:Patient and ex:hasRecord some ex:MedicalRecord' \
--workspace fixtures \
--profile dl
CI tip¶
Pin CLI with --version 0.27.0 (or the release tarball for Linux x64). Treat results as OntoLogos-backed — dual-check critical audits against Protégé when required.