-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tags vs. eu_gl object #14
Comments
The tags property is more general, so we can put there any "tag" we define and makes the specification more flexible for the future. In addition, these tags can be later on used with the references in order to facilitate the association of information (which is not possible with the current structure of the eu-gl object. e.g., "Heat wave hazard event (temperature 28ºC, duration 6 days) in the Metropolitan region of Naples"
|
A way to cope with the "tags" properties would be to create a small function for each of the possible tag types (i.e., service-type, damage-class, emissions-scenario, etc.) that returns null or an array with matching values that latter on you can use in the part of the code where you were using the "old" property. Therefore, instead of accessing eu_gl.damage_classes properties you just make a call like this: getDamageClasses() (or even more generic: getTags("damage-class")). Implementing this should be quite straight forward since all tags follow this approach tag-type:xxxxxx) |
@therter, @p-a-s-c-a-l I have updated the DataPackage model in drupal according to the latest specification. By updated I mean, added all new properties (I haven't removed anything "old" yet ). It would be good if you can test using the new properties, specially, the "tags" and "references" ones. For that, I have updated these two resources in the Naples DataPackage:
If your testing/modifications are ok then I will proceed to modify the other resources and remove the old properties. |
Ok, I'm trying to implement the changes in the map component first. But this will take some time. BTW, did you consider the changes to other parts of the CSIS Drupal Implementation? E.g. on the Data Package Views. Because they still use the (deprecated?) [EU-GL Context Type] and not the tags fiels. Since the tags field contains terms from different taxonomies, I don't know if filtering is that easy. Anyway this particular view has to be changed and I don't know if there are any other views that need an update. @DanielRodera @patrickkaleta @fgeyer16 can you please check? We have to make sure that the system is not left in an incoherent state where some parts still use the (deprecated?) EU-GL Context Type and others the new tags list. |
I didn't remember about that particular view, but indeed, it should be updated accordingly (I did update the Data Package Wizard according to the new specification, by adding the new fields in the form). These are the changes (I think I didn't forget any):
|
At least for Views, filtering should still be quite easy (or even easier now since no intermediate step via the EU-GL Context type is necessary anymore), because I can specifically set the taxonomies a field should be filtered by like this (shown for the new tags field): In the Maintenance overview for Resources I added both, the deprecated Workflow step field and the new tags field. That might help us with the transition to the new tags field. Resources can be filtered by their EU-GL step both ways (via tags and workflow step field). Regarding the Datapackage views, they have to be adapted now. Since @fgeyer16 implemented those, I think it would be best, if he would do that. I don't think I'm using the EU-GL context type anywhere in my implementations/Views, but I'll check to make sure. |
@maesbri What are the benefits of the tags against the dp_eu_gl object. Because at the moment we use the dp_eu_gl object at many places and it seems easier to use than the tags.
The text was updated successfully, but these errors were encountered: