Skip to content

Commit

Permalink
properties: whitelisting new properties
Browse files Browse the repository at this point in the history
  • Loading branch information
maxlath committed Nov 13, 2017
1 parent 8a861d1 commit e134590
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/controllers/entities/lib/properties.coffee
Expand Up @@ -83,12 +83,12 @@ properties =
'wdt:P50': humanEntity
# publisher
'wdt:P123': entityUniqueValue
# original language of work
'wdt:P364': entityBase
# movement
'wdt:P135': entityBase
# genre
'wdt:P136': entityBase
# based on
'wdt:P144': workEntity
# serie
'wdt:P179': serieEntity
# ISBN 13
Expand All @@ -97,6 +97,8 @@ properties =
'wdt:P214': externalId /^[1-9]\d(\d{0,7}|\d{17,20})$/
# BNF id
'wdt:P268': externalId /^\d{8}[0-9bcdfghjkmnpqrstvwxz]$/
# original language of work
'wdt:P364': entityBase
# language of work
'wdt:P407': entityBase
# date of birth
Expand All @@ -119,6 +121,8 @@ properties =
'wdt:P856': urlBase
# main subject
'wdt:P921': entityBase
# inspired by
'wdt:P941': workEntity
# ISBN 10
'wdt:P957': isbnProperty 10
# number of pages
Expand All @@ -139,6 +143,8 @@ properties =
'wdt:P2013': externalId /^(\d+|[\w\.]+)$/
# YouTube channel ID
'wdt:P2397': externalId /^UC[\w\-]{21}[AQgw]$/
# number of volumes
'wdt:P2635': positiveIntegerBase
# author of foreword
'wdt:P2679': humanEntity
# author of afterword
Expand Down
1 change: 1 addition & 0 deletions server/lib/wikidata/whitelisted_properties.coffee
Expand Up @@ -61,6 +61,7 @@ module.exports = [
'P2034' # Project Gutenberg ebook ID
'P2093' # author name string
'P2397' # YouTube channel ID
'P2635' # number of volumes
'P2679' # author of foreword
'P2680' # author of afterword
'P2716' # collage image
Expand Down

0 comments on commit e134590

Please sign in to comment.