Project

General

Profile

Actions

Idea #15071

closed

Design new vocabulary file format

Added by Tom Morris about 5 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
-
Start date:
Due date:
Story points:
-

Description

Based on our previous format, for example:

{
    "strict": false,
    "tags": {
        "fruit": {
            "values": ["pineapple", "tomato", "orange", "banana", "advocado", "lemon", "apple", "peach", "strawberry"],
            "strict": true
        },
        "comments": {},
        "importance": {
            "values": ["critical", "important", "low priority"]
        }
    }
}

...where strict: false was needed to be able to express when the user is permitted to add arbitrary text on keys and/or values, we now need to support multiple labels for a single concept, and the possibility to add translations too, the proposed format would be:

{
    "strict_tags": false,
    "tags": {
        "ID1234567890": {
            "strict": true,
            "labels": [
                {"lang": "en-US", "label": "fruit"},
                {"lang": "en-US", "label": "Fruit"},
                {"lang": "es-ES", "label": "fruta"},
                {"lang": "es-ES", "label": "Fruta"},
                {"lang": "zh-CN", "label": "水果"}
            ],
            "values": {
                "VAL123345": {
                    "labels": [
                        {"lang": "en-US", "label": "pineapple"}, 
                        ...
                    ]
                },
                ...
            }
        },
        "ID1234567891": {
            "labels": [
                {"lang": "en-US", "label: "comment"}
                {"lang": "en-US", "label: "suggestion"}
            ]
        },
    }
}

Of course, this would be useful as a "forward-index", enabling the UI to show the correct data. The UI should be creating a reverse index for data input.

For the first implementation we need to support only one language. Multiple language is left as a future exercise, so "lang" keys aren't needed.


Related issues

Related to Arvados - Idea #14151: Extend vocabulary support for properties to support strong identifiers and multiple labelsResolvedActions
Related to Arvados - Idea #15067: [Workbench 2] Update property editing to use IDsResolvedLucas Di Pentima11/12/2019Actions
Actions

Also available in: Atom PDF