Story #15071

Design new vocabulary file format

Added by Tom Morris 4 months ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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 - Story #14151: Extend vocabulary support for properties to support strong identifiers and multiple labelsNew

History

#1 Updated by Tom Morris about 2 months ago

  • Parent task deleted (#14151)

#2 Updated by Tom Morris about 2 months ago

  • Tracker changed from Task to Story

#3 Updated by Tom Morris about 2 months ago

  • Related to Story #14151: Extend vocabulary support for properties to support strong identifiers and multiple labels added

#4 Updated by Lucas Di Pentima about 2 months ago

  • Description updated (diff)

#6 Updated by Lucas Di Pentima about 2 months ago

  • Description updated (diff)

#7 Updated by Lucas Di Pentima about 2 months ago

  • Description updated (diff)

#8 Updated by Lucas Di Pentima about 2 months ago

  • Description updated (diff)

#9 Updated by Lucas Di Pentima about 2 months ago

  • Description updated (diff)

#10 Updated by Lucas Di Pentima about 2 months ago

  • Description updated (diff)

#11 Updated by Lucas Di Pentima about 2 months ago

  • Description updated (diff)

#12 Updated by Lucas Di Pentima about 2 months ago

  • Description updated (diff)

#13 Updated by Tom Morris about 2 months ago

  • Target version changed from To Be Groomed to Arvados Future Sprints

Also available in: Atom PDF