Newer
Older
web-services / loterre-resolvers / v1 / download.cfg
@Nicolas Thouvenin Nicolas Thouvenin on 14 Jun 835 bytes use common cfg files
[use]
plugin = basics
plugin = analytics
plugin = storage


# Download the skos and save it
[exchange]
value = get('primer')

[URLStream]
path = false

[XMLParse]
separator = /rdf:RDF/skos:Concept

# build indexKeys (remove duplicates to avoid ambiguities)
[assign]
path = indexKeys
value = fix(_.get(self, 'skos$prefLabel'), _.get(self, 'skos$altLabel'), _.get(self, 'skos$hiddenLabel')). \
		flatten().\
		filter(o => _.has(o, '$t')).\
		map(o => _.deburr(String(o.$t).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/\s]/g, '').toLowerCase())).\
		uniq()

path = score
value = get('owl$deprecated.$t', 3).thru(x => Number(String(x).toLowerCase() === 'true' ? 1 : 2))

[save]
location = env('location')
domain = env('loterreID').prepend('loterre-').append('concepts')
path = rdf$about

[pop]

[replace]
path = state
value = download