Skip to content

Instantly share code, notes, and snippets.

@tingletech
Last active July 28, 2020 01:47
Show Gist options
  • Save tingletech/6bd32819fc164a228c4969cdf6650392 to your computer and use it in GitHub Desktop.
Save tingletech/6bd32819fc164a228c4969cdf6650392 to your computer and use it in GitHub Desktop.
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<responseDate>2020-07-27T22:54:52.731437+00:00</responseDate>
<request/>
<ListRecords>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6xp75mg</identifier>
<datestamp>2018-01-22T12:53:11.041Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>Oregon City and Locks</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., Oregon City, 1850-1900.</dc:description>
<dc:description>Willamette River with buildings and industry along the banks. Locks visible on right. Waterfall visible in the distance.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1900</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6xp75mg</dc:identifier>
<dc:identifier>BANC PIC 1988.081.31:13--ALB</dc:identifier>
<dc:identifier>cubanc00000641_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6wq04gn</identifier>
<datestamp>2018-01-22T12:53:11.035Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>[Pomona (steamboat) on a river, going under a bridge.]</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., new saw mill "A," filters, mill "D," flood Feb. 1907.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1907</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6wq04gn</dc:identifier>
<dc:identifier>BANC PIC 1988.081.41:22--ALB</dc:identifier>
<dc:identifier>cubanc00000648_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6sx6dwr</identifier>
<datestamp>2018-01-22T12:53:11.028Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>[Flooded buildings, with men on roof of one building.]</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., Oregon City, construction, 1889. Gilbert K. Smith, Oregon City, Or. photo.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1889</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6sx6dwr</dc:identifier>
<dc:identifier>BANC PIC 1988.081.32:24--ALB</dc:identifier>
<dc:identifier>cubanc00000638_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6rx9cst</identifier>
<datestamp>2018-01-22T12:53:11.021Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>#6 Machine</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., mill "A" addition, Dec. 29, 1907 to May 19, 1908.</dc:description>
<dc:description>Room full of machinery at a mill.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1908-02</dc:date>
<dc:date>February 8, 1908</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6rx9cst</dc:identifier>
<dc:identifier>BANC PIC 1988.081.43:38--ALB</dc:identifier>
<dc:identifier>cubanc00000649_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6p55p66</identifier>
<datestamp>2018-01-22T12:53:11.015Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>Tower grinders, Mill A. Old fashioned vertical grinders</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., Oregon City, paper mill plan, 1890.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>May 1890</dc:date>
<dc:date>1890-05</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6p55p66</dc:identifier>
<dc:identifier>BANC PIC 1988.081.33:08--ALB</dc:identifier>
<dc:identifier>cubanc00000642_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6n87bfp</identifier>
<datestamp>2018-01-22T12:53:11.008Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>[Anthony Zellerbach with horse and carriage.]</dc:title>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:type>image</dc:type>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6n87bfp</dc:identifier>
<dc:identifier>BANC PIC 1988.081.222 : Zellerbach, Anthony--POR 2</dc:identifier>
<dc:identifier>brk00002312_24a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6jh3mvb</identifier>
<datestamp>2018-01-22T12:53:11.002Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>[Boilers.]</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., Oregon City, paper mill plan, 1890.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>June 1890</dc:date>
<dc:date>1890-06</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6jh3mvb</dc:identifier>
<dc:identifier>BANC PIC 1988.081.33:22--ALB</dc:identifier>
<dc:identifier>cubanc00000643_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6dr2w6x</identifier>
<datestamp>2018-01-22T12:53:10.995Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>[Three men standing at door to Willamette Pulp &amp; Paper Co. building when snow is on the ground.]</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., Oregon City, 1890-1899.</dc:description>
<dc:description>Sign on building reads: Willamette Pulp/Paper Co., 722 Montgomery Street, San Francisco, Cal.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1890-1899</dc:date>
<dc:date>1890</dc:date>
<dc:date>1899</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6dr2w6x</dc:identifier>
<dc:identifier>BANC PIC 1988.081.34:01--ALB</dc:identifier>
<dc:identifier>cubanc00000644_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k69024gw</identifier>
<datestamp>2018-01-22T12:53:10.988Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>[Top: Buildings along river with Mill A wood room in foreground; bottom: Group portrait of mill workers.]</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., Oregon Cit, 1896. C. Baechler, 778 Glisan St. Portland, Or. photo.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1896</dc:date>
<dc:type>image</dc:type>
<dc:format>2 photographs</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k69024gw</dc:identifier>
<dc:identifier>BANC PIC 1988.081.37:25--ALB</dc:identifier>
<dc:identifier>cubanc00000645_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6668dw0</identifier>
<datestamp>2018-01-22T12:53:10.98Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>Locks</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., Oregon City, 1850-1900.</dc:description>
<dc:description>Panoramic view of locks and buildings along the Willamette River.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1873</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6668dw0</dc:identifier>
<dc:identifier>BANC PIC 1988.081.31:09--ALB</dc:identifier>
<dc:identifier>cubanc00000639_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6571cp8</identifier>
<datestamp>2018-01-22T12:53:10.973Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>Pontoon Bridge across the Willamette. Oregon City, Ore</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., Mill "A" Construction, 1907.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1907</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k6571cp8</dc:identifier>
<dc:identifier>BANC PIC 1988.081.40:33--ALB</dc:identifier>
<dc:identifier>cubanc00000646_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k62f7p47</identifier>
<datestamp>2018-01-22T12:53:10.967Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>Locks</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., Oregon City, 1850-1900.</dc:description>
<dc:description>Locks along the Willamette River.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1873</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k62f7p47</dc:identifier>
<dc:identifier>BANC PIC 1988.081.31:10--ALB</dc:identifier>
<dc:identifier>cubanc00000640_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k61g0mx3</identifier>
<datestamp>2018-01-22T12:53:10.96Z</datestamp>
</header>
<metadata>
<oai_dc:dc>
<dc:title>[Men standing by and sitting on machinery at a mill.]</dc:title>
<dc:description>From album: Willamette Pulp &amp; Paper Co., new saw mill "A," filters, mill "D," flood Feb. 1907.</dc:description>
<dc:publisher>The Bancroft Library;;University of California, Berkeley, Berkeley, CA 94720-6000, Phone: (510) 642-6481, Fax: (510) 642-7589, Email: [email protected];;, URL: http://bancroft.berkeley.edu/</dc:publisher>
<dc:date>1907</dc:date>
<dc:type>image</dc:type>
<dc:format>1 photograph</dc:format>
<dc:identifier>http://ark.cdlib.org/ark:/13030/k61g0mx3</dc:identifier>
<dc:identifier>BANC PIC 1988.081.41:21--ALB</dc:identifier>
<dc:identifier>cubanc00000647_pm_a.tif</dc:identifier>
<dc:rights>Some materials in these collections may be protected by the U.S. Copyright Law (Title 17, U.S.C.). In addition, the reproduction of some materials may be restricted by terms of University of California gift or purchase agreements, donor restrictions, privacy and publicity rights, licensing and trademarks. Transmission or reproduction of materials protected by copyright beyond that allowed by fair use requires the written permission of the copyright owners. Works not in the public domain cannot be commercially exploited without permission of the copyright owner. Responsibility for any use rests exclusively with the user.</dc:rights>
<dc:rights>All requests to reproduce, publish, quote from, or otherwise use collection materials must be submitted in writing to the Head of Public Services, The Bancroft Library, University of California, Berkeley 94720-6000. See: http://bancroft.berkeley.edu/reference/permissions.html</dc:rights>
</oai_dc:dc>
</metadata>
</record>
</ListRecords>
</OAI-PMH>

quick script to hit solr API and create static oai:dc XML files.

usage: create_xml.py [-h] collection_number xml_file

positional arguments:
  collection_number
  xml_file

optional arguments:
  -h, --help         show this help message and exit
#!/usr/bin/env python3
import datetime
import sys
import argparse
import configparser
from pprint import pprint as pp
import json
import requests
import pytz
from lxml import etree
def main(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument(
"collection_number", type=int, nargs=1,
)
parser.add_argument("xml_file",)
if argv is None:
argv = parser.parse_args()
config = configparser.ConfigParser()
config.read("report.ini")
solr_url = config.get("calisphere", "solrUrl")
solr_auth = {"X-Authentication-Token": config.get("calisphere", "solrAuth")}
collection_query = "collection_url:https://registry.cdlib.org/api/v1/collection/{}/".format(
argv.collection_number[0]
)
base_query = {
"q": "{}".format(collection_query),
# "fields": "id, collection_url, title, creator, date", # fl = field list
"rows": 1000,
"sort": "score desc,id desc",
"mm": "100%",
"pf3": "title",
"pf": "text,title",
"qs": 12,
"ps": 12,
}
results = get_solr_iter(solr_url, solr_auth, base_query)
create_output_xml(argv.xml_file, results)
NSMAP = {
None: "http://www.openarchives.org/OAI/2.0/",
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
"oai_dc": "http://www.openarchives.org/OAI/2.0/oai_dc/",
"dc": "http://purl.org/dc/elements/1.1/",
}
SCHEMALOCATION = "http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd "
SCHEMALOCATION += "http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"
def create_output_xml(xmlfile, results):
""" format a single XML result for the whole collection """
# https://stackoverflow.com/a/4470035/1763984
page = etree.Element(
"OAI-PMH",
{"{http://www.w3.org/2001/XMLSchema-instance}schemaLocation": SCHEMALOCATION},
nsmap=NSMAP,
)
doc = etree.ElementTree(page)
responseDate = etree.SubElement(page, "responseDate")
responseDate.text = datetime.datetime.now(pytz.utc).isoformat()
request = etree.SubElement(page, "request")
records = etree.SubElement(page, "ListRecords")
for item in results:
map_solr_to_oai(item, records)
# TODO: validate the XML before saving
doc.write(xmlfile, pretty_print=True)
def map_solr_to_oai(json_item, records):
""" takes in solr json adds subelements to the `records` """
# pp(json_item.keys())
# start a new record
record = etree.SubElement(records, "record")
# set up the header
header = etree.SubElement(record, "header")
# oai identifier for the header
identifier = etree.SubElement(header, "identifier")
this_id = json_item["id"]
this_collection = json_item["collection_url"][0]
identifier.text = f"oai:calipshere:{this_collection}:{this_id}"
# datastamp for the header
datestamp = etree.SubElement(header, "datestamp")
datestamp.text = json_item["timestamp"]
# start the metadata section
metadata = etree.SubElement(record, "metadata")
oaidc = etree.SubElement(
metadata, "{http://www.openarchives.org/OAI/2.0/oai_dc/}dc"
)
DC = "{http://purl.org/dc/elements/1.1/}"
# main section of the mapping
json_element_to_xml_element("title", f"{DC}title", json_item, oaidc)
json_element_to_xml_element("creator", f"{DC}creator", json_item, oaidc)
json_element_to_xml_element("subject", f"{DC}subject", json_item, oaidc)
json_element_to_xml_element("description", f"{DC}description", json_item, oaidc)
json_element_to_xml_element("publisher", f"{DC}publisher", json_item, oaidc)
json_element_to_xml_element("contributor", f"{DC}contributor", json_item, oaidc)
json_element_to_xml_element("date", f"{DC}date", json_item, oaidc)
json_element_to_xml_element("type", f"{DC}type", json_item, oaidc)
json_element_to_xml_element("format", f"{DC}format", json_item, oaidc)
json_element_to_xml_element("identifier", f"{DC}identifier", json_item, oaidc)
json_element_to_xml_element("source", f"{DC}source", json_item, oaidc)
json_element_to_xml_element("language", f"{DC}language", json_item, oaidc)
json_element_to_xml_element("relation", f"{DC}relation", json_item, oaidc)
json_element_to_xml_element("coverage", f"{DC}coverage", json_item, oaidc)
json_element_to_xml_element("rights", f"{DC}rights", json_item, oaidc)
def json_element_to_xml_element(json_name, xml_name, json_in, xml_out):
""" perform a simple mapping from json to XML """
for element_value in json_in.get(json_name, []):
element_xml = etree.SubElement(xml_out, xml_name)
element_xml.text = str(element_value)
def get_solr_page(url, headers, params, cursor="*"):
params.update({"cursorMark": cursor})
res = requests.get(url, headers=headers, params=params, verify=False)
res.raise_for_status()
return json.loads(res.content)
def get_solr_iter(url, headers, params):
nextCursorMark = "*"
while True:
results_dict = get_solr_page(url, headers, params, nextCursorMark)
if len(results_dict["response"]["docs"]) == 0:
break
for document in results_dict["response"]["docs"]:
yield document
nextCursorMark = results_dict.get("nextCursorMark", False)
# main() idiom for importing into REPL for debugging
if __name__ == "__main__":
sys.exit(main())
"""
Copyright © 2019, Regents of the University of California
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of the University of California nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment