AZGS Drupal Module

Tags:
Document Information
Document ID: 
app2011-020

The AZGS document repository's (http://repository.azgs.az.gov/) entries can be exported to ISO 19139 metadata xml files.  These exported files are stored in a web accessible folder that can be used by the USGIN Geoportal instance or any Geoportal instance to harvest metadata records.  I created three tools used to get the document records out of the Drupal based repository and into a web accessible folder.

The first tool I created was a Python script that automated exporting each document's attriubtes as ISO 19139 metadata.  The script runs a SQL query and iterating over each record produced by the query.  The script uses each record's node id and makes a url request to the document repository for the document's ISO 19139 xml view.  The resulting request produces xml that is stored to in a web accessible folder.

The second tool I created was a Drupal module that has the same functionality as the Python script but is accessed by a web url request.  The request can be made using a web browser or command line tools like curl or wget.  Once the url request is made the module exports all published documents' ISO 19139 metadata records.  The only issue with this method is that there are a large number of documents in the repository causing the request to run for a very long time.

The third tool I created was an addition to the Drupal module that runs after a new document is created or runs after and existing document is edited.  In either case the tool exports the document's ISO 19139 metadata record to the web accessible folder if the record is a specific Drupal content type (e.g., dlio), is published, and belongs to a collection.

The source code for the module is attached as a zip file.  The zippped module needs to be installed in the sites/all/modules folder of the website and enabled through the administration interface.  The Python script and/or the Drupal module may need to be modified if you want to change output folder names.

Resources
Files: 
Files: 
Related Community Groups
Drupal Development | 6 Posts | Join
All about bending Drupal to your needs