You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the generated `docs/odk-workflows/components.md` file to:
* remove the bits about having to manually update the -edit file and the
catalog file, since this is now done automatically by the ODK;
* remove the bit about having to create a custom rule to generate a
component derived from a template, and explain instead how the ODK can
be configured to generate such a rule automatically (`use_template`
option);
* also show how the ODK can be configured to derive components from
mappings or to fetch a remote component.
closes#1226
Copy file name to clipboardExpand all lines: template/_dynamic_documentation.jinja2
+27-16Lines changed: 27 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -704,38 +704,49 @@ components:
704
704
- filename: your-component-name.owl
705
705
```
706
706
707
-
3) Add the component to your catalog file (src/ontology/catalog-v001.xml)
707
+
3) Refresh your repo by running `sh run update_repo`. This will automatically (1) create a new file in `src/ontology/components/`, (2) update the `-edit` file so that it imports `{{ project.uribase }}/{%ifproject.uribase_suffixisnotnone%}{{ project.uribase_suffix }}{%else%}{{ project.id }}{%endif%}/components/your-component-name.owl` (the IRI of your new component), and (3) update the XML catalog file (`src/ontology/catalog-v001.xml`) to redirect that IRI to the file in the `src/ontology/components` directory, so that the new component can be found by tools such as Protégé or ROBOT, when they load the `-edit` file.
708
+
709
+
If your component is to be generated by some automated process, add a goal in your custom Makefile (`src/ontology/{{ project.id }}.Makefile`) and make it perform any task needed to generate the component:
708
710
709
711
```
710
-
<uriname="{{ project.uribase }}/{% if project.uribase_suffix is not none %}{{ project.uribase_suffix }}{% else %}{{ project.id }}{% endif %}/components/your-component-name.owl"uri="components/your-component-name.owl"/>
712
+
$(COMPONENTSDIR)/your-component-name.owl: $(SRC)
713
+
<Insertherethecodetoproducethecomponent>
711
714
```
712
715
713
-
4) Add the component to the edit file (src/ontology/{{ project.id }}-edit.obo)
714
-
for .obo formats:
716
+
If the component is to be generated from a ROBOT template, the ODK can generate the appropriate code for you. For that, when adding the component fo the ODK configuration file (step 2 above), explicitly indicate that the component should be derived from template(s) and list the source templates:
In this example, the component will be derived from the templates found in `src/templates/template1.tsv` and `src/templates/template2.tsv`. Initial empty templates will automatically be generated when the repository is refreshed (step 3).
729
+
730
+
Likewise, the ODK can generate the required code for the case where the component is to be derived from SSSOM mappings:
5) Refresh your repo by running `sh run.sh make update_repo` - this should create a new file in src/ontology/components.
727
-
6) In your custom makefile (src/ontology/{{ project.id }}.Makefile) add a goal for your custom make file. In this example, the goal is a ROBOT template.
741
+
and for the case where the component is to be fetched from a remote resource:
0 commit comments