1 / 12

A Hybrid Declarative/Procedural Metadata Mapping Language Based on Python

A Hybrid Declarative/Procedural Metadata Mapping Language Based on Python. Greg Janée & James Frew University of California at Santa Barbara. metadata store. XML metadata. ADL. Federated digital library system general framework for distributing queries

balin
Download Presentation

A Hybrid Declarative/Procedural Metadata Mapping Language Based on Python

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Hybrid Declarative/ProceduralMetadata Mapping LanguageBased on Python Greg Janée & James Frew University of California at Santa Barbara

  2. metadata store XML metadata ADL • Federated digital library system • general framework for distributing queries • specific support for geospatial queries, data ADL query mediator Z39.50 gateway RDBMS Z39.50 server

  3. ADL metadata views • Bucket • mappings of native metadata to high-level search indices • comparable to Dublin Core • but strongly typed • Browse • image thumbnails, abstracts, etc. • Access • describes how item can be accessed • 4 different types of access points • 2 hierarchy mechanisms: decomposition, alternatives

  4. Problem statement • Metadata mapping • largely declarative in nature • “A  B” • need recourse to arbitrary computation • e.g., conversion of geographic coordinates • deal with pervasive quality problems • but problems are often consistent for given collection or provider • Goal • simple, concise way of specifying mappings • that is executable

  5. Related work • Crosswalks • simplistic (“A is equivalent to B”) • no formal way to describe more complex mappings • not executable • Many ad hoc solutions • Perl, XSLT • XSLT • difficult to program • low-level, verbose • computationally hamstrung

  6. Language for metadata mapping • Mapping is an executable Python script • from ADL_mapper import *input()...statements...output() • ~25 language statements • procedure calls • but are declarative in nature • Query language • form tuples from Xpath expressions • Inheritance mechanism

  7. Two examples  map("adl:titles", "/itemRecord/general/title") def convertPresentKeyword (v): if v[1].lower() == "present" return (v[0], "9999") else: return v map("adl:dates", ["/itemRecord/temporalCoverages/timeInfo/timeAD" "begin@date", "end@date"], prefilters=convertPresentKeyword) 

  8. Partial equivalent in XSLT <xsl:template match="itemRecord/temporalCoverages/timeInfo/timeAD"> <temporal-value> <range> <begin><xsl:value-of select="begin/@date"/></begin> <end> <xsl:choose> <xsl:when test="translate(end/@date, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')='present'"> <xsl:text/>9999<xsl:text/> </xsl:when> <xsl:otherwise> <xsl:value-of select="end/@date"/> </xsl:otherwise> </xsl:choose> </end> </range> </temporal-value> </xsl:template>

  9. Maya case study • Maya: thematic collection of GIS and other materials with FGDC metadata • Mapping problems: • poor titles, e.g., “mex250kr” • missing originator • misused FGDC field • Solution • generic FGDC mapping • 23 statements • Maya mapping derived from FGDC • 3 statements

  10. Actual Maya mapping from ADL_mapper import * input() import FGDC_mapping def constructNewTitle (v): form = get("/metadata/idinfo/citation/citeinfo/geoform") ... return ... appendPostfilter("adl:titles", constructNewTitle) unmap("adl:formats", id=2) mapConstant("adl:originators", "Anabel Ford, ISBER/MesoAmerican Research Center") output()   

  11. intrinsic contextual Future work • Mapping access-related metadata is problematic • poorly supported by metadata standards • only partially intrinsic to the item • Need to add library context as an input http://host.com/path/P32499.jpg http://host.com/path/P32499.thumb.jpg http://host.com/path/P32499.sid

  12. Summary • Problem • create executable specifications • largely, but not entirely declarative • need ability to do arbitrary computation • Solution • work within a high-level, procedural language • procedure calls act like declarations • resulting hybrid declarative/procedural language • http://www.alexandria.ucsb.edu/mm/

More Related