On Feb 11, 2006, at 8:16 AM, Brad Baxter wrote:

I have this sample data structure:

   my %profile = (
     'subjects' => {
       'astronomy' => {
         'telescope world' => 'http://telescope.com',
         'stars r us' => 'http://websters.com',
         'asto magazine' => 'http://oxford.edu'
       },
       'mathematics' => {
         '2 + 2 = 4' => 'http://catalog.nd.edu',
         'math library' => 'http://worldcat.com'
       }
     },
     'tools' => {
       'dictionaries' => {
         'websters' => 'http://websters.com',
         'oxford' => 'http://oxford.edu'
       },
       'catalogs' => {
         'und' => 'http://catalog.nd.edu',
         'worldcat' => 'http://worldcat.com'
       }
     }
   );

I now need to build %profile programatically. As I loop through a set
of information resources I can determine the following values:

   1. resource name (ex: telescope world)
   2. URL (ex: http://telescope.com)
   3. term (ex: astronomy)
   4. facet (ex: subjects)

Given these values, how can I build %profile?


Short answer: $profile{ $facet }{ $term }{ $resource } = $url;


Wow! Perfect!!

I have been able to take what Jonathan Gorman, Bruce Van Allen, and Brad Baxter have given me and incorporate it into a the beginnings of a patron-specific interface of MyLibrary. In MyLibrary patrons can be created and "cataloged" with facet/term combinations -- a controlled vocabulary. These same facet/term combinations are used to "catalog" information resources. Thus, through the controlled vocabulary I am able to create relationships between resources and patrons.

The results is the display of a set of information resources designed for individuals with particular characteristics. For example, try the following URLs. Each points to a different patron with different characteristics, and each page provides the ability to display the information resources in an alphabetical or grouped view:

  * Andrew Carnegie
    http://dewey.library.nd.edu/morgan/portal/?cmd=patron&id=194

  * Leonardo D'Vinci
    http://dewey.library.nd.edu/morgan/portal/?cmd=patron&id=191

  * Galileo Galilei
    http://dewey.library.nd.edu/morgan/portal/?cmd=patron&id=193


Thanks guys. I have added your names to my code.

--
Eric Morgan

Reply via email to