Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML Import & Export for uP 2 Using Cernunnos Andrew Petro & Drew Wills April 2007 uPortal Dev Meeting Johns Hopkins University © Copyright Unicon, Inc.,

Similar presentations


Presentation on theme: "XML Import & Export for uP 2 Using Cernunnos Andrew Petro & Drew Wills April 2007 uPortal Dev Meeting Johns Hopkins University © Copyright Unicon, Inc.,"— Presentation transcript:

1 XML Import & Export for uP 2 Using Cernunnos Andrew Petro & Drew Wills April 2007 uPortal Dev Meeting Johns Hopkins University © Copyright Unicon, Inc., This work is the intellectual property of Unicon, Inc. Permission is granted for this material to be shared for non-commercial, educational purposes, provided that this copyright statement appears on the reproduced materials and notice is given that the copying is by permission of Unicon, Inc. To disseminate otherwise or to republish requires written permission from Unicon, Inc.

2 Introduction These slides provide some basic information about a prototype Import/Export tool developed for uPortal 2.5 and later by Drew Wills Much more information is available on the wiki page describing today’s discussion: uP2 XML import export 2007 JHU Dev Meeting Slot

3 Motivation uPortal doesn’t work without some basic data –Users –Groups –Channels –Layouts –etc. Although every uPortal release comes with a viable data set, every institution needs to customize this data extensively to meet their individual needs

4 Motivation (Cont.) Editing this data where it lives (i.e. data.xml) is confusing, tedious, and risky! Using uPortal’s UI to edit the data isn’t reproducible by automated means

5 Solution Storing the data in XML is great because tools like Subversion can manage it smoothly But the XML format used by data.xml is inaccessible to human beings It would be better to store this data in a collection of smaller XML documents with domain-specific schemas

6 Solution (Cont.) These documents can be more succinct and manageable by conveying information structurally that data.xml must convey explicitly (e.g parent-child relationships, entity types) Also these documents can avoid referencing database IDs, allowing entities to be imported and exported ad hoc – even from one portal database to another!

7 Example XML Document

8 Data in uPortal Information in the portal database represents the following classes of entities: –Minor Items (version info., sequences, etc.) –Users –Groups –Channels –Group Memberships –Permissions –Layouts Items that appear lower on this list often depend on items that appear higher (viz. foreign keys)

9 Status of the Prototype Work on the prototype started with Layouts (DLM) and proceeded “backwards” The prototype currently includes both import and export through Groups Which leaves: –Minor Items –Users It works in uPortal (AFAIK) It hasn’t been tried in any other version

10 Design of the Prototype Import & export operations were mostly implemented in Cernunnos scripts Cernunnos is a recent open source project hosted by Google Code with exactly one committer (me) In a nutshell, Cernunnos provides flexible Java implementations for common behaviors and allows them to be “instrumented” through a lightweight XML syntax Source code and documentation for Cernunnos is available at Google Code: –http://code.google.com/p/cernunnos/

11 Example Cernunnos Script ${req(JAR_NAME)}: ${req(Attributes.LOCATION)}

12 Using the Prototype The prototype Import/Export tool is attached as a ZIP to the wiki page about this discussion To use it, extract the contents into the root of a uPortal 2.5 (or later) distribution

13 Using the Prototype (Cont.) Invoke it from the command line using Ant –ant –f import-export.xml export –Ddir={dir} –Dtype={type} [–Dsysid={sysid}] –ant –f import-export.xml import [-Ddir={dir}] [-Dpattern={pattern}] dir = a file system directory type = all | layout | all-layouts | channel | all-channels | all-permissions | all-memberships | group | all-groups sysid = user_name | fname |group_name pattern = a regex expression

14 Drew Wills Questions?


Download ppt "XML Import & Export for uP 2 Using Cernunnos Andrew Petro & Drew Wills April 2007 uPortal Dev Meeting Johns Hopkins University © Copyright Unicon, Inc.,"

Similar presentations


Ads by Google