Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release-33.10.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Williams committed Mar 23, 2017
2 parents 8e86470 + ec884a1 commit 369b86e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions lib/mappers/cdl_json_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@ class CDLJSONMapper(MAPV3JSONMapper):
def __init__(self, provider_data):
super(CDLJSONMapper, self).__init__(provider_data)

def map_collection(self):
values = iterify(getprop(self.provider_data, "collection_name", True))
collections = []
for value in values:
collection = {"title": value, "@id": "", "id": "", "description": ""}
collections.append(collection)

if collections:
self.mapped_data["sourceResource"]["collection"] = collections

def map_source_resource(self):
super(CDLJSONMapper, self).map_source_resource()
maps = {
"alternative_title_ss": "alternative",
"collection_name": "isPartOf",
"contributor_ss": "contributor",
"creator_ss": "creator",
"date_ss": "date",
"description": "description",
"extent_ss": "extent",
"format_ss": "format",
"genre_ss": "hasType",
"identifier_ss": "identifer",
"identifier_ss": "identifier",
"language_ss": "language",
"coverage_ss": "spatial",
"publisher_ss": "publisher",
Expand All @@ -44,6 +54,9 @@ def map_source_resource(self):
values = list(set(values + existing_values))
self.update_source_resource({dest: values})

def map_edm_rights(self):
pass

def map_is_shown_at(self):
url_item = iterify(getprop(self.provider_data, "url_item", True))
if url_item:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from distutils.core import setup

setup( name = 'ingestion',
version = '33.10.1',
version = '33.10.2',
description='DPLA Ingestion System',
author='Digital Public Library of America',
author_email='[email protected]',
Expand Down

0 comments on commit 369b86e

Please sign in to comment.