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

migrate Licenses to Keywords #32

Merged
merged 1 commit into from Apr 24, 2017

Conversation

Projects
None yet
1 participant
@eins78
Copy link
Member

eins78 commented Apr 11, 2017

The big picture:

Background: it was decided not to implement any specialized buisiness-logic dealing with Copyrights/Licenses, therefore the entity Licenses is not needed anymore.
They are already handled in the UI like Keywords.

So instead of having 'Licenses' as an entitiy, we allow to have configurable "custom types of Keywords". Existing instances will have their Licenses migrated to :Keywords of type License"

Note that the "custom types" are called RDF Classes because semantically they are, but that is not relevant for now.

DB changes

minimal RDF setup to support "Licenses as Keywords":

  • add table rdf_classes, for admin info and constraints about RDF Classes
  • add meta_key.allowed_rdf_class (for Keyword-Keys)
  • add attributes to keyword: rdf_class, description, external_uri

Licenses migration:

  • 1 MetaKey of type License is supported (only possible for migrated v2-instances; does nothing if no such MetaKey and fails if more than 1)
  • this selected MetaKey is used for the newly created Keywords (since they need a meta_key relation which Licenses did not have)
  • insert a rdf_class with id License
  • migrate everything from licenses to keywords (with rdf_class='License')
  • also migrate all the related things (the meta_key, meta_data_keywords etc.)
  • drop licenses, their groups, etc.

App changes

removed licenses from all the apps/specs.
additions are listed below

API

  • does not have Licenses anymore
  • shows the new attributes for Keywords

Admin

  • supports meta_key.allowed_rdf_class

Webapp

  • has a view to show Keyword information, so that information about Licenses (and other types of custom Keywords can be seen)
  • this view is not linked yet (it is as hidden as the Licenses were)
  • existing Metadata UI does not change (was already adapted).
    • adding Licenses to MetaData works like Keywords
    • creating new Licenses is (still) not supported! (in general: custom rdf_classes for keywords are supported but the can't be extensible)

screenshots

webapp
screen shot 2017-04-11 at 17 33 05
screen shot 2017-04-11 at 17 33 30

admin
screen shot 2017-04-11 at 17 51 27

screen shot 2017-04-11 at 17 51 40

API
screen shot 2017-04-20 at 17 05 29

@eins78 eins78 force-pushed the mfa/remove-licenses branch from 1b560c9 to baa7f46 Apr 11, 2017

@eins78 eins78 force-pushed the mfa/remove-licenses branch 2 times, most recently from 4aa03a2 to cfe51f8 Apr 20, 2017

@eins78 eins78 changed the title [WIP] remove licenses migrate Licenses to Keywords Apr 20, 2017

@eins78 eins78 force-pushed the mfa/remove-licenses branch 8 times, most recently from b12df7c to 5520ccb Apr 20, 2017

db: migrate Licenses to Keywords
The big picture:

Background: it was decided not to implement any specialized buisiness-logic dealing with Copyrights/Licenses, therefore the entity `Licenses` is not needed anymore.
They are already handled in the UI like `Keywords`.

So instead of having 'Licenses' as an entitiy, we allow to have configurable "custom types of Keywords". Existing instances will have their Licenses migrated to :Keywords of type License"

*Note that the "custom types" are called RDF Classes because semantically they are, but that is not relevant for now.*

## DB changes

minimal RDF setup to support "Licenses as Keywords":

- add table `rdf_classes`, for admin info and constraints about RDF Classes
- add `meta_key.allowed_rdf_class` (for Keyword-Keys)
- add attributes to `keyword`: `rdf_class, description, external_uri`

Licenses migration:
- 1 MetaKey of type License is supported (only possible for migrated v2-instances; does nothing if no such MetaKey and fails if more than 1)
- this selected MetaKey is used for the newly created Keywords (since they need a `meta_key` relation which Licenses did not have)
- insert a `rdf_class` with id `License`
- **migrate everything from `licenses` to `keywords` (with `rdf_class='License'`)**
- also migrate all the related things (the `meta_key`, `meta_data_keywords` etc.)
- drop licenses, their groups, etc.

## App changes

removed licenses from all the apps/specs.
additions are listed below

### API

- does not have Licenses anymore
- shows the new attributes for Keywords

### Admin

- supports `meta_key.allowed_rdf_class`

### Webapp

- has a view to show Keyword information, so that information about Licenses (and other types of custom Keywords can be seen)
- this view is not linked yet (it is as hidden as the Licenses were)
- existing Metadata UI does not change (was already adapted).
  - adding Licenses to MetaData works like Keywords
  - *creating* new Licenses is (still) not supported! (in general: custom rdf_classes for keywords are supported but the can't be `extensible`)

@eins78 eins78 force-pushed the mfa/remove-licenses branch from 5520ccb to e700b3d Apr 24, 2017

@eins78 eins78 referenced this pull request Apr 24, 2017

Merged

release: Madek v3.12.0 "YEÄH!" #33

18 of 18 tasks complete

@eins78 eins78 merged commit e700b3d into master Apr 24, 2017

6 checks passed

Cider-CI@ci.zhdk.ch - All tests passed - All tests
Details
Cider-CI@ci.zhdk.ch - Build the deployment archive passed - Build the deployment archive
Details
Cider-CI@ci.zhdk.ch - Integration Tests passed - Integration Tests
Details
Cider-CI@ci.zhdk.ch - Linting passed - Linting
Details
Cider-CI@ci.zhdk.ch - Test Deploy to a Container passed - Test Deploy to a Container
Details
Cider-CI@ci.zhdk.ch - ⚑ Good To Merge passed - ⚑ Good To Merge
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment