Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » jsbml-development » public void setParentSBML(SBase parent)
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
rodrigue


Posts: 307
Location:
Cambridge UK
Registered:
February 2005
Re: public void setParentSBML(SBase parent) 18 Dec '09 07:10 Go to previous messageGo to previous message

marine@ebi.ac.uk wrote:
>> Andreas Draeger wrote:
>>
>>> Hi all,
>>>
>>> The methos setParentSBML in SBase and AbstractSBase can lead to a
>>> destroyed SBML data structure. In previous versions the attribute
>>> parentSBMLObject had the default modifier. This ensured that only
>>> classes within the jsbml package were able to access this attribute and
>>> to change its value. This way pointers could not be set to objects that
>>> aren't actually the parent node in the SBML hierarchy. Having this
>>> method set to public allows also other objects from the outside to
>>> destroy the model and to create incorrect and invalid SBML. I'd like to
>>> set the modifier to the default value again.
>>>
>>>
>> I thing, you would have to put it protected at least but I thing the
>> problem is that the classes from Marine parser are using it may be.
>> And classes that extends the basic elements for a level 3 package might
>> want to use it.
>>
>> Create a tracker item may be ?
>>
>> Nico
>>
>
> I don't use setParentSBML directly in the parser and if I did, it was a
> mistake as I created a method setThisAsParentSBMLObject(AbstractSBase
> sbase) which automatically set the current object instance as parentSBML
> object of 'sbase'. This method also set the level and version of 'sbase'
> if it is not set or check if the level and version of 'sbase' are the same
> as those of this object.
>
>
So people can use your setThisAsParentSBMLObject(AbstractSBase) to mess
up with the SBML hierarchy the same way as with setParentSBML ?

> I agree with Nico, it is better that these methods are protected and not
> private. Moreover, we should not forget that the SBMLDocument and data
> structure can change as several packages can add other elements. I agree
> we should be careful when we set the parentSBML object but we need to be
> flexible too for the package extensions.
>
>
>> ____________________________________________________________
>> To manage your jsbml-development list subscription, visit
>> https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
>>
>> For a web interface to the jsbml-development mailing list, visit
>> http://sbml.org/Forums/
>>
>> For questions or feedback about the jsbml-development list,
>> contact sbml-team@caltech.edu
>>
>>
>
>
> ____________________________________________________________
> To manage your jsbml-development list subscription, visit
> https://utils.its.caltech.edu/mailman/listinfo/jsbml-development
>
> For a web interface to the jsbml-development mailing list, visit
> http://sbml.org/Forums/
>
> For questions or feedback about the jsbml-development list,
> contact sbml-team@caltech.edu
>

____________________________________________________________
To manage your jsbml-development list subscription, visit
https://utils.its.caltech.edu/mailman/listinfo/jsbml-development

For a web interface to the jsbml-development mailing list, visit
http://sbml.org/Forums/

For questions or feedback about the jsbml-development list,
contact sbml-team@caltech.edu

      

SubjectPosterDate
Read Message   public void setParentSBML(SBase parent) Andreas Dräger18 Dec '09 06:09
Read Message   Re: public void setParentSBML(SBase parent) rodrigue18 Dec '09 06:51
Read Message   Re: public void setParentSBML(SBase parent) Marine Dumousseau18 Dec '09 07:06
Read Message   Re: public void setParentSBML(SBase parent)  rodrigue18 Dec '09 07:10
Read Message   Re: public void setParentSBML(SBase parent) Marine Dumousseau18 Dec '09 07:25
Previous Topic:Re: help offer
Next Topic:getters and Double or Integer objects
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.