-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new functional metadata structureTreeTitle
for labels in metadata editor structure tree
#5882
Comments
May I ask, what exactly do you mean by |
My concern is, that this implicit priority is going to become a problem in some special scenarios. For example, let's assume there is a <ruleset xmlns="http://names.kitodo.org/ruleset/v2" lang="en">
<declaration>
<key id="aaaTtitle" use="structureTreeTitle">
<label>aaa title</label>
<label lang="de">aaa Titel</label>
</key>
...
<key id="TitleDocMain" use="structureTreeTitle">
<label>main title</label>
<label lang="de">Haupttitel</label>
</key>
...
<key id="zzzTitle" use="structureTreeTitle">
<label>zzz title</label>
<label lang="de">ZZZ Titel</label>
</key>
</declaration>
</ruleset> Because of the implicit priority based on the declaration order, if a structure node has a Maybe it is not a problem after all. What do you think? |
That is a good question. To be honest, I only considered the variation
Just count without the structure element type might be kind of pointless. Perhaps @matthias-ronge could weigh in on this since the idea originally came from him? |
A few comments:
|
I think this is less an issue of this specific use case and more a general problem concerning how rulesets are validated at the moment. Ideally it shouldn't be possible to define more than one functional metadata of each type for each defined division. Functional metadata like As far as I know that is the reason why Because of that there are already several other places in the code like the one you described above, where a collection of functional metadata is retrieved, but only one (random) element of that collection is actually used. I am afraid until we find a way to impose restrictions like unique functional metadata of specific types for individual structure in rulesets the administrator or author of that ruleset will be responsible for configuring it correclty. |
What does not work in the current config-file based approach is to define the So my preferred solution would be, that when selecting one of
to first display the content of the LABEL as Institutions right now use the export XSLT to derive the LABEL e.g. from the TitleDocMain during export. (see: #5016 (comment)) because the LABELS are very important for presentation. Applying a similar Logic inside of Kitodo by: a) constructing the display label from another metadatum or b) if it is already present taking it directly from the divsion's LABEL would bring the editor behaviour a little bit inline with the desired structure for the presentation. @kitodo/kitodo-community-board Do you agree? |
We probably also have to specify if the desired change also has an effect on the display of parent processes in the editor. The linked children have a "display label", which is constructed slightly different than the one of "normal" processes' divisions: I just optimized the display of linked child processes. Their displayed "name" always contains the type of the linked division: I would really like to explore whether we can display more information (e.g., the volume number for 200 linked volumes) on linked child processes. However, implementing this might be more complex than it is for non-parent processes. |
@BartChris By |
@thomaslow Yes, i mean the METS xml attribute of the division. And yes, you can list LABEL as a allowed key in any division:
In the key declaration we assign it a domain of
In the metadata editor you can work with LABEL as if it is a "normal" metadatum, but it actually gets stored in the LOGICAL structure of your METS file. The story of LABEL (and also ORDERLABEL), is unfortunately a quite complicated if you search the repo, but especially the LABEL is important for every presentation system (METS or IIIF based). So it would be good if we can increase the usability of Kitodo at that point. |
I tested this. Yes, defining Line 125 in bc0970f
getTitleValue returns - if no metadata title is available which disables the fallback detection inkitodo-production/Kitodo/src/main/java/org/kitodo/production/forms/dataeditor/DataEditorForm.java Lines 949 to 955 in bc0970f
I fixed this in my pull request. The
I did not change the way the label is generated for linked processes. Their label remains the same regardless of the current setting. I guess there would need to be a separate config option that defines how those labels are built, especially if additional information beyond the type and title are interesting. |
@solth Regarding the count option. I like your suggestion to add a count for each structure type individually (e.g.
I will look into option 1 again when implementing the multi drag & drop of the structure tree. |
@thomaslow thanks for the explanation. I understand and think the "count" option was optional (ha!) from the beginning. The important options "Title", "Type" and "Title - Type" have been implemented so I see this issue as closed. |
Discussed in #4925
Originally posted by solth December 27, 2021
#4757 added a switch that allows the user to change the label of the tree nodes in the structure tree from type to specific metadata values configured as
metsEditor.titleMetadata
in the central config filekitodo_config.properties
.However, the menu currently displays the
id
of metadata defined in the ruleset (or rather just the values separated by comma aftermetsEditor.titleMetadata
from the config file), which is not optimal, since normally thelabel
of a metadata is used in the Kitodo metadata editor UI and the user is probably not familiar with the internal IDs of the metadata as defined in the ruleset....
A new functional metadata
structureTreeTitle
should be added which replaces the oldkitodo_config.properties
property keymetsEditor.titleMetadata
.Currently, only one of the metadata keys defined in
metsEditor.titleMetadata
can be applied at a time. So if a book and its chapters each have individual titles (like "main title" and "chapter title") these titles cannot be displayed at the same time. (an awkward work-around would be to assign the same title metadata to the top level element as well as the structure element, but this is probably not correct content wise, since a chapter should contain a "chapter title" instead of a "main title")The new menu in the structure tree should then not contain the names of individual metadata keys anymore, but rather just general options like:
Type
Title
Type - Title
When selecting the second (
Title
) or third option (Type - Title
), all functional metadata of typestructureTreeTitle
will be retrieved from all elements in the structure tree (except pages/media) so that different metadata with the same use can be displayed at the same time. If one structure element contains multiple functional metadata of typestructureTreeTitle
, the first is applied.Optionally, the count of structure elements can be offered as an additional option (thanks to @matthias-ronge for this suggestions):
Type - Count
Count
The text was updated successfully, but these errors were encountered: