I have made pretty good changes in the validation of an SBML task. If you refer my blog post which I have written earlier, clicking on the validation button displays the errors in an unembellished way if there are any errors in the selected file. There was no user friendly message if the selected file has no errors in it. So my main task was to make the UI look good as well as to display user friendly error messages.
So, I have implemented the SBMLError class to validate the selected sbml file. That was a very easy task. But I had some problems while displaying them in the output pane of the validation dialog box. Earlier, I implemented textArea which has a setText and append functions on it. So, it was very simple to display the errors using the textArea. But the problem arose when I got to know that textArea doesn’t have support for styling the font with colors and I found that textPane has an awesome support which enables us to style the text in it.
When I was ready to implement the textPane, I found that there was no append function on textPane. Hence I wrote a separate append function to display the data in the textPane. Refer append function in ValidatePanel.java
The following screen shots depicts the working of validation of sbml file.
Figure 1: Clicking on Validate button on the main panel displays this dialog.
Figure 2: Choosing a valid SBML file from the directory. Here, the BIOMD0000000001.xml doesn’t have any errors.
Figure 3: Displays the output in the output pane.
Figure 4: Choosing a file with errors. Here, I have removed some three lines in the algebraicrules.xml which makes the file an invalid sbml file.
Figure 5: Displays all the errors with the severity level, line number and the error message.
Figure 6: Extension of the figure 5.
Note: The sbml files are taken from http://www.ebi.ac.uk/biomodels-main/BIOMD0000000001
I have completed this task in the last week. I am very sorry for posting it so late.