.. _auto_ontology_from_json: *ONTOLOGY FROM JSON* ==================== Builds an RDF/SPARQL ontology store from a JSON graph file (nodes + edges) or inline JSON text. The schema can be supplied explicitly or inferred automatically from the graph data. Use this worker to populate a named ARC2 triple-store that downstream ontology-aware agents can query. When to use ----------- Tagged: ``arc2``, ``graph``, ``json``, ``namespace``, ``ontology``, ``rdf``, ``schema-inference``, ``sparql``. Inputs ------ .. list-table:: :header-rows: 1 :widths: 20 20 20 20 20 20 * - Label - ID - Type - Default - Required - Description * - JSON Zip or File - json_zip_or_file - file - — - - A single JSON file containing top-level 'nodes' and 'edges' arrays, or a ZIP archive containing multiple such JSON graph files; mutually exclusive with json_graph — provide one or the other. * - Ontology Store Name - ontology_store_name - text - — - ✓ - Unique human-readable name for the ARC2 triple-store to create; the worker prepends 'arc2_ontology_' internally, so supply only the logical name (e.g. 'my_simulation'). * - Ontology Type - ontology_type - text - — - ✓ - Namespace identifier that scopes all URIs in this ontology (e.g. 'assembly', 'simulation', 'material'); resolves to http://example.org/{type}# — defaults to 'ontology' if left blank. * - Ontology Schema Text (Optional) - ontology_schema_text - textarea - — - - Optional explicit schema JSON entered in the code editor, defining node types, edge types, domains, and ranges; if omitted, the schema is inferred automatically from the graph data. * - Drop Existing Store if Exists - drop_existing_store_if_exists - boolean - False - - When true, drops and recreates the named triple-store if it already exists; defaults to false, which returns the existing store name without modification. * - Bulk Insert Method - use_bulk_insert_method - select - array - - Triple insertion strategy: 'array' (default, recommended) uses ARC2's native array insert; 'turtle' converts triples to N-Triples format before bulk loading — change only if you encounter ARC2 compatibility issues. Outputs ------- .. list-table:: :header-rows: 1 :widths: 20 20 20 20 * - Label - ID - Type - Description * - Status - status - text - Human-readable result message describing whether the store was created, already existed, or encountered an error, including a note on whether the schema was inferred or explicitly supplied. * - Ontology Store Name - ontology_store_name - text - The logical (display) name of the newly created or existing ARC2 triple-store, with the internal 'arc2_ontology_' prefix stripped — pass this to downstream ontology query workers. * - Inferred Schema - inferred_schema - text - JSON-formatted schema that was actually applied during store creation, showing discovered or explicitly provided node types, edge types, and their domain/range mappings; empty if the worker returned early. Disciplines ----------- - data.io.file - platform.ontology .. raw:: html
Auto-generated from platform schema. Worker id: ontology_from_json. Schema hash: 1f13f48383ac. Hand-curated docs in workerexamples/ override this page when present.