<commit_before>## Documentation System

Nasdanika documentation system serves documentation topics and information about ECore models. Documentation is organized into a tree and also searchable.


### ECore models documentation

Documentation can be added to model elements through annotations with ``http://www.eclipse.org/emf/2002/GenModel`` source, which is where Sirius ECore diagram editor stored model documentation. In order for the documentation to be available at runtime ``Suppress GenModel Annotations`` shall be set to ``false`` in the generation model.

Documentation content is processed as markdown and as such can contain links and images, e.g.

```markdown
Dealership model package.

Class diagram: ![Class diagram](bundle:org.nasdanika.demo/doc/class_diagram.png)
```

To EPackages and EClassifiers documentation can be "mounted" by creating TOC entries and specifying namespace URI and classifier names. 

This [video](https://www.youtube.com/watch?v=qfvr6HWo_Ok) demonstrates how to create and document ECore model.

### Table of content (TOC) entries and topics

Table of content entries can be added through ``org.nasdanika.toc`` extension point defined in ``org.nasdanika.ecore`` bundle. TOC entries and topics can either reference a resource with documentation content or contain text, html, or markdown documentation elements. 

TOC entries can be mounted to:

* The root of the documentation tree, 
* Other topics and TOC's,
* Bundles, components, EPackages, and EClassifiers as sub-nodes, text in the overview tab, or tabs. 

### Search

Search is implemented with [Apache Lucene](https://lucene.apache.org/), query syntax is described [here](https://lucene.apache.org/core/5_3_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description).

### Web UI

Default Web UI (DocAppRoute class), supporting scripts and other resources are generated by the Nasdanika Application Workspace Wizard and can be customized if necessary.<commit_msg>Mounting of story model and test results to the documentation system.<commit_after>## Documentation System

Nasdanika documentation system serves documentation topics and information about ECore models. Documentation is organized into a tree and also searchable.


### ECore models documentation

Documentation can be added to model elements through annotations with ``http://www.eclipse.org/emf/2002/GenModel`` source, which is where Sirius ECore diagram editor stored model documentation. In order for the documentation to be available at runtime ``Suppress GenModel Annotations`` shall be set to ``false`` in the generation model.

Documentation content is processed as markdown and as such can contain links and images, e.g.

```markdown
Dealership model package.

Class diagram: ![Class diagram](bundle:org.nasdanika.demo/doc/class_diagram.png)
```

To EPackages and EClassifiers documentation can be "mounted" by creating TOC entries and specifying namespace URI and classifier names. 

This [video](https://www.youtube.com/watch?v=qfvr6HWo_Ok) demonstrates how to create and document ECore model.

### Table of content (TOC) entries and topics

Table of content entries can be added through ``org.nasdanika.toc`` extension point defined in ``org.nasdanika.ecore`` bundle. TOC entries and topics can either reference a resource with documentation content or contain text, html, or markdown documentation elements. 

TOC entries can be mounted to:

* The root of the documentation tree, 
* Other topics and TOC's,
* Bundles, components, EPackages, and EClassifiers as sub-nodes, text in the overview tab, or tabs. 

### Story model

Story model can be mounted to the documentation system with ``org.nasdanika.story.model`` extension point.

### Test results

[WebTest](https://github.com/Nasdanika/server/wiki/webtest) results model can be mounted to the documentation system with ``org.nasdanika.webtest.model.results`` extension point: 

```xml
<extension point="org.nasdanika.webtest.model.results">
    <result model="model/NasdanikaBankTests.xml"></result>
</extension>
```

### Search

Search is implemented with [Apache Lucene](https://lucene.apache.org/), query syntax is described [here](https://lucene.apache.org/core/5_3_1/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description).

### Web UI

Default Web UI (DocAppRoute class), supporting scripts and other resources are generated by the Nasdanika Application Workspace Wizard and can be customized if necessary.
{'fraction_non_alphanumeric': 0.0802660753880266, 'fraction_numerical': 0.003547671840354767, 'mean_word_length': 5.291492329149233, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 7, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1558615', 'n_tokens_mistral': 1197, 'n_tokens_neox': 1146, 'n_words': 510}