Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] RE: xml export/import v1.6

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] RE: xml export/import v1.6


Chronological Thread 
  • From: Chris Hyzer <>
  • To: "GW Brown, Information Systems and Computing" <>, "" <>
  • Subject: RE: [grouper-dev] RE: xml export/import v1.6
  • Date: Wed, 20 Jan 2010 13:32:35 -0500
  • Accept-language: en-US
  • Acceptlanguage: en-US

I could add in comments, attached is an example for group type tuples.

I can also do this on:

- composite groups
- attribute group and field
- membership owner list and member
- role set role names
- action set action name and attribute def name
- attribute assign owner and attribute def name
- attribute assign value owner, attribute def name
- attribute def name set def names
- attribute scope def

Ok?

Thanks,
Chris

-----Original Message-----
From: GW Brown, Information Systems and Computing
[mailto:]

Sent: Wednesday, January 20, 2010 1:07 PM
To: Chris Hyzer;

Subject: Re: [grouper-dev] RE: xml export/import v1.6

Chris,

One of the things about the new XML format is that you can't read it and
know what many records relate to without cross-referencing uuids of various
kinds. An option to include object names (possibly as comments) would help.
Obviously files would be bigger - but the user could choose (with the
default set to not include names).

Gary

--On 20 January 2010 10:56 -0500 Chris Hyzer
<>
wrote:

>
>
> Here is an example of all tables being exported:
>
>
>
> I can import about 40% of the tables at this point, need to code the
> rest. For an import the data object needs to implement this interface
> (below). Its pretty straightforward at this point.
>
>
>
> For Kuali, we made a lot of progress this week. My next goal is to do a
> workflow with a group from Grouper. I will try to make a form from Penn
> in edoclite and use grouper for the routing.
>
>
>
> Thanks,
>
> Chris
>
>
>
> /**
>
> * @author mchyzer
>
> * $Id$
>
> */
>
> package edu.internet2.middleware.grouper.xml.export;
>
>
>
>
>
> /**
>
> * Hibernated object which can be imported into
>
> * @param <T> is the type of the object
>
> */
>
> public interface XmlImportable<T> {
>
>
>
> /**
>
> * retrieve from db by id or key. throws exception if duplicate
>
> * @return the object or null if not found
>
> */
>
> public T xmlRetrieveByIdOrKey();
>
>
>
> /**
>
> * see if the update cols are different (e.g. last updated)
>
> * @param other the one to compare with
>
> * @return true if so
>
> */
>
> public boolean xmlDifferentUpdateProperties(T other);
>
>
>
> /**
>
> * see if the non update cols are different (e.g. name)
>
> * @param other the one to compare with
>
> * @return true if so
>
> */
>
> public boolean xmlDifferentBusinessProperties(T other);
>
>
>
> /**
>
> * save the business properties (not update properties)
>
> * @param existingRecord null if insert, the object if exists in DB
>
> * generally just copy the hibernate version number, and last updated
> to the
>
> * object and store it
>
> */
>
> public void xmlSaveBusinessProperties(T existingRecord);
>
>
>
> /**
>
> * save the udpate properties (e.g. last updated). Note, this is
>
> * done with a sql update statement, not with hibernate
>
> */
>
> public void xmlSaveUpdateProperties();
>
>
>
> /**
>
> * copy business (non update) properties to an existing record
>
> * @param existingRecord
>
> */
>
> public void xmlCopyBusinessPropertiesToExisting(T existingRecord);
>
>
>
> }
>
>
>
>
>
>
>
>
>
>
> From: Chris Hyzer
> Sent: Monday, January 11, 2010 1:22 AM
> To:
> ''
> Subject: RE: xml export/import v1.6
>
>
>
> Here is another example with more tables exported (attached). Also, I
> started a wiki page.
>
>
>
> https://spaces.internet2.edu/display/GrouperWG/Grouper+export+import+v1.6
>
>
>
> Regards,
>
> Chris
>
>
>
>
> From: Chris Hyzer
> Sent: Saturday, January 09, 2010 2:23 PM
> To:
> ''
> Subject: xml export/import v2
>
>
>
> Hey,
>
>
>
> We have been discussing the new version of Grouper export/import which
> will go in Grouper 1.6.
>
> We will rewrite it with the following improvements:
>
>
>
> 1. Doesn't store the XML document in memory (SAX)
>
> 2. Versioned
>
> 3. Doesn't manually marshal XML (will use xstream)
>
> 4. Will keep logic in beans (more object oriented)
>
> 5. Handles all data columns in the database (e.g. uuids). Note, in
> import will need to lookup the business key to see if there is a
> different UUID, and maintain the existing UUID if it exists, will not
> change any UUIDs on import
>
> 6. Handles all the new tables (e.g. new attribute framework, though
> I didn't think we need to import the "set" tables, e.g. groupSet.
> We can calculate that stuff after import. This is a tradeoff between
> size of file, speed of import (probably faster to export the "set"
> tables), and data integrity (probably better to recalc all after import)
>
> 7. Data is sorted so it can be easily diffed
>
>
>
> The Sax, uuid, and beans part is already being done for the user audit
> export. I will reuse this for a few tables. The current export/import
> has many configuration settings which I was hoping to eliminate or clamp
> down on, and only implement the must-haves for the first pass. Attached
> is an example of exporting members and stems. Note the whole file is not
> indented. If you want it indented you can indent it, otherwise, I think
> it is best in that form.
>
>
>
> Thanks,
>
> Chris
>
>



----------------------
GW Brown, Information Systems and Computing

Attachment: grouperExport.xml
Description: grouperExport.xml




Archive powered by MHonArc 2.6.16.

Top of Page