Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] LazyTreeRoot constructor

Philip Ogren philip at ogren.info
Wed Feb 21 06:59:22 PST 2007



I am trying to understand how the LazyTree* classes work and am puzzled 
by the constructor for LazyTreeRoot.  When it is called the object that 
is passed in is immediately put into a collection and then passed on to 
the super constructor.  The super constructor, LazyTreeNode, takes the 
object - which is a collection - and sets the _userObject to this 
collection.  I would think _userObject would typically be a Frame and 
when I look at references to LazyTreeNode.getUserObject() the callers 
always cast the object to a Frame.  How can this be? 

The only place where _userObject gets set other than the constructor is 
in reload(Object) method (it is a private member variable -so I don't 
think it can get set outside of LazyTreeNode.)  But reload(Object) is 
only called in a couple of places and does not seem to account for how 
ReferenceNode can cast LazyTreeNode.getUserObject() into a Frame. 

Any thoughts on this?  I must be reading the code wrong because all of 
it seems to work when you run it - any pointers you can provide to help 
me understand this clearly would be appreciated.  I would very much like 
to understand how this works so that I can extend this code for my own 
purposes. 

Thanks,
Philip



More information about the protege-discussion mailing list