You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... like metadata model classes for the following resource types:
Service (wms, wfs, csw, ...)
Layer
FeatureType
All instances of this types will allways has one related metadata instance.
code example
classServiceMetadata(MetadataTermsOfUse, AbstractMetadata):
"""Concrete model class to store the parsed metadata information from the capabilities document of a given layer OR to store the information of the parsed iso metadata which was linked in the capabilities document. """described_object=models.OneToOneField(to=Service,
on_delete=models.CASCADE,
editable=False,
related_name="metadata",
related_query_name="metadata",
verbose_name=_("described service"),
help_text=_("choice the service you want to describe with this metadata"))
...
disadvantages
reading data from db: everytime a service (or layer/featuretype) shall be displayed by a table (or something else), the metadata attributes like title must be collected by a join on the related metadata object
writing data to db: two different instances of different object types needed to be stored
misunderstanding issues like what is a layer metadata, what is a featuretype metadata. This data modeling matches no real world problem
simplification
1. Merge the models together
... so that the Layer model for example holds all information (the layer information and metadata information)
code example
Switch to abstract metadata models like:
classLayerMetadata(AbstractMetadata):
""" no longer needed described_object = models.OneToOneField(to=Layer, on_delete=models.CASCADE, related_name="metadata", related_query_name="metadata", verbose_name=_("described layer"), help_text=_("choice the layer you want to describe with this metadata")) """
...
preview_image=models.ImageField(null=True, blank=True)
...
classMeta:
abstract=TrueclassLayer(LayerMetadata, ServiceElement, MPTTModel):
...
2. Decouple information collection from service registry
Provide one model to store MD_Metadata records for hierachyLevel service and dataset.
There are different ways where this records are coming from:
harvested by a remote service
created by a user
advantages
decouples the information collection fully from service registry.
@MrSnyder lets discuss this again on coming monday to convert it to a well formed issue
status: under reviewFurther discussion is needed to determine this issue's scope and/or implementation
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
status quo
1. There are coexisting model instances
... like metadata model classes for the following resource types:
All instances of this types will allways has one related metadata instance.
code example
disadvantages
simplification
1. Merge the models together
... so that the Layer model for example holds all information (the layer information and metadata information)
code example
Switch to abstract metadata models like:
2. Decouple information collection from service registry
Provide one model to store MD_Metadata records for hierachyLevel
service
anddataset
.There are different ways where this records are coming from:
advantages
@MrSnyder lets discuss this again on coming monday to convert it to a well formed issue
Beta Was this translation helpful? Give feedback.
All reactions