# `DCATR.Directory`
[🔗](https://github.com/dcat-r/dcatr-ex/blob/v0.1.0/lib/dcatr/model/directory.ex#L1)

A named collection of graphs and nested directories.

Directories enable hierarchical organization of graphs, providing structure for navigation,
scoped metadata, and targeted operations.

Each directory can contain `DCATR.Graph`s and nested `DCATR.Directory`s as members.

## Access Functions

### Direct access (non-recursive)

- `members/1` - all direct Element members
- `graphs/1` - direct Graph members only (callback)
- `directories/1` - direct Directory members only (callback)

### Recursive access (generated by `DCATR.Directory.Type`)

- `all_graphs/1` - all Graphs through entire sub-directory tree
- `all_members/1` - all Elements through entire sub-directory tree
- `find_graph/2` - find Graph by ID recursively

# `t`

```elixir
@type t() :: %DCATR.Directory{
  __additional_statements__: term(),
  __id__: term(),
  members: term()
}
```

# `all_graphs`

```elixir
@spec all_graphs(DCATR.Directory.Type.schema()) :: [DCATR.Graph.t()]
```

Returns all graphs through the entire sub-directory tree.

# `all_members`

```elixir
@spec all_members(DCATR.Directory.Type.schema()) :: [DCATR.Element.t()]
```

Returns all elements through the entire sub-directory tree.

# `build`

# `build`

# `build!`

# `build!`

# `build_id`

# `find_graph`

```elixir
@spec find_graph(DCATR.Directory.Type.schema(), RDF.IRI.coercible()) ::
  DCATR.Graph.t() | nil
```

Finds a graph by ID recursively through the sub-directory tree.

# `from`

```elixir
@spec from(Grax.Schema.t()) :: {:ok, t()} | {:error, any()}
```

# `from!`

```elixir
@spec from!(Grax.Schema.t()) :: t()
```

# `load`

```elixir
@spec load(
  RDF.Graph.t() | RDF.Description.t(),
  RDF.IRI.coercible() | RDF.BlankNode.t(),
  opts :: keyword()
) :: {:ok, t()} | {:error, any()}
```

# `load!`

```elixir
@spec load!(
  RDF.Graph.t() | RDF.Description.t(),
  RDF.IRI.coercible() | RDF.BlankNode.t(),
  opts :: keyword()
) :: t()
```

# `members`

```elixir
@spec members(DCATR.Directory.Type.schema()) :: [DCATR.Element.t()]
```

Returns all direct element members.

# `new`

# `new!`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
