grouper-dev - RE: [grouper-dev] Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z)
Subject: Grouper Developers Forum
List archive
RE: [grouper-dev] Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z)
Chronological Thread
- From: Chris Hyzer <>
- To: Tom Barton <>, "" <>
- Subject: RE: [grouper-dev] Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z)
- Date: Wed, 16 Sep 2009 05:05:11 -0400
- Accept-language: en-US
- Acceptlanguage: en-US
> 5. Chris' hierarchical needs
I don't think I have needs, just giving progress update. I have mentioned
the three directed graphs in grouper known as *sets: groups as members of
groups (groupSets), attributes in sets (attributeSets), and "hierarchical"
roles (roleSets). Shilen has the groupSets implemented, and I have the
attributeSets implemented, and tested with a complex setup (probably more
complex that someone would actually implement).
I add each relationship in the pic below, and can remove any of the
relationships, and still have an intact data model. Now that it is the
GrouperSet interface (and GrouperSetElement and GrouperSetEnum), I hope to
add the "hierarchical" roles without much trouble.
Granted, there is a lot of duplication, and copy/paste, but the test case is
14k lines...
* complex relationships: ^ means relationship pointing up, v means down ->
means right
* e.g. if someone has A, then that someone also effectively has B.
* So B is in the attributeSet of A,
* as is C, D, E, F, G, H, I, J, and L (not K)
*
* K G---\
* \ ^ \
* \ / \
* v / \
* C L \
* ^ \ ^ |
* / \ / |
* / v / v
* A -----> B E ----> F
* |\ \ ^ ^
* | \ \ / /
* | \ v / /
* | \ D J
* | \ ^|
* | \ / |
* v v / |
* H----> I --------/ |
* ^ /
* \ /
* \--------------/
*
*
* So the immediate relationships are:
* A -> B
* A -> H
* A -> I
* B -> C
* B -> D
* C -> E
* C -> G
* D -> E
* E -> F
* E -> L
* G -> F
* H -> I
* I -> J
* J -> H
* J -> F
* K -> C
If anyone cares about the API, here is an example (this.top is a stem):
AttributeDef attributeDef = this.top.addChildAttributeDef("orgs",
AttributeDefType.attr);
AttributeDefName orgA = this.top.addChildAttributeDefName(attributeDef,
"orgA",
"orgA");
AttributeDefName orgB = this.top.addChildAttributeDefName(attributeDef,
"orgB",
"orgB");
// A -> B
assertTrue(orgA.addToAttributeDefNameSet(orgB));
attrDefNameSetViewCount = HibernateSession.bySqlStatic().select(
int.class, "select count(1) from grouper_attr_def_name_set_v");
assertEquals(initialAttrDefNameSetViewCount + 3, attrDefNameSetViewCount);
//...snip...
//test the relationship:
assertEquals("top:orgA", attributeDefNameSetViews.get(index)
.getIfHasAttrDefNameName());
assertEquals("top:orgB", attributeDefNameSetViews.get(index)
.getThenHasAttrDefNameName());
assertEquals(1, attributeDefNameSetViews.get(index).getDepth());
assertEquals(AttributeDefAssignmentType.immediate,
attributeDefNameSetViews
.get(index).getType());
assertEquals("top:orgA",
attributeDefNameSetViews.get(index).getParentIfHasName());
assertEquals("top:orgA",
attributeDefNameSetViews.get(index).getParentThenHasName());
- Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z), Tom Barton, 09/15/2009
- RE: [grouper-dev] Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z), Chris Hyzer, 09/16/2009
- RE: [grouper-dev] Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z), GW Brown, Information Systems and Computing, 09/17/2009
- RE: [grouper-dev] Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z), Chris Hyzer, 09/17/2009
- RE: [grouper-dev] Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z), GW Brown, Information Systems and Computing, 09/17/2009
- RE: [grouper-dev] Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z), Chris Hyzer, 09/17/2009
- RE: [grouper-dev] Grouper design call, Wednesday, 16 September 2009, 1200EDT (1600Z), Chris Hyzer, 09/16/2009
Archive powered by MHonArc 2.6.16.