Permalink
Browse files

Moved to from aggregatedCHO to sourceResource.

  • Loading branch information...
1 parent 739554e commit 028ff9b33db47564faffd1e537ca869faa02390b Szymon Guz committed Mar 19, 2013
Showing with 12 additions and 12 deletions.
  1. +11 −11 lib/akamod/edan_to_dpla.py
  2. +1 −1 profiles/smithsonian.pjs
View
@@ -25,7 +25,7 @@
"state": "dpla:state",
"coordinates": "dpla:coordinates",
"stateLocatedIn" : "dpla:stateLocatedIn",
- "aggregatedCHO" : "edm:aggregatedCHO",
+ "sourceResource" : "edm:sourceResource",
"dataProvider" : "edm:dataProvider",
"hasView" : "edm:hasView",
"isShownAt" : "edm:isShownAt",
@@ -586,26 +586,26 @@ def edantodpla(body,ctype,geoprop=None):
out = {
"@context": CONTEXT,
- "aggregatedCHO": {}
+ "sourceResource": {}
}
logger.debug("x"*60)
# Apply all transformation rules from original document
for k, v in CHO_TRANSFORMER.items():
if exists(data, k):
- out["aggregatedCHO"].update(v(data))
+ out["sourceResource"].update(v(data))
for k, v in AGGREGATION_TRANSFORMER.items():
if exists(data, k):
out.update(v(data))
# Apply transformations that are dependent on more than one
# original document field
- #out["aggregatedCHO"].update(type_transform(data))
- out["aggregatedCHO"].update(transform_rights(data))
- out["aggregatedCHO"].update(transform_subject(data))
- out["aggregatedCHO"].update(transform_spatial(data))
- logger.debug(out["aggregatedCHO"])
- #out["aggregatedCHO"].update(subject_and_spatial_transform(data))
+ #out["sourceResource"].update(type_transform(data))
+ out["sourceResource"].update(transform_rights(data))
+ out["sourceResource"].update(transform_subject(data))
+ out["sourceResource"].update(transform_spatial(data))
+ logger.debug(out["sourceResource"])
+ #out["sourceResource"].update(subject_and_spatial_transform(data))
#out.update(has_view_transform(data))
out.update(transform_is_shown_at(data))
@@ -617,8 +617,8 @@ def edantodpla(body,ctype,geoprop=None):
logger.debug("x"*60)
- if exists(out, "aggregatedCHO/date"):
- logger.debug("OUTTYPE: %s"%getprop(out, "aggregatedCHO/date"))
+ if exists(out, "sourceResource/date"):
+ logger.debug("OUTTYPE: %s"%getprop(out, "sourceResource/date"))
# Additional content not from original document
if "HTTP_CONTRIBUTOR" in request.environ:
View
@@ -9,7 +9,7 @@
"/shred?prop=aggregatedCHO%2Flanguage%2CaggregatedCHO%2Fpublisher%2CaggregatedCHO%2Frelation",
"/shred?prop=aggregatedCHO%2Fsubject%2CaggregatedCHO%2Ftype",
"/shred?prop=aggregatedCHO%2Fsubject&delim=%3Cbr%3E",
- "/shred?prop=isShownAt%2Fformat",
+ "/shred?prop=sourceResource%2Fformat",
"/enrich_earliest_date",
"/enrich_date",
"/enrich-subject",

0 comments on commit 028ff9b

Please sign in to comment.