How to generate Google Search result's time line image - java

Can you please tell me if there is any open source library which generate 'timeline image' in Google Search result? (see below as an example):
http://www.google.com/search?q=history&hl=en&sa=X&tbo=1&tbs=tl:1,tll:1400,tlh:1599&ei=oL46SsOrIIy0sgPQrrCDCw&oi=timeline_histogram_nav&ct=timeline-histogram&cd=9
Thank you.

That image is generated by Google Chart Server. You can use this from your web applications. I'm not aware of an open source equivalent.

These graphs are similar to sparklines which were based on thoughts by Edward Tufte.
There's quite a few open source libraries which can generate these, including JQuery. You can find more implementation links by searching Google for "sparkline [language]".

Related

Getting information from a third party Wiki page

In the project I am working on I need to access information from the website explainxkcd.com which gives the explanation of specific xkcd comics. The information I am looking for would be the explanation of the comic as a string. Explainxkcd is a site that runs using mediawiki, software that forms a template for the "wiki" feel. Mediawiki has an api that allows you to extract information from their websites and I have gone to http://www.mediawiki.org/wiki/API:Main_page trying to figure out how to use their API for this particular wiki site but to no avail. It seems that you can replace the "index.php" in a URL with api.php to use the API but when I try this for http://explainxkcd.com/9/api.php it doesn't seem to work. I guess my URL is wrong but I don't see any information on how to find the specific URL to use for Explainxkcd.com
QUESTION:
How can I access information from a third party wikipedia page in a Java program? This can be through the mediawiki api or some other solution. If you know a good way to find the URL that can be used with mediawiki that would be preferred. Just looking for a nudge in the right direction here.
Thanks
Using the same method, s/index.php/api.php/, I get a different result: http://www.explainxkcd.com/wiki/api.php which seems to work. If a wiki is using pretty URLs (e.g. example.com/wiki/Main_Page), just click on edit, view source or history.
Yes, please use the API instead of screen-scraping. You can see a few existing Java libraries for that here.

How to create pie charts and present in html reports

how to generate pie charts based on the data in the XML and present it using html.
XML contains steps related to test case steps and result of each steps.
The pie charts should show the total no of steps failed and passed.
I have no idea how to use charts in reports , tried to google it but could not get from where to start and also confused.
can anybody help me or guide me in the right direction.
forgot to mention that i am using xslt to present data in html , how to do in that scenario.
thanks in advance.
I am biased towards JfreeChart, pretty easy API to learn and one can create complex charts with some exposure to the API which is documented well enough.
In your case, the data source will be xml and output can be seen on the web.
you can try morris for generating chart
http://www.oesmith.co.uk/morris.js/
Try to extract data from xml file using DOM parser a good tutorial can be found here. http://www.mkyong.com/java/how-to-read-xml-file-in-java-dom-parser/
Use the extracted data in html page to make an array and render it using Morris.js
Comment if you need further clarification
There are lots of libraries available to draw charts.
-JasperReports
-iReport
-DataVision
-jsCharts
-highCharts
see here for more

Java library for PDF reader supporting highlighting

I would like to build my own pdf-reader in Java and would like to have the possibility to highlight words in the pdf and save these highlights.
I have seen there exist several PDF libraries I can use, but I wonder which would be best to use for this purpose.
Is it possible to do this kind of highlighting, and is there a specific library or so to help me do this?
Any help is greatly appreciated!
Here you have a big list of Open Source pdf libraries for java. I haven't used any of them but I'll bet for pdfBox that's part of Apache Foundation. It has a specific class to highlight PDFs in xml but I think you also have to rebuid them.
Use Apache Lucene Library. It provide highlight option for search terms.
You can use Apache PDFBox for highlighting in PDF.
Link: https://pdfbox.apache.org/

The Java Web Translator library

please ,can you help me for using of this library"The Java Web Translator library"
in my applicatin ,or give me an example; how i can use it in my code java?
I have seen the google api translator but i chose JWT because it's
provides automatic language translation to the client's locale.
Thank's in advance
Have you read the documentation? It's here : http://sourceforge.net/projects/webtranslator/files/JavaWebTranslator-0.2a/Java%20WebTranslator%200.2a%20%28Alpha%20Release%29/
Download the zip documentation file, unzip it, and open the index.html file. It contains a quick start guide and other useful material.

Create PDFs from multipage forms in WebObjects

I would like to automatically generate PDF documents from WebObjects based on mulitpage forms. Assuming I have a class which can assemble the related forms (java/wod files) is there a good way to then parse the individual forms into a PDF instead of going to the screen?
The canonical response when asked about PDFs from WebObjects has generally been ReportMill. It's a PDF document generating framework that works a lot like WebObjects, and includes its own graphical PDF builder tool similar to WebObjects Builder and Interface Builder. You can bind elements in your generated PDFs to dynamic data in your application just as you would for a WOComponent.
They have couple of tutorial videos on the ReportMill product page that should give you an idea of how the tool works. It'll probably be a lot easier than trying to work with FOP programmatically.
I'm not familiar with WebObjects, but I see you have java listed in there.
iText is a java api for building pdfs. If you can access a java api from WebObjects you should be able to build pdfs that way.
ERPDFWrapper component in Project Wonder: Site link
ScArcher2>>
I have looked into different routes for creating PDFs on the fly including FOP and a few Java libraries. I think what I am really asking is if anyone has already done this in the WebObjects framework. My hope is that someone familiar with WebObjects might have done this already and have some insight that would save me some time.
You can use ReportMill or Jasper Reports. Compared with ReportMill Jasper Reports is Free but requires learning huge library. You can use IReport or Jasper Assistant eclipse plugin(If you are using WOLips) for building report templates. My experiance both are good.
Jasper Reports support have been added to Project Wonder a week ago :
Site Link Video
A talk about that new framework was done at WOWODC 2010, and it was recorded. Check wocommunity.org and the mailing list about that in October.

Categories