glossarist / glossarist-ruby

Concept modeller in Ruby
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Make the concepts, localizedConcept and ManagedConcept according to model #42

Closed HassanAkbar closed 1 year ago

HassanAkbar commented 2 years ago

Currently concept contains localizedConcepts but in the model localizedConcept inherits from concept and managedConcept contains the list of all localized concepts.

So this ticket is to update the glossarist implementation according to concept-model.

HassanAkbar commented 2 years ago

@ronaldtse Can you clarify the difference between Ref and ConceptSource terms? According to the concept-model, Ref and ConceptSource are 2 different models having different properties but in the current implementation in the iev-data repo Ref is being used and it has the properties of both plus some additional properties which are

So my questions are,

  1. Which model should include these extra properties, the Ref model or the ConceptSource model?
  2. Currently from iev-data the sources key is saved in the Ref model but if we separate the keys into different models then how should we handle the incoming payload? E.g currently, the payload for authoritative sources is like
    authoritative_source: {
    "ref" => { 
      "id" => "", 
      "source" => "", 
      "version" => "" 
    },
    "clause" => "",
    "link" => "",
    "relationship" => { 
      "type" => "",
      "modification" => ""
    },
    "original" => "",
    }.compact

but according to the concept-model, this should go into the ConceptSource model with type = authoritative but the concept source model does not handle other fields like clause, link and ref.

What do you suggest? how should I handle this? should I change the ConceptSource model to add the following fields (This will result in duplicate fields in 2 different models)?

ronaldtse commented 2 years ago

You have to look at the big picture model which is Concept. A Concept contains ConceptSources, a ConceptSource contains a <<Bibliography>> Citation.

ConceptSource is supposed to link to another Concept, so it would have some metadata about what that source concept is. Eg. status, type (authoritative, etc) in addition to a Citation.

Where do you see Ref? Do you mean Citation?

The Citation model in defined in relaton-models. A citation is an information resource typically has a name, link and locality.

Just refer to the concept-models diagrams on the first page, all the definitions are shown there. Description of the models can be found inside the lutaml definitions.

HassanAkbar commented 2 years ago

Where do you see Ref?

@ronaldtse The Ref model is in the current implementation of glossarist. It has some fields that are not present anywhere in the concept-model and those fields are being sent over in the payload from the iev-data, i.e link, original, and clause.

I just want to confirm should I add those fields to some other model or remove those fields?

ronaldtse commented 2 years ago

You should rename Ref into Citation, and create a new ConceptSource class.

HassanAkbar commented 2 years ago

You should rename Ref into Citation, and create a new ConceptSource class.

Sounds good 👍

ronaldtse commented 1 year ago

@HassanAkbar has this been completed? Thanks.

HassanAkbar commented 1 year ago

@ronaldtse I think this is completed. Let me just confirm this and then I’ll close this ticket.

ronaldtse commented 1 year ago

Thanks, if so please close it.