Skip to content

Commit

Permalink
Merge pull request #898 from opengisch/usablityname
Browse files Browse the repository at this point in the history
UsabILIty Hub / Topping Naming
  • Loading branch information
signedav authored Dec 2, 2024
2 parents bb57e06 + 9ad855e commit d6b100b
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 40 deletions.
4 changes: 2 additions & 2 deletions QgisModelBaker/gui/topping_wizard/generation_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def generate(self):
ilidata_file = self.topping_wizard.topping.makeit(QgsProject.instance())
if ilidata_file:
self.progress_bar.setValue(100)
result_message = self.tr("Topping generated 🧁")
result_message = self.tr("Toppings generated 🧁")
self.info_text_box.setHtml(f"Find the ilidata.xml here:\n\n{ilidata_file}")
else:
self.progress_bar.setValue(0)
result_message = self.tr("Topping not generated 💩")
result_message = self.tr("Toppings not generated 💩")
self.progress_bar.setFormat(result_message)
self.progress_bar.setTextVisible(True)
self.topping_wizard.log_panel.print_info(
Expand Down
1 change: 0 additions & 1 deletion QgisModelBaker/gui/topping_wizard/ili2dbsettings_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,4 +313,3 @@ def _schema_changed(self):

def _log_on_export_metagonfig_error(self, log):
QgsMessageLog.logMessage(log, self.tr("Export metaConfig"), Qgis.Critical)

10 changes: 4 additions & 6 deletions QgisModelBaker/gui/topping_wizard/topping_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ class ToppingWizard(QWizard):
def __init__(self, iface, base_config, parent):
QWizard.__init__(self, parent)

self.setWindowTitle(
self.tr("QGIS Model Baker UsabILIty Hub Topping Maker Wizard")
)
self.setWindowTitle(self.tr("QGIS Model Baker Topping Maker Wizard"))
self.setWizardStyle(QWizard.ModernStyle)
self.setOption(QWizard.NoCancelButtonOnLastPage)

Expand Down Expand Up @@ -115,11 +113,11 @@ def _current_page_title(self, id):
elif id == ToppingWizardPageIds.Additives:
return self.tr("Additive Project Settings")
elif id == ToppingWizardPageIds.ReferenceData:
return self.tr("Reference Data Selection")
return self.tr("Referenced Data Selection")
elif id == ToppingWizardPageIds.Ili2dbSettings:
return self.tr("Schema with ili2db Settings Selection")
elif id == ToppingWizardPageIds.Generation:
return self.tr("Make the Topping")
return self.tr("Make the Toppings")
else:
return self.tr("Model Baker - Workflow Wizard")

Expand All @@ -130,7 +128,7 @@ def __init__(self, iface, base_config, parent):
self.iface = iface
self.base_config = base_config

self.setWindowTitle(self.tr("Model Baker - UsabILIty Hub Topping Maker Wizard"))
self.setWindowTitle(self.tr("Model Baker - Topping Maker Wizard"))
self.log_panel = LogPanel()
self.topping_wizard = ToppingWizard(self.iface, self.base_config, self)
self.topping_wizard.setStartId(ToppingWizardPageIds.Target)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__(self, parent, title):
)
self.ilireferencedata_delegate = IliDataFileCompleterDelegate()
self.ilireferencedata_line_edit.setPlaceholderText(
self.tr("[Search referenced data files from UsabILIty Hub]")
self.tr("[Search referenced data from repositories]")
)
self.ilireferencedata_line_edit.setEnabled(False)
self.ilireferencedata_line_edit.textChanged.emit(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self, parent, title):
self.current_models = []
self.current_metaconfig_id = None
self.ili_metaconfig_line_edit.setPlaceholderText(
self.tr("[Search metaconfig / topping from UsabILIty Hub]")
self.tr("[Search metaconfiguration from repositories]")
)
self.ili_metaconfig_line_edit.setEnabled(False)
self.ili_metaconfig_line_edit.textChanged.emit(
Expand Down Expand Up @@ -543,7 +543,7 @@ def _load_metaconfig(self):
if "ch.interlis.referenceData" in configuration_section:
self.workflow_wizard.log_panel.print_info(
self.tr(
"Metaconfig contains transfer or catalogue toppings (reference data)."
"Metaconfig contains transfer or catalogue files (referenced data)."
),
LogLevel.TOPPING,
)
Expand All @@ -558,7 +558,7 @@ def _load_metaconfig(self):
name = pathlib.Path(referencedata_file_path).name
type = pathlib.Path(referencedata_file_path).suffix[1:]
self.workflow_wizard.log_panel.print_info(
self.tr("Append reference data file {}…").format(
self.tr("Append referenced data file {}…").format(
referencedata_file_path
),
LogLevel.TOPPING,
Expand All @@ -573,7 +573,7 @@ def _load_metaconfig(self):
)
else:
self.workflow_wizard.log_panel.print_info(
self.tr("Could not append reference data file {}…").format(
self.tr("Could not append referenced data file {}…").format(
referencedata_file_path
),
LogLevel.TOPPING,
Expand All @@ -594,7 +594,7 @@ def help_text(self):
<li>Selected from the repositories.</li>
<li>Parsed from the selected transfer or catalogue files.</li>
<li>Depending model of a catalogue referenced in the ilidata.xml of the repositories.</li>
<li>Defined as ili2db attribute in the metaconfiguration received from the UsabILIty Hub.</li>
<li>Defined as ili2db attribute in the metaconfiguration received from the repositories.</li>
</ul></p>
<p align="justify">You can <b>check or uncheck</b> the models you want to import to a physical schema.</p>
<p align="justify">As well you can select a <b>Metaconfiguration</b> file from the repositories to load ili2db settings and styling properties into QGIS project.<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(self, parent, title):
)
self.model_delegate = ModelCompleterDelegate()
self.input_line_edit.setPlaceholderText(
self.tr("[Browse for file or search model from repository]")
self.tr("[Browse for file or search model from repositories]")
)

# very unhappy about this behavior, but okay for prototype
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def _existing_projecttopping_id(self):
if len(projecttopping_id_list) > 1:
self.workflow_wizard.log_panel.print_info(
self.tr(
"Only one projectopping allowed. Taking first one of the list."
"Only one projec topping allowed. Taking first one of the list."
),
LogLevel.TOPPING,
)
Expand Down
4 changes: 2 additions & 2 deletions QgisModelBaker/gui/workflow_wizard/workflow_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def next_id(self):
if self.import_data_file_model.rowCount():
return PageIds.ImportDataConfiguration

# if transfer file are possible (by getting via UsabILIty Hub), go to the data import
# if transfer file are possible (by getting via Repositories), go to the data import
self.log_panel.print_info(
self.tr(
"Checking for potential referenced data on the repositories (might take a while)..."
Expand Down Expand Up @@ -346,7 +346,7 @@ def next_id(self):
if self.import_data_file_model.rowCount():
return PageIds.ImportDataConfiguration

# if transfer file are possible (by getting via UsabILIty Hub), go to the data import
# if transfer file are possible (by getting via Repositories), go to the data import
self.log_panel.print_info(
self.tr(
"Checking for potential referenced data on the repositories (might take a while)..."
Expand Down
2 changes: 1 addition & 1 deletion QgisModelBaker/qgismodelbaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def initGui(self):
os.path.dirname(__file__), "images/QgisModelBaker-topping-icon.svg"
)
),
self.tr("UsabILIty Hub Topping Exporter"),
self.tr("Topping Exporter"),
None,
)
self.__configseparator = QAction(None)
Expand Down
2 changes: 1 addition & 1 deletion QgisModelBaker/ui/topping_wizard/models.ui
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Select the type for which this topping should be made or specify none (allow all). This value will be written into the categories and the toppings will be filtered accordingly.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Select the models for which you want to find this topping at UsabILIty Hub.</string>
<string>Select the models for which you want to find this topping in the repositories.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<item row="3" column="0" rowspan="2">
<widget class="QLabel" name="ilireferencedata_label">
<property name="text">
<string>Topping Transferdata</string>
<string>Referenced Data</string>
</property>
</widget>
</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Metaconfiguration / Topping</string>
<string>Metaconfiguration</string>
</property>
</widget>
</item>
Expand Down
Binary file modified docs/docs/assets/usabilityhub_uml.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/docs/assets/usabilityhub_uml_modelbaker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ qgis.modelbaker.metaConfigParamsOnly = True
When this parameter is set the *Advanced Options* and *CRS* settings are disabled in the input mask.

!!! Warning
Be aware that the UsabILIty Hub Repository (located at https://models.opengis.ch) is not found by ili2db when it's not passed additionally to it with `--modelDir`. Currently we do that automatically. Means when you choose a metaconfig file to pass, `--modelDir https://models.opengis.ch` is automatically added to the command. Concerning custom directory/repository, you have to add it manually in the [Model Baker Settings](../../../user_guide/plugin_configuration/#custom-model-directories).
Be aware that the UsabILIty Toppings Repository (located at https://models.opengis.ch) is not found by ili2db when it's not passed additionally to it with `--modelDir`. Currently we do that automatically. Means when you choose a metaconfig file to pass, `--modelDir https://models.opengis.ch` is automatically added to the command. Concerning custom directory/repository, you have to add it manually in the [Model Baker Settings](../../../user_guide/plugin_configuration/#custom-model-directories).

### Refrencing other INTERLIS models
Using the ili2db settings, it is possible to reference other models from *metaconfiguration files*. If the setting contains the value `models=KbS_LV95_v1_4;KbS_Basis`, then this is also adjusted in the Model Baker input mask. Of course, a search for possible *metaconfiguration files* on UsabILIty Hub will be started again, according to the currently set models. See also for that [Multiple Models and their Toppings](#multiple-models-and-their-toppings).
Using the ili2db settings, it is possible to reference other models from *metaconfiguration files*. If the setting contains the value `models=KbS_LV95_v1_4;KbS_Basis`, then this is also adjusted in the Model Baker input mask. Of course, a search for possible *metaconfiguration files* on the Repositories will be started again, according to the currently set models. See also for that [Multiple Models and their Toppings](#multiple-models-and-their-toppings).

## Toppings

Expand Down Expand Up @@ -270,7 +270,7 @@ Catalogues can be linked directly in the ilidata.xml to the model names (without
</categories>
```

Model Baker checks the UsabILIty Hub repositories for all the models contained in the database schema. If it founds a referenced catalogue data it provides them in the autocomplete widget on [Data Import](../../../user_guide/import_workflow/#import-of-interlis-data).
Model Baker checks the repositories for all the models contained in the database schema. If it founds a referenced catalogue data it provides them in the autocomplete widget on [Data Import](../../../user_guide/import_workflow/#import-of-interlis-data).

```xml
<files>
Expand All @@ -286,7 +286,7 @@ Model Baker checks the UsabILIty Hub repositories for all the models contained i
</files>
```

But already before the data import, the Model Baker checks the UsabILIty Hub for those referenced data. In the [Import of the INTERLIS Models](../../../user_guide/import_workflow/#import-of-interlis-model) it provides all the models found in the `modelLink` property.
But already before the data import, the Model Baker checks the repositories for those referenced data. In the [Import of the INTERLIS Models](../../../user_guide/import_workflow/#import-of-interlis-model) it provides all the models found in the `modelLink` property.

```xml
<baskets>
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/background_info/usabilityhub/technical_concept.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Additional servers/repositories can be linked via the `ilisite.xml`. The `Datase
```

### Filtering
The `categories` element in the `DatasetMetadata` contains a list of `Code_` elements. These can be used for filtering. In the context of the UsabILIty Hub, the following two categories are primarily used.
The `categories` element in the `DatasetMetadata` contains a list of `Code_` elements. These can be used for filtering. In the context of the UsabILIty Toppings, the following two categories are primarily used.

#### Model
The category for the model is identified with the prefix http://codes.interlis.ch/model/ and contains the model name.
Expand All @@ -80,7 +80,7 @@ The category for the file type is identified with the prefix http://codes.interl
</DatasetIdx16.Code_>
```

In the UsabILIty Hub implementation of the Model Baker, the following types are used:
In the UsabILIty Toppings implementation of the Model Baker, the following types are used:
- `metaconfig` to describe that it is a *metaconfiguration file*.
- `metaattributes` to describe that it is a meta attribute file written in TOML or INI.
- `sql` to describe that it is a SQL query file that can be used when creating the database
Expand All @@ -105,7 +105,7 @@ Thus, models can be found across multiple repositories and so can *metaconfigura
<IliSite09.SiteMetadata.Site TID="1">
<Name>usability.opengis.ch</Name>
<Title>Allgemeine metadaten für ili-modelle</Title>
<shortDescription>Weitere Sites des UsabILItyHubs</shortDescription>
<shortDescription>Weitere Sites dieses Repos</shortDescription>
<Owner>http://models.opengis.ch</Owner>
<technicalContact>mailto:[email protected]</technicalContact>
<subsidiarySite>
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/background_info/usabilityhub/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Or with a ili2db metaattribute `toml`/`ini` file.

![raw_import_toml](../../assets/usabilityhub_raw_import_toml.png)

The metaatribute `toml` / `ini` file was created for the Nutzungsplan project. This file is specified in the Model Baker under "Advanced Options" and "Extra Meta Attribute File" and will also be included via the UsabILIty Hub in the following steps:
The metaatribute `toml` / `ini` file was created for the Nutzungsplan project. This file is specified in the Model Baker under "Advanced Options" and "Extra Meta Attribute File" and will also be included via the UsabILIty Toppings workflow in the following steps:

![toml_config](../../assets/usabilityhub_toml_config.png)

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/user_guide/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ With the OID Manager you can view and set the handling of the OIDs in the curren

Find further information about [OIDs in general and the OID Manager](../background_info/oid_tid_generator.md)

### UsabILIty Hub Topping Exporter
### Topping Exporter

In case you plan to create your own [UsabILIty Hub](../background_info/usabilityhub/modelbaker_integration.md) topping set, then you can use the [Topping Exporter](../user_guide/topping_exporter.md).
In case you plan to create your own [UsabILIty Topping set](../background_info/usabilityhub/modelbaker_integration.md), then you can use the [Topping Exporter](../user_guide/topping_exporter.md).

![usabilityhub-exporter](../assets/usabilityhub_exporter_target.png)

Expand Down
12 changes: 6 additions & 6 deletions docs/docs/user_guide/import_workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ There are several ways the Model Baker wizard detects INTERLIS models to import.
- Selected from the repositories.
- Parsed from the selected transfer or catalogue files.
- Depending model of a catalogue referenced in the ilidata.xml of the repositories.
- Defined as ili2db attribute in the metaconfiguration received from the [UsabILIty Hub](../../background_info/usabilityhub/modelbaker_integration).
- Defined as ili2db attribute in the metaconfiguration received from the repositories. See [UsabILIty Toppings](../../background_info/usabilityhub/modelbaker_integration).

When you only got a model name (like in all cases except the one of the local `ini` files) the models are searched in the [repositories](../../background_info/repositories) or [custom model directories](../plugin_configuration/#custom-model-directories). It's possible that the models are listed multiple times coming from different sources. It's up to you what source you choose.

Expand All @@ -69,7 +69,7 @@ You can check or uncheck the models you want to import to a physical schema.

### Metaconfiguration / Topping

Choose a metaconfiguration file found on the [UsabILIty Hub](../../background_info/usabilityhub/modelbaker_integration/) to load ili2db settings and styling properties to your QGIS project.
Choose a metaconfiguration file found on the [repositories](../../background_info/usabilityhub/modelbaker_integration/) to load ili2db settings and styling properties to your QGIS project.

### Ili2db settings
Since Model Baker uses ili2db, you can set advanced options that determine how your conceptual object-oriented model is mapped into a physical model.
Expand Down Expand Up @@ -145,11 +145,11 @@ Select the dataset you want to import your data to by double-click the dataset f

If the data to import is a catalogue, please select the checkbox for *catalogue* and it will be imported into a dataset made for catalogues (called `catalogueset`).

### Topping Transfer Data
### Transfer Data from the repositories

Not only meta data for ili2db and styling can be received over the ilidata.xml from the *UsabILIty Hub* repositories. As well there can be found catalogue data referenced over the model name. This means Model Baker checks the UsabILIty Hub repositories for all the models contained in the database schema. If it founds referenced catalogue data it provides them to you in the autocomplete widget. Add them with the ![plus button](../assets/plus_button.png) (the needed models have been suggested in the [INTERLIS model import](#import-of-interlis-model) already).
Not only meta data for ili2db and styling can be received over the ilidata.xml from the repositories. As well there can be found catalogue data referenced over the model name. This means Model Baker checks the repositories for all the models contained in the database schema. If it founds referenced catalogue data it provides them to you in the autocomplete widget. Add them with the ![plus button](../assets/plus_button.png) (the needed models have been suggested in the [INTERLIS model import](#import-of-interlis-model) already).

Check more information about the catalogues on the *UsabILIty Hub* [here](../../background_info/usabilityhub/modelbaker_integration/#directly-referenced-catalogues).
Check more information about the catalogues on the repositories [here](../../background_info/usabilityhub/modelbaker_integration/#directly-referenced-catalogues).

### Delete data first

Expand All @@ -159,7 +159,7 @@ If you want to delete the data in the database first, you can check the correspo

In case you want to generate your project from an existing database, you will need to [set the connection parameters](#database-selection) first.

Then, with a simple click you generate your project. All the toppings received from the *UsabILIty Hub* are considered here.
Then, with a simple click you generate your project. All the toppings received from the *repositories* are considered here.

![baked project](../assets/generated_project.png)

Expand Down
Loading

0 comments on commit d6b100b

Please sign in to comment.