Skip to content

Commit

Permalink
properties: whitelisting new properties
Browse files Browse the repository at this point in the history
server commit: 68b5830
  • Loading branch information
maxlath committed Nov 13, 2017
1 parent a47fa2f commit 73433bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/lib/shared/properties_per_type.coffee
Expand Up @@ -10,6 +10,8 @@ work =
'wdt:P179': {} # series
'wdt:P1545': {} # series ordinal
'wdt:P921': {} # main subject
'wdt:P144': {} # based on
'wdt:P941': {} # inspired by
'wdt:P364': {} # original language of work
'wdt:P856': {} # official website
# 'wdt:P31: {}' # instance of (=> works aliases)
Expand Down Expand Up @@ -40,6 +42,7 @@ module.exports = (_)->
'wdt:P2679': {} # author of foreword
'wdt:P2680': {} # author of afterword
'wdt:P1104': {} # number of pages
'wdt:P2635': {} # number of volumes

human:
'wdt:P1412': {} # languages of expression
Expand Down
10 changes: 8 additions & 2 deletions app/modules/entities/lib/properties.coffee
Expand Up @@ -16,14 +16,18 @@ addProp 'wdt:P50', 'entity', 'humans', true, true
addProp 'wdt:P136', 'entity', 'genres', true, false
# main subject
addProp 'wdt:P921', 'entity', 'subjects', true, false
# original language of work
addProp 'wdt:P364', 'entity', 'languages', true, null
# serie
addProp 'wdt:P179', 'entity', 'series', false, true
# series ordinal
addProp 'wdt:P1545', 'positive-integer-string', null, false, false
# based on
addProp 'wdt:P144', 'entity', 'works', true, false
# inspired by
addProp 'wdt:P941', 'entity', 'works', true, false
# editions (inverse of wdt:P629)
addProp 'wdt:P747', 'fixed-entity', null, true, false
# original language of work
addProp 'wdt:P364', 'entity', 'languages', true, null

## edition
addProp 'wdt:P629', 'entity', 'works', true, false
Expand Down Expand Up @@ -53,6 +57,8 @@ addProp 'wdt:P2679', 'entity', 'humans', true, true
addProp 'wdt:P2680', 'entity', 'humans', true, true
# number of pages
addProp 'wdt:P1104', 'positive-integer', null, false, null
# number of volumes
addProp 'wdt:P2635', 'positive-integer', null, false, null

## human
# date of birth
Expand Down

0 comments on commit 73433bc

Please sign in to comment.