# owl_imports_combiner (Python service)

One-shot utility container that loads an ontology and recursively follows `owl:imports`, then writes a single combined Turtle file.

This is useful to precompute a single TTL for AnzoGraph loading.

## Run

Via Docker Compose:

```bash
docker compose run --rm owl_imports_combiner
```

The service mounts `./data → /data`, so use output paths under `/data/...`.

## Environment variables

- `COMBINE_OWL_IMPORTS_ON_START` (default `false`)
  - If `false`, the container exits without doing anything.
- `COMBINE_ENTRY_LOCATION`
  - Entry ontology: local path, `file://` URI, or `http(s)` URL.
  - If unset, falls back to `TTL_PATH`.
- `COMBINE_OUTPUT_LOCATION`
  - Output location (local file path or `file://` URI). Required if entry is an `http(s)` URL.
- `COMBINE_OUTPUT_NAME` (default `combined_ontology.ttl`)
  - Used only when `COMBINE_OUTPUT_LOCATION` is unset and entry is a local file.
- `COMBINE_FORCE` (default `false`)
  - Overwrite output if it already exists.
- `LOG_LEVEL` (default `INFO`)

## Behavior

- If the output exists and `COMBINE_FORCE=false`, it skips the combine step.
- Output is written atomically via a temporary file + rename.

