Message in Constraint
mephenor opened this issue · comments
I write an exporter for SBML. I tried to export an message objekt in a constraint. I really mean message
and not the from SBase inherrited notes object. The export of a message object does not work properly.
I use the methode constraint.setMessage(parameter). The parameter can be an XMLNode or a String. Both do not work
correct. When the parameter is
message = "<message><body xmlns="http://www.w3.org/1999/xhtml\"><p>" +message+"</p></body></message>";
than the method XMLNode.convertStringToXMLNode(message) in setMessage(message) returns null.
When the parameter is
message = "<notes><body xmlns="http://www.w3.org/1999/xhtml\"><p>" +message+"</p></body></notes>";
than the message will be exported as a note object and not as a message object.
I do not know exactly, what is going on, but I think there is missing some code for processing messages.
Reported by: *anonymous
Indeed, there was nothing specific for the message, I forgot about it when I changed the way the parsing worked.
I have commited some changes to the trunk that should make it work now.
Can you confirm that it is working for you ?
Original comment by: niko-rodrigue
- labels: --> XML Reading/Writing
- assigned_to: nobody --> niko-rodrigue
- milestone: --> jsbml 0.8
- status: open --> open-fixed
Original comment by: niko-rodrigue
thank you for the quick fix, works fine
Original comment by: nobody
- status: open-fixed --> open-fixed
Original comment by: niko-rodrigue
I discovered that there is stil a problem when I export messages of constraint. When I import the file in my program the message has the structure
...
<annotation>
</annotation>
<message>
</message>
...
when I export the SBMLDocument object the structure in the new file is:
...
<annotation>
<message>
</message>
</annotation>
...
When there is set no annotation then the structure of message is okay. I am not sure where the problem is but the parser might use a method which is not ment for processing messages in constraint or there is still code missing?
Original comment by: nobody
- status: open-fixed --> closed-fixed
Original comment by: niko-rodrigue
Ok, it should be working fine now when annotations are present.
Original comment by: niko-rodrigue