### Install and Test VS Code Extension Source: https://docs.rs/ontoindex-cli Installs dependencies and runs tests for the OntoCode VS Code extension. ```bash cd extension && npm ci && npm test ``` -------------------------------- ### Install OntoIndex CLI Source: https://docs.rs/ontoindex-cli Install the ontoindex-cli using cargo. This command is used to get the latest version of the CLI tool. ```bash cargo install ontoindex-cli ``` -------------------------------- ### Querying Classes with OntoIndex CLI Source: https://docs.rs/ontoindex-cli Demonstrates how to use the `ontoindex query` command to select all classes from a specified directory. Ensure you have Rust and Cargo installed, and the OntoIndex project is built. ```bash cargo run -- query ./fixtures "SELECT * FROM classes" ``` -------------------------------- ### Query Ontologies with OntoIndex CLI Source: https://docs.rs/ontoindex-cli Use the ontoindex CLI to query ontology files. This example demonstrates querying classes from a local fixture directory. ```bash ontoindex query ./fixtures "SELECT * FROM classes" ``` -------------------------------- ### Index and Inspect Workspace with OntoIndex CLI Source: https://docs.rs/ontoindex-cli Use the OntoIndex CLI to index and inspect a workspace. ```bash # Index and inspect a workspace cargo run -- inspect fixtures ``` -------------------------------- ### Query Classes with OntoIndex CLI Source: https://docs.rs/ontoindex-cli Query all classes from the fixtures using SQL syntax. ```bash # Query classes cargo run -- query fixtures "SELECT * FROM classes" ``` -------------------------------- ### Build OntoIndex CLI Source: https://docs.rs/ontoindex-cli Build the OntoIndex CLI project in release mode. ```bash # Build cargo build --release ``` -------------------------------- ### Build OntoIndex LSP Binary Source: https://docs.rs/ontoindex-cli Builds the OntoIndex language server protocol binary. ```bash cargo build -p ontoindex-lsp --bins ``` -------------------------------- ### Run OntoIndex CLI from Source Source: https://docs.rs/ontoindex-cli Execute the ontoindex binary directly from a cloned repository using cargo run. This is useful for development or testing. ```bash cargo run -- ``` -------------------------------- ### Perform SPARQL Query with OntoIndex CLI Source: https://docs.rs/ontoindex-cli Execute a SPARQL query against the fixtures. ```bash # SPARQL cargo run -- sparql fixtures "SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 5" ``` -------------------------------- ### JSON Output for Queries with OntoIndex CLI Source: https://docs.rs/ontoindex-cli Perform a query and output the results in JSON format. ```bash # JSON output cargo run -- query fixtures "SELECT * FROM classes" --format json ``` -------------------------------- ### OntoIndex Project Repository Layout Source: https://docs.rs/ontoindex-cli Shows the directory structure of the OntoIndex project, highlighting the purpose of each crate and directory. ```text crates/ ├── ontoindex-core # types, workspace scanner ├── ontoindex-parser # RDF parsing and entity extraction ├── ontoindex-catalog # index builder and semantic catalog ├── ontoindex-query # SQL-like and SPARQL engines ├── ontoindex-cli # `ontoindex` binary └── ontoindex-lsp # language server for OntoCode extension/ # VS Code extension (OntoCode Explorer) fixtures/ # sample ontology for tests scripts/ # extension packaging helpers docs/ # user guides (install, SQL, LSP API) docs/design/ # product specs, ADRs, wireframes, backlog examples/ # Rust examples and query cookbook tests/ # integration and golden snapshot tests ``` -------------------------------- ### Tagging and Pushing a Release Source: https://docs.rs/ontoindex-cli Tag the current commit with the version number and push the tag to the remote repository to trigger the release workflow. ```bash git tag v0.2.3 git push origin v0.2.3 ``` -------------------------------- ### Test OntoIndex Workspace Source: https://docs.rs/ontoindex-cli Runs all tests across the OntoIndex workspace. ```bash cargo test --workspace ``` -------------------------------- ### Validate Ontology with OntoIndex CLI Source: https://docs.rs/ontoindex-cli Validate the ontology files in fixtures. This command exits with a non-zero status on parse errors, making it suitable for CI. ```bash # Validate (non-zero exit on parse errors — CI-friendly) cargo run -- validate fixtures ``` -------------------------------- ### Format OntoIndex Code Source: https://docs.rs/ontoindex-cli Applies code formatting to all targets in the OntoIndex project. ```bash cargo fmt --all ``` -------------------------------- ### Validate Ontologies with OntoIndex CLI Source: https://docs.rs/ontoindex-cli Use the ontoindex CLI to validate ontology files in the current directory. This command checks for common issues and adherence to standards. ```bash ontoindex validate . ``` -------------------------------- ### OntoIndex Virtual Tables Source: https://docs.rs/ontoindex-cli Lists the virtual tables available for querying indexed ontology data, along with their descriptions. ```text Table | Description ---|--- `ontologies` | Indexed ontology documents `classes` | OWL/RDFS classes `object_properties` | OWL object properties `data_properties` | OWL datatype properties `annotation_properties` | OWL annotation properties `individuals` | OWL named individuals `entities` | All extracted entities `annotations` | Label/comment and other annotation triples `axioms` | Extracted axioms (e.g. SubClassOf) `namespaces` | Namespace prefixes `imports` | Ontology imports `properties` | Union of all property kinds ``` -------------------------------- ### OntoIndex Architecture Diagram Source: https://docs.rs/ontoindex-cli Visual representation of the OntoIndex and OntoCode relationship, illustrating the flow of information between the VS Code extension, the OntoIndex engine, and the ontology repository. ```text ┌─────────────────────────────────────┐ │ OntoCode (v0.2) │ │ VS Code extension + explorer UI │ └─────────────────┬───────────────────┘ │ ontoindex-lsp (stdio) ┌─────────────────▼───────────────────┐ │ OntoIndex (v0.2.3) │ │ Rust index, catalog, query, CLI, LSP │ └─────────────────┬───────────────────┘ │ Oxigraph / RDF parsers ┌─────────────────▼───────────────────┐ │ Your ontology repo │ │ .ttl .owl .rdf .jsonld … │ └─────────────────────────────────────┘ ``` -------------------------------- ### Lint OntoIndex Code Source: https://docs.rs/ontoindex-cli Runs Clippy linter on all targets, with warnings treated as errors. ```bash cargo clippy --all-targets -- -D warnings ``` -------------------------------- ### Filter Query Results with OntoIndex CLI Source: https://docs.rs/ontoindex-cli Filter query results to show specific columns for classes matching a name. ```bash # Filter results cargo run -- query fixtures "SELECT short_name, labels FROM classes WHERE short_name = 'Person'" ``` -------------------------------- ### Update OntoIndex Golden Snapshots Source: https://docs.rs/ontoindex-cli Updates golden snapshots for tests, specifically for the 'classes' test suite. ```bash ONTOINDEX_UPDATE_GOLDEN=1 cargo test golden_classes ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.