Closed HassanAkbar closed 1 year ago
Originally from https://github.com/geolexica/isotc204.geolexica.org/pull/12#discussion_r973148842
The "ConceptSet" instance represents a set of Glossarist concepts, which also includes:
All these objects need to have their own Ruby class definitions.
@ronaldtse For clarification what we should do is create a new class named ConceptSet
and that class will have further 2 attributes ManagedConceptCollection
and Bibliography
. something like below.
class ConceptSet
attr_accessor :concept_collection, :bibliography
end
Is this what you have in mind or am I going in the wrong direction?
@HassanAkbar yes this is correct. Something like this:
class Glossarist::ConceptSet
attr_accessor :concepts, # concepts leads to a collection of `Concept`s
:bib_db # bib_db leads to a `BibCollection` object
:assets # an `AssetsCollection` object
# The `concept` objects in `concepts` can refer to Relaton references in the `bib_db`
def initialize(concepts)
# ...
# Fills in the bib_db
concepts.each do |concept|
bib_db.add(concept.ref) if concept.ref
end
end
end
# Relaton provides some basic classes to work with bibliographic items
class Glossarist::BibCollection < Relaton::Database
# ...
end
# A set of assets that can be referred to by concepts
class Glossarist::AssetsCollection < Set
# ...
end
# Represents a figure, an image, or an asset.
class Glossarist::Asset
# ...
end
@ronaldtse What I have done so far
Glossarist::ConceptSet
which contains
Glossarist::ManagedConceptCollection
objectBibliographyCollection
objectCollections::AssetCollection
objectCollections::ReferenceCollection
objectBibliographyCollection
which inherits from Relaton::Db
and implement methods to fetch the sources of all concpets.Collections::ReferenceCollection
which keeps track of all the references and their related concepts.Questions
Collections::AssetCollection
How are we going to initially populate this? Will the list of assets be passed to it or will it be genertaed by us using some algorithm that will work based on the concepts collection?For Collections::AssetCollection How are we going to initially populate this? Will the list of assets be passed to it or will it be genertaed by us using some algorithm that will work based on the concepts collection?
Yes, assets are passed to it on the creation of the ConceptSet.
we should have a class called ConceptSet. This Set will have the bibliographic data