bbcarchdev / spindle

RES Linked Open Data aggregation engine
https://bbcarchdev.github.io/spindle/
Apache License 2.0
2 stars 1 forks source link

Class partitions should be configurable #91

Open nevali opened 7 years ago

nevali commented 7 years ago

In the Quilt module the list of class partitions is not configurable.

(In spindle-generate for Twine, the class partitions are defined by the rulebase)

The following syntax can be used:

[spindle:partitions:uri-slug]
class=URI
css=class-used-in-HTML-for-styling
title=Fallback title
title.en=English title
title.cy-gb=Welsh title
…
label=Singular title
label.en=...
suffix=(Item suffix)
suffix.en=...
article=a thing
article.en=...

For example (describing /assets):

[spindle:partitions:assets]
class=http://xmlns.com/foaf/0.1/Document
css=digital-object
title=Digital assets
title.en-gb=Digital assets
label=Asset
label.en-gb=Asset
suffix=(Asset)
suffix.en-gb=(Asset)
article=an asset
article.en-gb=an asset

Internal tracking: RESDATA-1094

prasdeva commented 7 years ago

Started with this ticket under the branch(es)

https://git.bbcarchdev.net/oss/acropolis/commits/RESDATA-1094 https://git.bbcarchdev.net/oss/spindle/commits/RESDATA-1094

Changes in this branch reads config from docker/quilt.conf into spindle_partitions pointer by using quilt's quilt_config_get_all.

First, it will read everyting by specifying NULL as key to find partition(uri-slug, eg : spindle:partitions:assets). Then it will call quilt_config_get_all again specifying the section.

This approach can be improved by reading all parts of the config and then parsing for the required key.

Work is in progress for this approach which can be found with the attached diff.RESDATA-1094-partition_read.diff.zip

Apart from this, spindle_partitions need to be integrated to rest of the spindle code by replacing hard coded struct index_struct spindle_indices.

nevali commented 7 years ago

@prasdeva to answer your 'why is the status 37?' - it'll be the number of entries handled by the callback, I suspect!