> For the complete documentation index, see [llms.txt](https://sws.gitbook.io/sws-questionnaires/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sws.gitbook.io/sws-questionnaires/software/design/model.md).

# Model

In this Section, we outline an **object model** of questionnaires that embodies all the notions we have discussed so far.

> the discussion mirrors an actual implementation, though we don't describe APIs or other code-level detais.

We can divide objects along three axes. The first axis separates objects that model the data inside questionnaires (**data objects**) and objects that model aspects of their presentation (**layout objects**).

* selections, dimensions, flags, and points are examples of data objects. Themes, components and properties are examples of layout objects.&#x20;

The second axis separates questionnaires and their parts (**instance objects**) from the specifications that generate them (**specification objects**).

* we have specifications for selections, for layout components, for questionnaire parameters, and so on.
* specifications are authored by *administrative users* during questionnaire design, so we have the onus to validate them. Instance objects are rendered for and edited by *end users*, but edits cannot alter their structure hence require little or no validation.

The third axis separates objects that model domain concepts (**domain objects**), from general-purpose objects that help us building domain objects consistently (**common objects**).

* questionnaires, selections, and components are examples of domain objects. Identifiers, labels, descriptors, and life cycles are examples of common objects.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sws.gitbook.io/sws-questionnaires/software/design/model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
