XML Datasets
XML Datasets
Since we need to load our Chart-Data from XML-Files, I want to implement Classes like XmlCategoryDataset, XmlXYDataset and perhaps also XmlPieDataset.
If anybody knows an implementation already, I would apreciate, otherwise I would like to pass the implementation to some interested testers.
Claude
If anybody knows an implementation already, I would apreciate, otherwise I would like to pass the implementation to some interested testers.
Claude
Re: XML Datasets
Hi Claude,
I think a standardised XML format for the datasets used in JFreeChart would be a real asset.
I'm not sure if you would need to write specific XmlXXXDataset classes (although that would work)...I was thinking more along the lines of a utility class with methods:
public static CategoryDataset readXMLCategoryDataset(InputStream in);
public static void writeXMLCategoryDataset(CategoryDataset data, OutputStream out);
...and so on with similar methods for the other dataset interfaces.
Of course, the 'read' method above would have to instantiate *some* class that implements the CategoryDataset interface, but it doesn't really matter which class it is.
That's just my thoughts without having tried to implement anything. I wish I had some time to work on this...I'll certainly be happy to do some testing on any code you can contribute.
Regards,
DG.
I think a standardised XML format for the datasets used in JFreeChart would be a real asset.
I'm not sure if you would need to write specific XmlXXXDataset classes (although that would work)...I was thinking more along the lines of a utility class with methods:
public static CategoryDataset readXMLCategoryDataset(InputStream in);
public static void writeXMLCategoryDataset(CategoryDataset data, OutputStream out);
...and so on with similar methods for the other dataset interfaces.
Of course, the 'read' method above would have to instantiate *some* class that implements the CategoryDataset interface, but it doesn't really matter which class it is.
That's just my thoughts without having tried to implement anything. I wish I had some time to work on this...I'll certainly be happy to do some testing on any code you can contribute.
Regards,
DG.
Re: XML Datasets
I can agree with a utility class, if you then move those methods to the Datasets, if they work properly.
I would not like such a util-class stay forever, even if it is the better solution that my proposal.
I would not like such a util-class stay forever, even if it is the better solution that my proposal.
Re: XML Datasets
Hi Claude,
Thanks, I have your code. Unfortunately I haven't had time to try it out yet, but I hope to do so before releasing 0.9.4.
Regards,
DG.
Thanks, I have your code. Unfortunately I haven't had time to try it out yet, but I hope to do so before releasing 0.9.4.
Regards,
DG.
Re: XML Datasets
Dave & Claude,
we are in thinking about using XML for both chart definition and chart data, possibily using Cocoon for XML feeding (see http://xml.apache.org/cocoon ).
Is there anyone who has tried something like this ?
Thanks in advance.
we are in thinking about using XML for both chart definition and chart data, possibily using Cocoon for XML feeding (see http://xml.apache.org/cocoon ).
Is there anyone who has tried something like this ?
Thanks in advance.
Re: XML Datasets
Hi Luca
designe a XML Language for Chart definition or data is more or less uncoupled from cocoon.
As far as I see it, modelling Chart Data in XML is quite easy and very useful, since data is changing all the time.
Designing Chart Properties in XML is quite complicated because of the large amount of possibilities and even growing number of features. The use of such a language is not so useful, you normally have a stable set of charts, if you have automated chart generation.
So I vote for keeping it simple and effective in the first version.
When Dave will commit the concept of the XML code, I'll work on it and publish it quickly.
Claude
designe a XML Language for Chart definition or data is more or less uncoupled from cocoon.
As far as I see it, modelling Chart Data in XML is quite easy and very useful, since data is changing all the time.
Designing Chart Properties in XML is quite complicated because of the large amount of possibilities and even growing number of features. The use of such a language is not so useful, you normally have a stable set of charts, if you have automated chart generation.
So I vote for keeping it simple and effective in the first version.
When Dave will commit the concept of the XML code, I'll work on it and publish it quickly.
Claude
Re: XML Datasets
Hi,
Just wanted to say that XML support would be a real asset. And I would love to see Chart Properties exposed in XML as well. This would make it so much easier for us non-experts in Java.
Thanks,
Soren
Just wanted to say that XML support would be a real asset. And I would love to see Chart Properties exposed in XML as well. This would make it so much easier for us non-experts in Java.
Thanks,
Soren
Re: XML Datasets
I really like using JDom from apache.org when working with XML files. Furthermore, I would suggest a utility class that could not only read XML files and generate charts, but also accept charts and serialize them as XML in an output stream.
-Todd
-Todd
Re: XML Datasets
Hi All,
First up, I didn't get a chance to try out Claude's code before releasing 0.9.4, because I need to find out more about XPath first. But I am going to look at it this week.
All the other suggestions are great. I will be doing some work on reading chart definitions from XML, because I need this for embedding charts in JFreeReport. And I'd like to get Claude's dataset formats in, because I can see some applications for that. If anyone else wants to contribute any code, it would be welcome...
Regards,
DG.
First up, I didn't get a chance to try out Claude's code before releasing 0.9.4, because I need to find out more about XPath first. But I am going to look at it this week.
All the other suggestions are great. I will be doing some work on reading chart definitions from XML, because I need this for embedding charts in JFreeReport. And I'd like to get Claude's dataset formats in, because I can see some applications for that. If anyone else wants to contribute any code, it would be welcome...
Regards,
DG.