fimi-cvs-commits Mailing List for fimi
Status: Planning
Brought to you by:
somefreestring
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(100) |
Jul
(112) |
Aug
(124) |
Sep
(49) |
Oct
|
Nov
(109) |
Dec
(5) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(2) |
Feb
|
Mar
(58) |
Apr
(73) |
May
(37) |
Jun
|
Jul
(26) |
Aug
(59) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <fim...@li...> - 2010-05-14 19:38:02
|
Update of /cvsroot/fimi/HttpClient/src/parser In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19985/src/parser Added Files: scoach.java Log Message: [no comments] --- NEW FILE: scoach.java --- package parser; import helpers.XMLHelper; import java.io.PrintWriter; import javax.xml.xpath.*; import oracle.xml.parser.v2.*; import org.w3c.dom.Node; import org.w3c.dom.Element; import org.w3c.dom.Document; import org.w3c.dom.NodeList; public class scoach { public static void main(String[] args) throws Exception { String pattern = "(//table)[1]"; String xmlString; String xmlString2; xmlString2 = "<root><name>hallo</name></root>"; xmlString = test_html(); XMLDocument xd = XMLHelper.getXMLfromHTML(xmlString); //xd.print(new PrintWriter(System.out)); XPath xpath = XPathFactory.newInstance().newXPath(); Element e = (Element) xpath.evaluate("(//div[@class='TabContainer'])[2]", xd, XPathConstants.NODE); System.out.println(e.getNodeName()); XMLElement element = (XMLElement) xd.getDocumentElement(); System.out.println( xd.getElementsByTagName("table").getLength()); NodeList nl = xd.getElementsByTagName("table"); for (int i = 0; i < nl.getLength(); i++) { System.out.println(nl.item(i).getChildNodes().item(3).getNodeValue()); } // end for } // end main public static String test_html(){ return "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" + "\n" + "\n" + "<html xmlns=\"http://www.w3.org/1999/xhtml\" >\n" + "<head><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" /><meta http-equiv=\"pragma\" content=\"no-cache\" /><meta name=\"Publisher\" content=\"Smarthouse Media GmbH\" /><meta name=\"Copyright\" content=\"Scoach.ch\" /><meta name=\"Keywords\" content=\"Zertifikate, Derivate, Optionsscheine, Realtimekurse, Boersenkurse, Charts, Börse, DAX, Dow Jones\" /><meta name=\"Description\" content=\"Scoach.ch ist das Portal für Zertifikate und Optionsscheine. Hier finden Sie Stammdaten und Realtime-Push-Kurse zu allen am Börsenplatz Quotematch gehandelten Produkten.\" /><meta name=\"page-topic\" content=\"Zertifikate\" /><meta name=\"page-type\" content=\"Kommerzielle Homepage\" /><meta name=\"audience\" content=\"Alle\" /><meta name=\"Language\" content=\"Deutsch\" /><title>\n" + " Call-Warrant [Clariden Leu] | CH0110581516 | Scoach Schweiz AG\n" + "</title><link href=\"/images/icons/favicon.ico\" rel=\"shortcut icon\" /><link href=\"/css/global/global.css?v=7a104cc3287edd22d0f66205b2bc82ec\" rel=\"stylesheet\" type=\"text/css\" /><link href=\"/css/redesign/website.css?v=e981bf9b59f6dce447d6de2dcb008cce\" rel=\"stylesheet\" type=\"text/css\" /><link href=\"/css/global/scoach_controls.css?v=ace291184869270e1096a2467b0a39ea\" rel=\"stylesheet\" type=\"text/css\" /><link href=\"/css/global/cms.css?v=a3d55c5e08d0f7ff74e6a47c4a803808\" rel=\"stylesheet\" type=\"text/css\" /><script src=\"/js/global/combined_external.js?v=06df10e466e8e129d978b81528f8d96b\" type=\"text/javascript\"></script><script src=\"/js/global/combined_scoach.js?v=06df10e466e8e129d978b81528f8d96b\" type=\"text/javascript\"></script></head>\n" + "\n" + "<body>\n" + "<form id=\"aspnetForm\" name=\"aspnetForm\" method=\"post\" action=\"/DEU/Factsheet/Warrants/CH0110581516\" onsubmit=\"if (typeof(WebForm_OnSubmit) == 'function') { return WebForm_OnSubmit(); } else { return true; }\">\n" + "<input type=\"hidden\" name=\"__WPPS\" id=\"__WPPS\" value=\"s\" />\n" + "<input type=\"hidden\" name=\"ctl00_ScriptManager_HiddenField\" id=\"ctl00_ScriptManager_HiddenField\" value=\"\" />\n" + "<input type=\"hidden\" name=\"__VIEWSTATE\" id=\"__VIEWSTATE\" value=\"RbD4JptwWWMvxZIzRePNoUiyZ/0U/d7NRwA6XfCJoQ98cphDZecz0ebWzLSiY1JWWpJ5Ow1j1jsuOJU3M5ooHXddQk6krcydYeG4m6D94GWZpPHVIomUhhb1E3tweTutsbcN62di2lqk5ciuGFp7pRbBN0Jvv5vOdz35+sZy7+M3dm1Sd1c3z+MRN2mrMeaqEFgaKvE55fwdXvUtuAbBirLco+HmKnEuLbvKbnDXKdm+1j9nsJq15g3aK32Kdpo5o5qetCPSwQwsI0GStJ1LPNQyJOdV/3neHCeeEV89Q1FrRXfGBBZYu3fTL4Ju/MrUlNj8n7kyY45hSOFCY7NnsLrSuxGbYfHXgL5qY1/I0TiLssd77n3V2LN90mjgXuky12eO4/zyo9xtrZDSeavmOPagiB9PKt77y4quEZLX7xlmZiiZ4GBzke9l7JL9wEmq0qHXb+7CwyoPfkq/NabxX9VtkVT9qyDMtWOoLEvHq3gzYq4dlLKskaDJSMiEjCQRqd5vqn7IM9TFRuae0sth1BJLfbx773NoW52bXjq5Y3ywj7BwOqnRQUBRyIgJCiJB2ITRWs8an2/kNw+S3vqpecr8wah43urksAf9Cw8hHah/I39RsE5RHf2F53fuAGsDsm2fBTMCCCi8qS6Lk0bG/qAK/tl3hc6t4cN5vqm2fLXBGnjrhunEooNg1B15LHmJN7bWynWGWlLiiH6StlhJ4KwzZrRcDiiTWR+c2LY5eMOw9iqRFBKnwXofiYA/F4CD68DZKeTYYgVThO/q4o+RrGvTcPCYEXxtqeVxU1UQ2ROHyt4Kgk49qEp6bH4Sojg6jlNmD09IC2KKTiR76/ctKAx1W7ctOlAPR6sqmxuW7R2n90L0qcFYWeilIjV4oE/ykSgSPZNkLVqrfButhbnJ5uc/hpDeaTE5+XiauPXaY+y0lqm7J62Ds/8agtArPXlDbd2Ku+2d1DyoAbGkgIfs1uw6YHfINikDm3Hkc9iCfujlIAF4rLR1tcdwWWHoCDLupWrxSfSnQQJztVEN8pXDEKDDetM6eZV7c0kY3AWmyN00pj/DIWImkZkjQ4BIgLStv0aKBMtIlO3JTa85H+R9SmHTizCfQxdafcWsB+s5gSpvKCroel+BF5JC8PPc7y6q3wy0/3fi2KoG0yF6Y3IE0qNSxDrchCysqz/w9fbWa5y3hQ2VW1+EBUy2oGs8lj2jqT5RJZkC9Y0BnPHcw/zgvRGPoedG54VAKgZJr7FaMzZ8gOqIQCPDIDueaGmfYeZiHc4mjPASLNG48l0//25Vj1OTBxhzXbDcbf6R0/7fvm6zmWB74bx6FGOoFVt++q/HwpEXBpK55LYdmIGoG89EuYMLDPKYkAS9e2YzTClVOozwSyBvDsWKJd6HYqqCdjxYQujDkFnsi+148+poM0knEvOdHIFMWb/pzIwp0R3X2WBs2Pf4YsGOCnH79rJCFycBC0EM9BhxwkiIFAUY7WOtZ77mON7LD7JkxVsiJQs5yFxy4aYjlNsn38CphhbEy6xVyR70WqgI0jWdJNJL0nxY4ZgyLfr70g83eC3mRMDtTqcd+0aXNOyCgEVXt1++BB0P9bXWuFgA1hKdMcg2u+pkWiEjYnwtU18ic7/rGVz8ePzyg4ROmtVz4UqPrUkUYnr5XEDXl5DR5GLRV3JfuFjRneYjpMgYelNlXkj2CPiZCNlk5x0mgwjxfJLBWk38H3jPFD/CjewYbM1E15fFs2qHDvfNbQnRv7Ys9YQ82gXUwbGOaSwkJEhoxyDwRcOlRkphXOqaGRL3Ujsu101hWAqPkfecdoqyXJhn+eQj8UXRlTPPioH9Jttk9LkEtD9SlOl9A6P4wr7y+QieqjzvVvP54b8lXhGAbsxuOVlWWGB8G3djnBZTbhErAzyYJ10yVzeKw8+MTbJ0VoxLqsMhci5OYWN18rEP7yifeRgPwl7Edz0i7O0M4nZ/TXMVkowrMdteOp0ZjdzMWHMjuvwk/iFahnwAho+j/1ZtnJ3rus7wAd1KaT3SiFWxnBCHuqt0jb8Z/LnnRYMoXMRc06Z63uo3/74GE0tsKhbTrbu9pyHdrFoWEDj4MVeMf22kGpgGR9vr3tSLEUwOr9UYiUa1D8g3zW3j6Tggb4pXxHj3NXNH2DBRI+G3FJaF0/LBBKm4R9HFtMTgrBZExrn4FQKk8SIoEQaXwq7zaDSR0L5NZDnkiiRK8AJpF6gVciaUFXI2nQKYiu5nLnLjm54uenTSyQN75extxC9LmtyHRaPkwb02+TF2l0iIdTrx5pm8mIuJFzMh+BQgwQja+76BmGhvgYzxwaUuHwhrMdgqpOZEUAvrTUHn6MWGRKJ8oLfBT98e1oJcGNNjrDQIhkEZu4XkY59UQV4V997eUH+kNe0wBs0kcpTlSAQ7ollSGQ==\" />\n" + "\n" + "\n" + "<script type=\"text/javascript\">\n" + "//<![CDATA[\n" + "var __cultureInfo = '{\"name\":\"de-CH\",\"numberFormat\":{\"CurrencyDecimalDigits\":2,\"CurrencyDecimalSeparator\":\".\",\"IsReadOnly\":true,\"CurrencyGroupSizes\":[3],\"NumberGroupSizes\":[3],\"PercentGroupSizes\":[3],\"CurrencyGroupSeparator\":\"\\u0027\",\"CurrencySymbol\":\"SFr.\",\"NaNSymbol\":\"n. def.\",\"CurrencyNegativePattern\":2,\"NumberNegativePattern\":1,\"PercentPositivePattern\":1,\"PercentNegativePattern\":1,\"NegativeInfinitySymbol\":\"-unendlich\",\"NegativeSign\":\"-\",\"NumberDecimalDigits\":2,\"NumberDecimalSeparator\":\".\",\"NumberGroupSeparator\":\"\\u0027\",\"CurrencyPositivePattern\":2,\"PositiveInfinitySymbol\":\"+unendlich\",\"PositiveSign\":\"+\",\"PercentDecimalDigits\":2,\"PercentDecimalSeparator\":\".\",\"PercentGroupSeparator\":\"\\u0027\",\"PercentSymbol\":\"%\",\"PerMilleSymbol\":\"â?°\",\"NativeDigits\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"],\"DigitSubstitution\":1},\"dateTimeFormat\":{\"AMDesignator\":\"\",\"Calendar\":{\"MinSupportedDateTime\":\"\\/Date(-62135596800000)\\/\",\"MaxSupportedDateTime\":\"\\/Date(253402297199999)\\/\",\"AlgorithmType\":1,\"CalendarType\":1,\"Eras\":[1],\"TwoDigitYearMax\":2029,\"IsReadOnly\":true},\"DateSeparator\":\".\",\"FirstDayOfWeek\":1,\"CalendarWeekRule\":2,\"FullDateTimePattern\":\"dddd, d. MMMM yyyy HH:mm:ss\",\"LongDatePattern\":\"dddd, d. MMMM yyyy\",\"LongTimePattern\":\"HH:mm:ss\",\"MonthDayPattern\":\"dd MMMM\",\"PMDesignator\":\"\",\"RFC1123Pattern\":\"ddd, dd MMM yyyy HH\\u0027:\\u0027mm\\u0027:\\u0027ss \\u0027GMT\\u0027\",\"ShortDatePattern\":\"dd.MM.yyyy\",\"ShortTimePattern\":\"HH:mm\",\"SortableDateTimePattern\":\"yyyy\\u0027-\\u0027MM\\u0027-\\u0027dd\\u0027T\\u0027HH\\u0027:\\u0027mm\\u0027:\\u0027ss\",\"TimeSeparator\":\":\",\"UniversalSortableDateTimePattern\":\"yyyy\\u0027-\\u0027MM\\u0027-\\u0027dd HH\\u0027:\\u0027mm\\u0027:\\u0027ss\\u0027Z\\u0027\",\"YearMonthPattern\":\"MMMM yyyy\",\"AbbreviatedDayNames\":[\"So\",\"Mo\",\"Di\",\"Mi\",\"Do\",\"Fr\",\"Sa\"],\"ShortestDayNames\":[\"So\",\"Mo\",\"Di\",\"Mi\",\"Do\",\"Fr\",\"Sa\"],\"DayNames\":[\"Sonntag\",\"Montag\",\"Dienstag\",\"Mittwoch\",\"Donnerstag\",\"Freitag\",\"Samstag\"],\"AbbreviatedMonthNames\":[\"Jan\",\"Feb\",\"Mrz\",\"Apr\",\"Mai\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Dez\",\"\"],\"MonthNames\":[\"Januar\",\"Februar\",\"März\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Dezember\",\"\"],\"IsReadOnly\":true,\"NativeCalendarName\":\"Gregorianischer Kalender\",\"AbbreviatedMonthGenitiveNames\":[\"Jan\",\"Feb\",\"Mrz\",\"Apr\",\"Mai\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Okt\",\"Nov\",\"Dez\",\"\"],\"MonthGenitiveNames\":[\"Januar\",\"Februar\",\"März\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Dezember\",\"\"]}}';//]]>\n" + "</script>\n" + "\n" + "<script src=\"/DE/ScriptResource.axd?d=QhrpxeoGl8QRK1cSWWdoQtjdAh1JBe8wEnQypXiP0fgkDKMrGLUXl-buSyI7OciaAiDFMiix6euRNDMT2S0hy6LzQV6Ra4zsKPgbw9IYsnE1&t=633518094485772227\" type=\"text/javascript\"></script>\n" + " \n" + " \n" + "\n" + " \n" + " \n" + " <div id=\"CenterContainer\">\n" + " <div id=\"CenterFrame\">\n" + " <div id=\"HeaderHolder\">\n" + " <div id=\"HeaderUserBar\">\n" + " <span class=\"left_corner float_left\"></span><iframe id=\"HeaderUserBarContentIFrame\" src=\"/Pages/Fragment/HeaderUserBarContent.aspx\" frameborder=\"0\" onload=\"javascript:this.style.height='36px';\" scrolling=\"no\">\n" + "\n" + " </iframe><span class=\"right_corner float_right\"></span>\n" + " </div><div id=\"HeaderContent\">\n" + " <div id=\"HeaderInformationBar\">\n" + " <a class=\"float_left logo\" href=\"/DE/\"></a><div class=\"float_right information\">\n" + " <div class=\"left_information\">\n" + " <div class=\"current_date\">\n" + " Dienstag, 11.05.2010 | <span id=\"liveClock\">22:33</span><span>MESZ</span>\n" + " </div><div class=\"current_website\">\n" + " Marktplatz <a class=\"\" href=\"http://www.scoach.de/\">Deutschland</a> | <a class=\"bold\" href=\"http://www.scoach.ch/\">Schweiz</a>\n" + " </div><div class=\"current_language\">\n" + " <a class=\"bold\" href=\"/DEU/Factsheet/Warrants/CH0110581516\">Deutsch</a> | <a class=\"\" href=\"/ENG/Factsheet/Warrants/CH0110581516\">English</a> | <a class=\"\" href=\"/FRA/Factsheet/Warrants/CH0110581516\">Français</a>\n" + " </div>\n" + " </div><div id=\"ctl00_HeaderHolder_ctl01_PrintUpdatePanel\">\n" + " <a id=\"ctl00_HeaderHolder_ctl01_PrintButton\" href=\"#\" class=\"float_right ActionButton ActionButton_Print\" onclick=\"MasterPage.OpenPopup('/DEU/Factsheet/Warrants/CH0110581516?pagedisplaymode=Print&tabProductDetailContainer=0&tabDetailChartGadget=0'); return false;\"><span class=\"forceMinSize\"> </span></a>\n" + " </div>\n" + " </div><div class=\"clear\">\n" + "\n" + " </div>\n" + " </div><div id=\"HeaderInputBar\">\n" + " <div class=\"float_left\">\n" + " <div id=\"InstrumentSearch\">\n" + " <input name=\"ctl00$HeaderHolder$ctl02$HeaderSearchBox$HeaderSearchTextBox$ScoachTextBox\" type=\"text\" id=\"ctl00_HeaderHolder_ctl02_HeaderSearchBox_HeaderSearchTextBox_ScoachTextBox\" class=\"ScoachTextBox \" onkeydown=\"if (event.which || event.keyCode) { if ((event.which == 13) || (event.keyCode == 13)) { __doPostBack('ctl00$HeaderHolder$ctl02$HeaderSearchBox$HeaderSearchButton','ctl00_HeaderHolder_ctl02_HeaderSearchBox_HeaderSearchButton'); return false; } } else { return true; }\" /><a id=\"ctl00_HeaderHolder_ctl02_HeaderSearchBox_HeaderSearchButton\" href=\"#\" class=\" ActionButton ActionButton_Go\" onclick=\"__doPostBack('ctl00$HeaderHolder$ctl02$HeaderSearchBox$HeaderSearchButton','ctl00_HeaderHolder_ctl02_HeaderSearchBox_HeaderSearchButton'); return false;\"><span class=\"forceMinSize\"> </span></a>\n" + " </div>\n" + " </div><div class=\"float_right\">\n" + " <div id=\"ctl00_HeaderHolder_ctl02_HeaderLogin_Container\">\n" + " <div id=\"HeaderLogin\">\n" + " <div class=\"loginMain\">\n" + " <input name=\"ctl00$HeaderHolder$ctl02$HeaderLogin$Control$UserName$ScoachTextBox\" type=\"text\" id=\"ctl00_HeaderHolder_ctl02_HeaderLogin_Control_UserName_ScoachTextBox\" class=\"ScoachTextBox \" onkeydown=\"if (event.which || event.keyCode) { if ((event.which == 13) || (event.keyCode == 13)) { __doPostBack('ctl00$HeaderHolder$ctl02$HeaderLogin$Control$LoginButton','ctl00_HeaderHolder_ctl02_HeaderLogin_Control_LoginButton'); return false; } } else { return true; }\" /><input name=\"ctl00$HeaderHolder$ctl02$HeaderLogin$Control$Password$ScoachTextBox\" type=\"password\" id=\"ctl00_HeaderHolder_ctl02_HeaderLogin_Control_Password_ScoachTextBox\" class=\"ScoachTextBox \" onkeydown=\"if (event.which || event.keyCode) { if ((event.which == 13) || (event.keyCode == 13)) { __doPostBack('ctl00$HeaderHolder$ctl02$HeaderLogin$Control$LoginButton','ctl00_HeaderHolder_ctl02_HeaderLogin_Control_LoginButton'); return false; } } else { return true; }\" /><a id=\"ctl00_HeaderHolder_ctl02_HeaderLogin_Control_LoginButton\" href=\"#\" class=\" ActionButton ActionButton_Go\" onclick=\"__doPostBack('ctl00$HeaderHolder$ctl02$HeaderLogin$Control$LoginButton','ctl00_HeaderHolder_ctl02_HeaderLogin_Control_LoginButton'); return false;\"><span class=\"forceMinSize\"> </span></a>\n" + " </div><div class=\"loginRememberCheckbox\">\n" + " <span class=\"ScoachCheckBoxContainer\"><input onclick checked=\"checked\" id=\"ctl00_HeaderHolder_ctl02_HeaderLogin_Control_RememberLogin\" name=\"ctl00$HeaderHolder$ctl02$HeaderLogin$Control$RememberLogin\" type=\"checkbox\" /><label for=\"ctl00_HeaderHolder_ctl02_HeaderLogin_Control_RememberLogin\">speichern</label></span>\n" + " </div><div class=\"loginLinks\">\n" + " <a class=\"registerUrlLink\" href=\"/DE/Showpage.aspx?pageID=177\">Neu anmelden</a><a class=\"recoverPasswordLink\" href=\"/DE/Showpage.aspx?pageID=178\">Passwort vergessen?</a>\n" + " </div><div class=\"LoginErrors\">\n" + "\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div><div id=\"HeaderNavigationBar\">\n" + " <div class=\"UpperMenu\">\n" + " <a id=\"MenuItem0\" class=\"UpperMenuItem\" href=\"/DEU/aktuelles/marktuebersicht\">Aktuell</a><a id=\"MenuItem1\" class=\"UpperMenuItem PreSelected\" href=\"/DEU/produkte/neue_suche\">SUCHEN & FINDEN</a><a id=\"MenuItem2\" class=\"UpperMenuItem\" href=\"/DEU/tools/knockout_map\">Tools</a><a id=\"MenuItem3\" class=\"UpperMenuItem\" href=\"/DEU/wissen/qualitaetsmerkmale\">Wissen</a><a id=\"MenuItem4\" class=\"UpperMenuItem\" href=\"/DEU/ueber_scoach/marktmodell\">Über uns</a><a id=\"MenuItem5\" class=\"UpperMenuItem UpperMenuItemLast\" href=\"/DEU/my_scoach/realpush_watchlist\">My Scoach</a><div class=\"clear\">\n" + "\n" + " </div>\n" + " </div><div class=\"LowerMenu\">\n" + " <div id=\"MenuItem0Sub\" class=\"LowerMenuSub LowerMenuSub\">\n" + " <a href=\"/DEU/aktuelles/marktuebersicht\" class=\"\">Marktübersicht</a> | <a href=\"/DEU/aktuelles/termine\" class=\"\">Termine</a> | <a href=\"/DEU/aktuelles/mistrades\" class=\"\">Mistrades</a>\n" + " </div><div id=\"MenuItem1Sub\" class=\"LowerMenuSub LowerMenuSub PreSelected Active\">\n" + " <a href=\"/DEU/produkte/neue_suche\" class=\"Active\">Neue Suche</a> | <a href=\"/DEU/produkte/optionsscheine\" class=\"\">Klassische Suche</a> | <a href=\"/DEU/basiswerte/aktien\" class=\"\">Basiswerte</a> | <a href=\"/DE/Showpage.aspx?pageID=81\" class=\"\">COSI - Pfandbesicherte Zertifikate</a> | <a href=\"/DE/Showpage.aspx?pageID=82\" class=\"\">Neuemissionen</a>\n" + " </div><div id=\"MenuItem2Sub\" class=\"LowerMenuSub LowerMenuSub\">\n" + " <a href=\"/DEU/tools/knockout_map\" class=\"\">Tool-Box</a> | <a href=\"/DEU/tools/produktvergleich\" class=\"\">Produktvergleich</a> | <a href=\"/DEU/tools/emittenten_matrix\" class=\"\">Emittenten-Matrix</a> | <a href=\"/DEU/tools/basiswerte_matrix\" class=\"\">Basiswert-Matrix</a>\n" + " </div><div id=\"MenuItem3Sub\" class=\"LowerMenuSub LowerMenuSub\">\n" + " <a href=\"/DEU/wissen/qualitaetsmerkmale\" class=\"\">Qualität an der Börse</a> | <a href=\"/DE/Showpage.aspx?pageID=186\" class=\"\">COSI-Pfandbesicherte Zertifikate </a> | <a href=\"/DEU/wissen/produktwissen\" class=\"\">Produkt Wissen</a> | <a href=\"/DEU/wissen/seminare_messen\" class=\"\">Messen/Weiterbildung</a> | <a href=\"/DEU/wissen/publikationen\" class=\"\">Publikation/Studie</a> | <a href=\"/DEU/wissen/swiss_derivative_map\" class=\"\">Swiss Derivative Map </a> | <a href=\"/DEU/wissen/lexikon\" class=\"\">Lexikon</a>\n" + " </div><div id=\"MenuItem4Sub\" class=\"LowerMenuSub LowerMenuSub\">\n" + " <a href=\"/DEU/ueber_scoach/marktmodell\" class=\"\">Scoach Schweiz</a> | <a href=\"/DEU/ueber_scoach/medien\" class=\"\">Medien</a> | <a href=\"/DEU/ueber_scoach/jobs\" class=\"\">Jobs</a> | <a href=\"/DE/Showpage.aspx?pageID=93\" class=\"\">Struktur/Organe</a>\n" + " </div><div id=\"MenuItem5Sub\" class=\"LowerMenuSub LowerMenuSub\">\n" + " <a href=\"/DEU/my_scoach/realpush_watchlist\" class=\"\">Watchlist</a> | <a href=\"/DEU/my_scoach/persoenliche_daten\" class=\"\">Persönliche Daten</a>\n" + " </div>\n" + " </div>\n" + " </div><div class=\"clear\">\n" + "\n" + " </div>\n" + " </div>\n" + "</div>\n" + " \n" + " <div id=\"ctl00_FullZone\" class=\"CenterContent\">\n" + " <div id=\"ctl00_WebPartManager_wp507134674_wp1892133732_Container\">\n" + " <div class=\"Gadget GadgetMargin\" id=\"ctl00_WebPartManager_wp507134674_wp1892133732_Control\">\n" + " <div class=\"ContentOuter NoBorder\">\n" + " <div class=\"Content clearfix NoPadding\">\n" + " <h1 id=\"ProductDetailHeaderHeadline\">\n" + " Call-Warrant\n" + " </h1><div id=\"ProductDetailHeaderContent\">\n" + " <div>\n" + " <span class=\"bold\">Symbol:</span> SOYCU\n" + " </div><div>\n" + " <span class=\"bold\">ISIN:</span> CH0110581516\n" + " </div><div>\n" + " <div class=\"issuerLabel\">\n" + " Emittent:\n" + " </div><img src=\"/DE/images/issuer/logo_20.gif\" class=\"issuerlogo\" /><div>\n" + " Clariden Leu\n" + " </div>\n" + " </div><div class=\"icons\">\n" + " <a target=\"_blank\" href=\"http://pdf31.smarthouse.de/PdfCreator.aspx?pdf_cu=alex_ch&pdf_s=DE&pdf_co=productDetail&pageID=66&is_ISIN=CH0110581516&derivativeTypeName=Warrants&pagedisplaymode=PDF&tabProductDetailContainer=0&tabDetailChartGadget=0\" id=\"HeaderPDFButton\" class=\"ActionButton_Pdf\" title=\"PDF\"> </a><a href=\"/DEU/Factsheet/Warrants/CH0110581516?pagedisplaymode=Print&tabProductDetailContainer=0&tabDetailChartGadget=0\" id=\"HeaderPrintButton\" class=\"ActionButton_Print\" title=\"Drucken\"> </a>\n" + " </div><div id=\"HeaderNotLoggedIn\">\n" + " Bitte anmelden, um dieses Produkt in die Watchlist aufnehmen zu können\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div><div class=\"half\">\n" + " <div class=\"Gadget GadgetMargin\" id=\"ctl00_WebPartManager_wp2159465_wp1891074826\">\n" + " <div class=\"Header clearfix \">\n" + " <h2 class=\"float_left\">\n" + " Chart\n" + " </h2><span class=\"float_right HeaderCorner\"></span>\n" + " </div><div class=\"ContentOuter Border Title\">\n" + " <div class=\"Content NoPadding\">\n" + " <div class=\"TabContainer\">\n" + " <div id=\"ctl00_WebPartManager_wp2159465_wp1891074826_TabContainerUpdatePanel\">\n" + " <div id=\"ctl00_WebPartManager_wp2159465_wp1891074826_TabContainerHeader\" class=\"TabHeader\">\n" + " <table>\n" + " <tr>\n" + " <td class=\"Active\"><a title=\"Intraday\" onclick=\"__doPostBack('ctl00$WebPartManager$wp2159465$wp1891074826$TabContainerHeader','0'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"Tab_Active_Arrow\">Intraday</span></a></td><td class=\"\"><a title=\"1 Woche\" onclick=\"__doPostBack('ctl00$WebPartManager$wp2159465$wp1891074826$TabContainerHeader','1'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"\">1 Woche</span></a></td><td class=\"\"><a title=\"1 Monat\" onclick=\"__doPostBack('ctl00$WebPartManager$wp2159465$wp1891074826$TabContainerHeader','2'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"\">1 Monat</span></a></td><td class=\"\"><a title=\"3 Mon.\" onclick=\"__doPostBack('ctl00$WebPartManager$wp2159465$wp1891074826$TabContainerHeader','3'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"\">3 Mon.</span></a></td><td class=\"\"><a title=\"6 Mon.\" onclick=\"__doPostBack('ctl00$WebPartManager$wp2159465$wp1891074826$TabContainerHeader','4'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"\">6 Mon.</span></a></td><td class=\" TabItemLast\"><a title=\"1 Jahr\" onclick=\"__doPostBack('ctl00$WebPartManager$wp2159465$wp1891074826$TabContainerHeader','5'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"\">1 Jahr</span></a></td>\n" + " </tr>\n" + " </table>\n" + " </div><span><div class=\"Gadget GadgetNoMargin\">\n" + " <div class=\"ContentOuter productDetailChartGadget NoBorder\">\n" + " <div class=\"Content NoPadding\">\n" + " <input type=\"hidden\" name=\"ctl00$WebPartManager$wp2159465$wp1891074826$ctl01$ctl00$HiddenFieldUnderlyingChart\" id=\"ctl00_WebPartManager_wp2159465_wp1891074826_ctl01_ctl00_HiddenFieldUnderlyingChart\" /><div class=\"chartdetail\">\n" + " <img class=\"chartdetail\" src=\"http://www.scoach.ch/chart.aspx?is_ISIN=CH0110581516&style=alex_redesign_standard&hash=0074FBC75A9FCF7972DCDD005241260D&timespan=d1&target=ch\" width=\"460\" height=\"280\" /><br /><div style=\"text-align:center;\">\n" + " <a class=\"arrowbig\" href=\"#\" onclick=\"setValueAndPageReload('ctl00_WebPartManager_wp2159465_wp1891074826_ctl01_ctl00_HiddenFieldUnderlyingChart', 'true')\">Vergleich mit Basiswert</a>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div></span>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div><div class=\"half\">\n" + " <div class=\"Gadget GadgetMargin\" id=\"ctl00_WebPartManager_wp1181202414_wp2034737165\">\n" + " <div class=\"Header clearfix \">\n" + " <h2 class=\"float_left\">\n" + " Scoach Handel\n" + " </h2><span class=\"float_right HeaderCorner\"></span>\n" + " </div><div class=\"ContentOuter productDetailRealtimeGadget Border Title\">\n" + " <div class=\"Content NoPadding\">\n" + " <div class=\"Gadget GadgetNoMargin\">\n" + " <div class=\"ContentOuter realtimeGadget NoBorder\">\n" + " <div class=\"Content NoPadding\">\n" + " <table id=\"ProductDetailRealtime\">\n" + " <tbody>\n" + " <tr class=\"productDetailRealtimeHeaderRow\">\n" + " <th class=\"RealtimeTitle\">Scoach Schweiz</th><th class=\"RealtimeBid\">Geld</th><th class=\"RealtimeAsk\">Brief</th><th class=\"RealtimeCurrency\">Währung</th>\n" + " </tr><tr>\n" + " <td><div class=\"realtime_label_price\">\n" + " Kurs <img class=\"clockIcon_Delay\" alt=\"Zeitverzögerter Kurs\" title=\"Zeitverzögerter Kurs\" src=\"/DE/images/global/empty.png\" />\n" + " </div><div class=\"realtime_date\">\n" + " 17:15:00\n" + " </div></td><td class=\"big realtime_bid\"><div class=\"big\">\n" + " 0.34\n" + " </div></td><td class=\"big realtime_ask\"><div class=\"big\">\n" + " 0.36\n" + " </div></td><td class=\"big realtime_currency\">CHF</td>\n" + " </tr><tr>\n" + " <td>Volumen</td><td class=\"realtime_bid\"><div>\n" + " 100'000\n" + " </div></td><td class=\"realtime_ask\"><div>\n" + " 100'000\n" + " </div></td><td class=\"realtime_currency\"></td>\n" + " </tr>\n" + " </tbody>\n" + " </table>\n" + " </div>\n" + " </div>\n" + " </div><div class=\"Gadget GadgetNoMargin\">\n" + " <div class=\"Header clearfix GadgetSubHeader\">\n" + " <h2 class=\"float_left\">\n" + " Festgestellte Kurse\n" + " </h2>\n" + " </div><div class=\"ContentOuter quotationGadget NoBorder Title\">\n" + " <div class=\"Content NoPadding\">\n" + " <table id=\"ProductQuotationTable\">\n" + " <tbody class=\"nofooter\">\n" + " <tr>\n" + " <td class=\"boldcol quotation1\">Letzter Kurs</td><td class=\"quotation2\">-</td><td class=\"quotation3\">-</td><td class=\"quotation4\">Volumen</td><td class=\"quotation5\">-</td>\n" + " </tr><tr>\n" + " <td class=\"boldcol quotation1\">Zeit</td><td class=\"noborder quotation2\">-</td><td class=\"boldcol quotation3\">Datum</td><td class=\"noborder quotationDate\">-</td><td></td>\n" + " </tr>\n" + " </tbody>\n" + " </table>\n" + " </div><div class=\" Footer \">\n" + " <span class=\"float_right\"><a id=\"\" href=\"/DEU/Factsheet/Warrants/CH0110581516/Time_and_Sales\" class=\"MoreLink ActionButton ActionButton_Go\"><span class=\"buttonText\">Mehr</span><span class=\"forceMinSize\"> </span></a></span>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div><div class=\"clear\">\n" + "\n" + " </div><div class=\"Gadget GadgetMargin\" id=\"ctl00_WebPartManager_wp1296363554_wp609332096\">\n" + " <div class=\"Header clearfix \">\n" + " <h2 class=\"float_left\">\n" + " Weitere Produktinformationen\n" + " </h2><span class=\"float_right HeaderCorner\"></span>\n" + " </div><div class=\"ContentOuter Border Title\">\n" + " <div class=\"Content NoPadding\">\n" + " <div class=\"TabContainer\">\n" + " <div id=\"ctl00_WebPartManager_wp1296363554_wp609332096_TabContainerUpdatePanel\">\n" + " <div id=\"ctl00_WebPartManager_wp1296363554_wp609332096_TabContainerHeader\" class=\"TabHeader\">\n" + " <table>\n" + " <tr>\n" + " <td class=\"Active\"><a title=\"Details\" onclick=\"__doPostBack('ctl00$WebPartManager$wp1296363554$wp609332096$TabContainerHeader','0'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"Tab_Active_Arrow\">Details</span></a></td><td class=\"\"><a title=\"Basiswert\" onclick=\"__doPostBack('ctl00$WebPartManager$wp1296363554$wp609332096$TabContainerHeader','1'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"\">Basiswert</span></a></td><td class=\"\"><span class=\"DisabledHeader\">Auszahlungsprofil</span></td><td class=\"\"><span class=\"DisabledHeader\">Risiko & Rating</span></td><td class=\"\"><a title=\"Informationen & Tools\" onclick=\"__doPostBack('ctl00$WebPartManager$wp1296363554$wp609332096$TabContainerHeader','4'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"\">Informationen & Tools</span></a></td><td class=\" TabItemLast\"><a title=\"Ã?hnliche Produkte\" onclick=\"__doPostBack('ctl00$WebPartManager$wp1296363554$wp609332096$TabContainerHeader','5'); return false;\" class=\"ClickableHeader\" href=\"#\"><span class=\"\">Ã?hnliche Produkte</span></a></td>\n" + " </tr>\n" + " </table>\n" + " </div><span><div class=\"Gadget GadgetNoMargin\">\n" + " <div class=\"ContentOuter ProductDetail_Details NoBorder\">\n" + " <div class=\"Content Padding\">\n" + " <div class=\"Gadget GadgetNoMargin ProductDetail_BaseData\">\n" + " <div class=\"ContentOuter NoBorder\">\n" + " <div class=\"Content NoPadding\">\n" + " <h2>\n" + " Stammdaten\n" + " </h2><table>\n" + " <tbody>\n" + " <tr class=\"hi first\">\n" + " <td>Name</td><td>Call-Warrant</td>\n" + " </tr><tr>\n" + " <td>ISIN</td><td>CH0110581516</td>\n" + " </tr><tr class=\"hi\">\n" + " <td>Valor</td><td>11058151</td>\n" + " </tr><tr>\n" + " <td>Symbol</td><td>SOYCU</td>\n" + " </tr><tr class=\"hi\">\n" + " <td>Produkttyp</td><td>Warrants</td>\n" + " </tr><tr>\n" + " <td>Name</td><td>Call</td>\n" + " </tr><tr class=\"hi\">\n" + " <td>Ausübungspreis</td><td>9.40 USD</td>\n" + " </tr><tr>\n" + " <td>Ausübungsstil</td><td>European</td>\n" + " </tr><tr class=\"hi\">\n" + " <td>Währung</td><td>Swiss Franc</td>\n" + " </tr><tr>\n" + " <td>Erster Handelstag</td><td>26.02.2010</td>\n" + " </tr><tr class=\"hi\">\n" + " <td>Fälligkeit</td><td>21.10.2010</td>\n" + " </tr><tr>\n" + " <td>Letzter Handelstag</td><td>21.10.2010</td>\n" + " </tr><tr class=\"hi\">\n" + " <td>Währungssicherheit</td><td>Nein</td>\n" + " </tr><tr>\n" + " <td>Emittent</td><td>Clariden Leu</td>\n" + " </tr>\n" + " </tbody>\n" + " </table>\n" + " </div>\n" + " </div>\n" + " </div><div class=\"Gadget GadgetNoMargin ProductDetail_KeyData\">\n" + " <div class=\"ContentOuter NoBorder\">\n" + " <div class=\"Content NoPadding\">\n" + " <div class=\"InnerContent\">\n" + " <h2>\n" + " Kennzahlen\n" + " </h2><table>\n" + " <tr class=\"hi first\">\n" + " <td>Aufgeld</td><td>-95.39%</td>\n" + "</tr>\n" + " </table>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div><div class=\"Gadget GadgetNoMargin ProductDetail_QuotesQualityMetrics\">\n" + " <div class=\"ContentOuter NoBorder\">\n" + " <div class=\"Content NoPadding\">\n" + " <h2>\n" + " Qualitätsmerkmale Market Making Date: 10.05.2010\n" + " </h2><table>\n" + " <colgroup>\n" + " <col width=\"50%\" /><col width=\"50%\" />\n" + " </colgroup><tbody class=\"nofooter\">\n" + " <tr class=\"hi first\">\n" + " <td class=\"boldcol\">Average Spread</td><td>5.65%</td>\n" + " </tr><tr class=\"\">\n" + " <td class=\"boldcol\">Last Best Bid Price</td><td>0.36 CHF</td>\n" + " </tr><tr class=\"hi\">\n" + " <td class=\"boldcol\">Last Best Ask Price</td><td>0.38 CHF</td>\n" + " </tr><tr class=\"\">\n" + " <td class=\"boldcol\">Last Best Bid Volume</td><td>100'000</td>\n" + " </tr><tr class=\"hi\">\n" + " <td class=\"boldcol\">Last Best Ask Volume</td><td>100'000</td>\n" + " </tr><tr class=\"\">\n" + " <td class=\"boldcol\">Average Buy Volume</td><td>100'000</td>\n" + " </tr><tr class=\"hi\">\n" + " <td class=\"boldcol\">Average Sell Volume</td><td>100'000</td>\n" + " </tr><tr class=\"\">\n" + " <td class=\"boldcol\">Average Buy Value</td><td>34'403 CHF</td>\n" + " </tr><tr class=\"hi\">\n" + " <td class=\"boldcol\">Average Sell Value</td><td>36'403 CHF</td>\n" + " </tr><tr class=\"\">\n" + " <td class=\"boldcol\">Spreads Availablity Ratio</td><td>100.00%</td>\n" + " </tr><tr class=\"hi\">\n" + " <td class=\"boldcol\">Quote Availablity</td><td>100.00%</td>\n" + " </tr>\n" + " </tbody>\n" + " </table>\n" + " </div><div class=\" Footer \">\n" + " <span class=\"float_right\"><a id=\"\" href=\"/DE/Showpage.aspx?pageID=191&is_ISIN=CH0110581516&DerivativeTypeName=Warrants\" class=\"MoreLink ActionButton ActionButton_Go\"><span class=\"buttonText\">mehr</span><span class=\"forceMinSize\"> </span></a></span>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div></span>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + " </div>\n" + "</div>\n" + " </div>\n" + " <iframe id=\"ctl00_Skyscraper\" class=\"Skyscraper\" frameborder=\"0\" scrolling=\"no\" src=\"/DE/Pages/Fragment/SkyscraperBanner.aspx?pageID=66&is_ISIN=CH0110581516&derivativeTypeName=Warrants\"></iframe>\n" + " <div class=\"clear\"></div>\n" + " <div id=\"Footer\">\n" + " <ul>\n" + " <li><a href=\"/DEU/kontakt\">Kontakt</a> | </li><li><a href=\"/DEU/impressum\">Impressum</a> | </li><li><a href=\"/DEU/rechtlichehinweise\">Rechtliche Hinweise</a> | </li><li><a href=\"/DEU/markenrechte\">Markenrechte</a> | </li><li><a href=\"/DE/Showpage.aspx?pageID=63\">Sitemap</a></li>\n" + " </ul>Powered by <a href=\"http://www.smarthouse.de\">Smarthouse Media GmbH</a> | Concept & Design by <a href=\"http://www.stampfwerk.de\">Stampfwerk GmbH</a> & <a href=\"http://www.louphi.de\">louphi - DIE BUNTERMACHER ®</a>\n" + "</div>\n" + " </div>\n" + "\n" + " <div id=\"ctl00_updateProgress\" style=\"display:none;\">\n" + " \n" + " <div id=\"UpdateProgress\">\n" + " <img alt=\"\" src=\"/images/global/ajax-loader.gif\" /> <br />\n" + " <div style=\"font-size: 16px;\">\n" + " Bitte warten...\n" + " </div>\n" + " </div>\n" + " \n" + "</div>\n" + "\n" + " <div id=\"ctl00_scriptPanel\">\n" + " \n" + " <script type=\"text/javascript\">\n" + " clock();\n" + " Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);\n" + " </script>\n" + " \n" + "</div>\n" + "\n" + " <script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\"></script><script type=\"text/javascript\">_uacct = \"UA-1536033-2\";urchinTracker();</script>\n" + "\n" + "\n" + "<script type=\"text/javascript\">\n" + "//<![CDATA[\n" + "var __wpmExportWarning='This Web Part Page has been personalized. As a result, one or more Web Part properties may contain confidential information. Make sure the properties contain information that is safe for others to read. After exporting this Web Part, view properties in the Web Part description file (.WebPart) by using a text editor such as Microsoft Notepad.';var __wpmCloseProviderWarning='You are about to close this Web Part. It is currently providing data to other Web Parts, and these connections will be deleted if this Web Part is closed. To close this Web Part, click OK. To keep this Web Part, click Cancel.';var __wpmDeleteWarning='You are about to permanently delete this Web Part. Are you sure you want to do this? To delete this Web Part, click OK. To keep this Web Part, click Cancel.';$('#ctl00_HeaderHolder_ctl02_HeaderLogin_Control_UserName_ScoachTextBox').Watermark('Benutzer');$('#ctl00_HeaderHolder_ctl02_HeaderLogin_Control_Password_ScoachTextBox').Watermark('â?¢â?¢â?¢â?¢â?¢â?¢â?¢â?¢â?¢');$('#ctl00_HeaderHolder_ctl02_HeaderLogin_Control_RememberLogin').checkbox({cls:'ScoachCheckBox'});$('#ctl00_HeaderHolder_ctl02_HeaderSearchBox_HeaderSearchTextBox_ScoachTextBox').Watermark('Name / Symbol / ISIN');HeaderNavigation.Init();Sys.Application.initialize();\n" + "//]]>\n" + "</script>\n" + "</form>\n" + "\n" + "<!-- 63de7dba1082acc0675c4a577e9e3244/DE/66 -->\n" + "<!-- Meriva -->\n" + "\n" + "</body>\n" + "</html>\n"; } } |
From: <fim...@li...> - 2010-05-14 19:38:02
|
Update of /cvsroot/fimi/HttpClient/src/helpers In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19985/src/helpers Added Files: CLOBHelper.java PLSQLHelper.java StreamHelper.java XMLHelper.java Log Message: [no comments] --- NEW FILE: XMLHelper.java --- package helpers; import oracle.sql.CLOB; import oracle.xml.parser.v2.DOMParser; import oracle.xml.parser.v2.XMLDocument; public class XMLHelper { public static XMLDocument getXML(String xmlString ) throws Exception { DOMParser dp = new DOMParser(); dp.parse(StreamHelper.getInputStream(xmlString)); return dp.getDocument(); } public static XMLDocument getXMLfromHTML(String htmlString ) throws Exception { DOMParser dp = new DOMParser(); String xmlString = StreamHelper.CleanHtml(htmlString); dp.parse(StreamHelper.getInputStream(xmlString)); return dp.getDocument(); } } --- NEW FILE: CLOBHelper.java --- package helpers; import java.io.Reader; import java.sql.DriverManager; import oracle.sql.CLOB; public class CLOBHelper { public static CLOB getClob(String str) throws Exception { CLOB clob = CLOB.createTemporary( DriverManager.getConnection("jdbc:default:connection:"), true, CLOB.DURATION_SESSION); clob.setString(1, str); return clob; } public static String getClobString(CLOB clob) throws Exception { Reader resultReader = clob.getCharacterStream(); String result = ""; int charValue = 0; while ((charValue = resultReader.read()) != -1) { result = result + (char) charValue; } return result; } } --- NEW FILE: PLSQLHelper.java --- package helpers; import java.sql.CallableStatement; import java.sql.DriverManager; import java.sql.Connection; import java.util.HashMap; public class PLSQLHelper { public static void callProcedure(String procedure, HashMap parameter) throws Exception { CallableStatement cstmt = null; String prefix = "{call "; String postfix = ""; for (int i=0;i<parameter.size();i++) { postfix = postfix + "?,"; } if (postfix.endsWith("?,")){ postfix = "(" + postfix.substring(1,postfix.length()-1) + ")}"; } else { postfix = "}"; } Connection conn = DriverManager.getConnection("jdbc:default:connection:"); //"{call set_employee_salary(?, ?)}" cstmt = conn.prepareCall(prefix + procedure + postfix); for (int i=0;i<parameter.size();i++) { cstmt.setObject(i, parameter.get(i)); } cstmt.execute(); cstmt.close(); } } --- NEW FILE: StreamHelper.java --- package helpers; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.StringReader; import java.io.InputStreamReader; import org.w3c.tidy.Tidy; public class StreamHelper { public static InputStream getInputStream(String str){ //return (InputStream) new StringReader(str); return new ByteArrayInputStream(str.getBytes()); } public static InputStream getInputStream(OutputStream os){ return new ByteArrayInputStream(os.toString().getBytes()); } public static String convertStreamToString(InputStream is) { /* * To convert the InputStream to String we use the BufferedReader.readLine() * method. We iterate until the BufferedReader return null which means * there's no more data to read. Each line will appended to a StringBuilder * and returned as String. */ if (is != null) { StringBuilder sb = new StringBuilder(); String line; try { BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); while ((line = reader.readLine()) != null) { sb.append(line).append("\n"); } } catch (IOException e){ return ""; } return sb.toString(); } else { return ""; } } public static String CleanHtml(String xmlIn){ Tidy tidy = new Tidy(); tidy.setHideComments(true); tidy.setMakeClean(true); tidy.setQuiet(true); tidy.setShowErrors(0); tidy.setNumEntities(true); tidy.setXHTML(true); tidy.setXmlOut(true); InputStream is = getInputStream(xmlIn); OutputStream os = new ByteArrayOutputStream(); tidy.parse(is,os); String result = convertStreamToString(getInputStream(os)); result = result.substring(result.indexOf("<html"),result.length()); return result; } } |
From: <fim...@li...> - 2010-05-14 19:38:01
|
Update of /cvsroot/fimi/HttpClient/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19985/database Modified Files: profile1.generate Removed Files: provider_1.sql script1.sql tables.generate tables.sql Log Message: [no comments] Index: profile1.generate =================================================================== RCS file: /cvsroot/fimi/HttpClient/database/profile1.generate,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** profile1.generate 11 May 2010 19:45:02 -0000 1.2 --- profile1.generate 14 May 2010 19:37:53 -0000 1.3 *************** *** 6,10 **** <generateSQLPlus>false</generateSQLPlus> <generateSchemaNames>false</generateSchemaNames> ! <generateScripts>true</generateScripts> <generateSpoolCommands>false</generateSpoolCommands> <generateToDatabase>true</generateToDatabase> --- 6,10 ---- <generateSQLPlus>false</generateSQLPlus> <generateSchemaNames>false</generateSchemaNames> ! <generateScripts>false</generateScripts> <generateSpoolCommands>false</generateSpoolCommands> <generateToDatabase>true</generateToDatabase> *************** *** 36,39 **** --- 36,49 ---- <type>TABLE</type> </Item> + <Item class="oracle.jdeveloper.offlinedb.OfflineDBObjectID"> + <ID>98032f50-0128-1000-802d-c0a800b60a70</ID> + <parent/> + <type>PROCEDURE</type> + </Item> + <Item class="oracle.jdeveloper.offlinedb.OfflineDBObjectID"> + <ID>97e91392-0128-1000-8025-c0a800b60a70</ID> + <parent/> + <type>TABLE</type> + </Item> </objectIDs> <properties/> --- tables.sql DELETED --- --- tables.generate DELETED --- --- provider_1.sql DELETED --- --- script1.sql DELETED --- |
From: <fim...@li...> - 2010-05-14 19:38:01
|
Update of /cvsroot/fimi/HttpClient In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19985 Modified Files: storedProc1.deploy Added Files: fimds_0.1.deploy Log Message: [no comments] --- NEW FILE: fimds_0.1.deploy --- <?xml version = '1.0' encoding = 'UTF-8'?> <simple-archive-deployment nselem="simple-archive-deployment" class="oracle.jdeveloper.deploy.jar.ArchiveProfile" xmlns="http://xmlns.oracle.com/jdeveloper/101303/deploy/jar"> <archiveOptions> <additionalManifests/> <compressed>false</compressed> <hasManifest>true</hasManifest> <mainClass/> </archiveOptions> <fileGroups> <groups> <Item class="oracle.jdeveloper.deploy.common.PackagingFileGroup" internalName="project-output"> <contributors> <Item type="2"/> <Item type="7"/> <Item type="6"/> <Item type="3"/> <Item type="1"> <location path="lib/jtidy-r938.jar" jar-entry=""/> </Item> </contributors> <displayName>Project Output</displayName> <filters> <rules> <Item type="1" pattern="**/CVS/"/> <Item type="1" pattern="**.cdi"/> <Item type="1" pattern="**.contrib"/> <Item type="1" pattern="**.keep"/> <Item type="1" pattern="**.rvi"/> <Item type="1" pattern=".jsps/"/> <Item type="1" pattern=".tags/"/> <Item type="1" pattern=".dtags/"/> <Item type="1" pattern="**/*.jht"/> <Item type="1" pattern="**/*.jjt"/> <Item type="1" pattern="**/*.jxt"/> <Item type="0" pattern="**"/> </rules> </filters> <targetWithinJar/> </Item> </groups> </fileGroups> <jarURL path="../../../../deploys/fimds_0.1.jar"/> <profileDeps/> </simple-archive-deployment> Index: storedProc1.deploy =================================================================== RCS file: /cvsroot/fimi/HttpClient/storedProc1.deploy,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** storedProc1.deploy 11 May 2010 19:45:02 -0000 1.2 --- storedProc1.deploy 14 May 2010 19:37:53 -0000 1.3 *************** *** 7,10 **** --- 7,11 ---- <contributors> <Item type="3"/> + <Item type="6"/> </contributors> <displayName>Project Output</displayName> *************** *** 201,204 **** --- 202,227 ---- </methodSignature> </Item> + <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedFunction"> + <methodSignature> + <javaClassName>Client</javaClassName> + <javaMethodName>cleanhtmlclob</javaMethodName> + <javaParamTypes> + <Item>oracle.sql.CLOB</Item> + </javaParamTypes> + <javaReturnType>oracle.sql.CLOB</javaReturnType> + <plsqlMethodName>cleanhtmlclob</plsqlMethodName> + <plsqlParameters> + <Item> + <nocopy>false</nocopy> + <parameterName>p1</parameterName> + <plsqlDatatype> + <datatype>13</datatype> + </plsqlDatatype> + <plsqlParameterMode>IN</plsqlParameterMode> + </Item> + </plsqlParameters> + <plsqlReturnType>CLOB</plsqlReturnType> + </methodSignature> + </Item> </listOfChildren> <plsqlPackageName>HTTP_CLIENT#J</plsqlPackageName> |
From: <fim...@li...> - 2010-05-14 19:38:01
|
Update of /cvsroot/fimi/HttpClient/src In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19985/src Modified Files: Client.java Log Message: [no comments] Index: Client.java =================================================================== RCS file: /cvsroot/fimi/HttpClient/src/Client.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Client.java 11 May 2010 19:45:02 -0000 1.2 --- Client.java 14 May 2010 19:37:53 -0000 1.3 *************** *** 2,5 **** --- 2,9 ---- import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; + + import helpers.CLOBHelper; + import helpers.StreamHelper; + import java.io.BufferedReader; import java.io.InputStream; *************** *** 25,28 **** --- 29,33 ---- private static Hashtable params = new Hashtable(); private static URLConnection urlConn = null; + private static URL url = null; public static void setProxy(String host, int port){ *************** *** 36,41 **** public static void setURL(String urlStr) throws Exception { ! URL url = new URL(urlStr); ! if (proxy != null) { urlConn = url.openConnection(proxy); --- 41,56 ---- public static void setURL(String urlStr) throws Exception { ! url = new URL(urlStr); ! } ! ! public static void setCookie(String a, String b) { ! cookies.put(a,b); ! } ! ! public static void setURLParameter(String name, String value) { ! params.put(name, value); ! } ! ! public static String parseToString() throws Exception { if (proxy != null) { urlConn = url.openConnection(proxy); *************** *** 49,65 **** } - //urlConn.connect(); httpRequest = new ClientHttpRequest(urlConn); - } - - public static void setCookie(String a, String b) { - cookies.put(a,b); - } - - public static void setURLParameter(String name, String value) { - params.put(name, value); - } - - public static String parseToString() throws Exception { InputStream is = null; --- 64,68 ---- *************** *** 73,87 **** } ! return inputStreamToString(is); } public static CLOB parseToClob() throws Exception { ! CLOB clob = CLOB.createTemporary( ! DriverManager.getConnection("jdbc:default:connection:"), ! true, CLOB.DURATION_SESSION); ! ! clob.setString(1, parseToString()); ! ! return clob; } --- 76,84 ---- } ! return StreamHelper.convertStreamToString(is); } public static CLOB parseToClob() throws Exception { ! return CLOBHelper.getClob(parseToString()); } *************** *** 97,100 **** --- 94,101 ---- } + public static CLOB cleanhtmlclob(CLOB inClob) throws Exception { + return CLOBHelper.getClob(StreamHelper.CleanHtml(CLOBHelper.getClobString(inClob))); + } + public static void clear(){ ClientHttpRequest httpRequest = null; *************** *** 104,125 **** Hashtable params = new Hashtable(); URLConnection urlConn = null; ! } ! ! /** ! * Private: convertis inputstream to string ! * @param in InputStream ! * @throws Exception ! */ ! private static String inputStreamToString(InputStream in) throws Exception { ! BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in)); ! StringBuilder stringBuilder = new StringBuilder(); ! String line = null; ! ! while ((line = bufferedReader.readLine()) != null) { ! stringBuilder.append(line + "\n"); ! } ! ! bufferedReader.close(); ! return stringBuilder.toString(); ! } } --- 105,108 ---- Hashtable params = new Hashtable(); URLConnection urlConn = null; ! } } |
From: <fim...@li...> - 2010-05-14 19:35:52
|
Update of /cvsroot/fimi/HttpClient/src/parser In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19648/parser Log Message: Directory /cvsroot/fimi/HttpClient/src/parser added to the repository |
From: <fim...@li...> - 2010-05-14 19:35:32
|
Update of /cvsroot/fimi/HttpClient/src/helpers In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19577/helpers Log Message: Directory /cvsroot/fimi/HttpClient/src/helpers added to the repository |
From: <fim...@li...> - 2010-05-14 19:34:42
|
Update of /cvsroot/fimi/HttpClient In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19432 Modified Files: HttpClient.jpr Log Message: [no comments] Index: HttpClient.jpr =================================================================== RCS file: /cvsroot/fimi/HttpClient/HttpClient.jpr,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HttpClient.jpr 11 May 2010 16:34:52 -0000 1.1.1.1 --- HttpClient.jpr 14 May 2010 19:34:33 -0000 1.2 *************** *** 1,133 **** ! <?xml version = '1.0' encoding = 'UTF-8'?> ! <jpr:project xmlns:jpr="http://xmlns.oracle.com/ide/project"> ! <hash n="component-versions"> ! <value n="oracle.adf.dt.migration.ProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdt.controller.jsf.addin.JSFProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdt.controller.struts.addin.db.ADFStrutsProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdt.controller.struts.addin.StrutsProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdtinternal.model.portlet.migration.WebCenterProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdtinternal.view.faces.addin.ADFFacesLibraryMigrator" v="10.1.3.5.0"/> ! <value n="oracle.bm.commonIde.ProjectUpgrader" v="10.1.3.5.0"/> ! <value n="oracle.ide.model.Project" v="10.1.3.5.0"/> ! <value n="oracle.ide.model.ResourcePathsMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jbo.dt.jclient.migrator.JCProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jbo.dt.jdevx.ui.appnav.APProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdeveloper.dbmodeler.migration.ProjectMigratorHelper" v="10.1.3.5.0"/> ! <value n="oracle.jdeveloper.ejb.EjbMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdeveloper.offlinedb.migration.OfflineDBProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdevimpl.jsp.JsfLibraryMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdevimpl.jsp.JspMigrator" v="10.1.3.1.0"/> ! <value n="oracle.jdevimpl.runner.RunConfigurationsMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdevimpl.webservices.WebServicesMigratorHelper" v="10.1.3.5.0"/> ! <value n="oracle.tip.tools.ide.pm.addin.PMProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.toplink.addin.migration.TopLinkProjectMigrator" v="10.1.3.1.0"/> ! </hash> ! <list n="contentSets"> ! <string v="oracle.jdeveloper.model.PathsConfiguration/javaContentSet"/> ! <string v="oracle.ide.model.ResourcePaths/resourcesContentSet"/> ! <string v="oracle.jdeveloper.offlinedb.model.OfflineDBProjectSettings/offlineDBContentSet"/> ! <string v="oracle.jdeveloper.model.J2eeSettings/webContentSet"/> ! <string v="oracle.toplink.addin.TopLinkProjectSettings/toplinkContentSet"/> ! <string v="oracle.bm.commonIde.data.project.ModelerProjectSettings/modelersContentSet"/> ! <string v="oracle.tip.tools.ide.pm.addin.PMProjectSettings/Integration_Content"/> ! </list> ! <value n="defaultPackage" v="www.http"/> ! <hash n="oracle.bm.commonIde.data.project.ModelerProjectSettings"> ! <hash n="modelersContentSet"> ! <list n="url-path"> ! <url path="model/"/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.ide.model.ResourcePaths"> ! <hash n="resourcesContentSet"> ! <list n="pattern-filters"> ! <string v="+*"/> ! </list> ! <list n="url-path"> ! <url path="."/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.jdeveloper.compiler.OjcConfiguration"> ! <value n="internalEncoding" v="Cp1252"/> ! </hash> ! <hash n="oracle.jdeveloper.model.J2eeSettings"> ! <value n="j2eeWebAppName" v="HttpClient-HttpClient-webapp"/> ! <value n="j2eeWebContextRoot" v="HttpClient-HttpClient-context-root"/> ! <hash n="webContentSet"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! <list n="url-path"> ! <url path="public_html/"/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.jdeveloper.model.PathsConfiguration"> ! <hash n="javaContentSet"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! <list n="url-path"> ! <url path="src/"/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.jdeveloper.offlinedb.model.OfflineDBProjectSettings"> ! <hash n="offlineDBContentSet"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! <list n="url-path"> ! <url path="database/"/> ! </list> ! </hash> ! <value n="offlineDBSchema" v="FIMDS"/> ! </hash> ! <hash n="oracle.jdeveloper.runner.RunConfigurations"> ! <hash n="runConfigurationDefinitions"> ! <hash n="Default"> ! <value n="custom" v="false"/> ! <value n="name" v="Default"/> ! </hash> ! </hash> ! <list n="runConfigurationList"> ! <string v="Default"/> ! </list> ! </hash> ! <hash n="oracle.jdevimpl.config.JProjectLibraries"> ! <list n="exportedReferences"> ! <hash> ! <value n="id" v="Oracle JDBC"/> ! <value n="isJDK" v="false"/> ! </hash> ! </list> ! <list n="libraryReferences"> ! <hash> ! <value n="id" v="Oracle JDBC"/> ! <value n="isJDK" v="false"/> ! </hash> ! </list> ! </hash> ! <hash n="oracle.jdevimpl.config.JProjectPaths"> ! <url n="outputDirectory" path="classes/"/> ! </hash> ! <hash n="oracle.tip.tools.ide.pm.addin.PMProjectSettings"> ! <hash n="Integration_Content"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.toplink.addin.TopLinkProjectSettings"> ! <hash n="toplinkContentSet"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! <list n="url-path"> ! <url path="toplink/"/> ! </list> ! </hash> ! </hash> ! </jpr:project> --- 1,170 ---- ! <?xml version = '1.0' encoding = 'UTF-8'?> ! <jpr:project xmlns:jpr="http://xmlns.oracle.com/ide/project"> ! <hash n="component-versions"> ! <value n="oracle.adf.dt.migration.ProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdt.controller.jsf.addin.JSFProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdt.controller.struts.addin.db.ADFStrutsProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdt.controller.struts.addin.StrutsProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdtinternal.model.portlet.migration.WebCenterProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.adfdtinternal.view.faces.addin.ADFFacesLibraryMigrator" v="10.1.3.5.0"/> ! <value n="oracle.bm.commonIde.ProjectUpgrader" v="10.1.3.5.0"/> ! <value n="oracle.ide.model.Project" v="10.1.3.5.0"/> ! <value n="oracle.ide.model.ResourcePathsMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jbo.dt.jclient.migrator.JCProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jbo.dt.jdevx.ui.appnav.APProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdeveloper.dbmodeler.migration.ProjectMigratorHelper" v="10.1.3.5.0"/> ! <value n="oracle.jdeveloper.ejb.EjbMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdeveloper.offlinedb.migration.OfflineDBProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdevimpl.jsp.JsfLibraryMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdevimpl.jsp.JspMigrator" v="10.1.3.1.0"/> ! <value n="oracle.jdevimpl.runner.RunConfigurationsMigrator" v="10.1.3.5.0"/> ! <value n="oracle.jdevimpl.webservices.WebServicesMigratorHelper" v="10.1.3.5.0"/> ! <value n="oracle.tip.tools.ide.pm.addin.PMProjectMigrator" v="10.1.3.5.0"/> ! <value n="oracle.toplink.addin.migration.TopLinkProjectMigrator" v="10.1.3.1.0"/> ! </hash> ! <list n="contentSets"> ! <string v="oracle.jdeveloper.model.PathsConfiguration/javaContentSet"/> ! <string v="oracle.ide.model.ResourcePaths/resourcesContentSet"/> ! <string v="oracle.jdeveloper.offlinedb.model.OfflineDBProjectSettings/offlineDBContentSet"/> ! <string v="oracle.jdeveloper.model.J2eeSettings/webContentSet"/> ! <string v="oracle.toplink.addin.TopLinkProjectSettings/toplinkContentSet"/> ! <string v="oracle.bm.commonIde.data.project.ModelerProjectSettings/modelersContentSet"/> ! <string v="oracle.tip.tools.ide.pm.addin.PMProjectSettings/Integration_Content"/> ! </list> ! <value n="defaultPackage" v="www.http"/> ! <hash n="oracle.bm.commonIde.data.project.ModelerProjectSettings"> ! <hash n="modelersContentSet"> ! <list n="url-path"> ! <url path="model/"/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.ide.model.ResourcePaths"> ! <hash n="resourcesContentSet"> ! <list n="pattern-filters"> ! <string v="+*"/> ! </list> ! <list n="url-path"> ! <url path="."/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.jdeveloper.compiler.OjcConfiguration"> ! <value n="internalEncoding" v="Cp1252"/> ! </hash> ! <hash n="oracle.jdeveloper.model.J2eeSettings"> ! <value n="j2eeWebAppName" v="HttpClient-HttpClient-webapp"/> ! <value n="j2eeWebContextRoot" v="HttpClient-HttpClient-context-root"/> ! <hash n="webContentSet"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! <list n="url-path"> ! <url path="public_html/"/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.jdeveloper.model.PathsConfiguration"> ! <hash n="javaContentSet"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! <list n="url-path"> ! <url path="src/"/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.jdeveloper.offlinedb.model.OfflineDBProjectSettings"> ! <hash n="offlineDBContentSet"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! <list n="url-path"> ! <url path="database/"/> ! </list> ! </hash> ! <value n="offlineDBSchema" v="FIMDS"/> ! </hash> ! <hash n="oracle.jdeveloper.runner.RunConfigurations"> ! <hash n="runConfigurationDefinitions"> ! <hash n="Default"> ! <value n="custom" v="false"/> ! <value n="name" v="Default"/> ! </hash> ! </hash> ! <list n="runConfigurationList"> ! <string v="Default"/> ! </list> ! </hash> ! <hash n="oracle.jdevimpl.config.JProjectLibraries"> ! <list n="exportedReferences"> ! <hash> ! <value n="id" v="Oracle JDBC"/> ! <value n="isJDK" v="false"/> ! </hash> ! <hash> ! <value n="id" v="Oracle XML Parser v2"/> ! <value n="isJDK" v="false"/> ! </hash> ! <hash> ! <value n="id" v="Oracle XML SQL Utility"/> ! <value n="isJDK" v="false"/> ! </hash> ! <hash> ! <value n="id" v="Jtidy-r938.jar"/> ! <value n="isJDK" v="false"/> ! </hash> ! </list> ! <hash n="internalDefinitions"> ! <list n="libraryDefinitions"> ! <hash> ! <list n="classPath"> ! <url path="lib/jtidy-r938.jar" jar-entry=""/> ! </list> ! <value n="deployedByDefault" v="true"/> ! <value n="description" v="Jtidy-r938.jar"/> ! <value n="id" v="Jtidy-r938.jar"/> ! <value n="locked" v="true"/> ! </hash> ! </list> ! </hash> ! <list n="libraryReferences"> ! <hash> ! <value n="id" v="Oracle JDBC"/> ! <value n="isJDK" v="false"/> ! </hash> ! <hash> ! <value n="id" v="Oracle XML Parser v2"/> ! <value n="isJDK" v="false"/> ! </hash> ! <hash> ! <value n="id" v="Oracle XML SQL Utility"/> ! <value n="isJDK" v="false"/> ! </hash> ! <hash> ! <value n="id" v="Jtidy-r938.jar"/> ! <value n="isJDK" v="false"/> ! </hash> ! </list> ! </hash> ! <hash n="oracle.jdevimpl.config.JProjectPaths"> ! <url n="outputDirectory" path="classes/"/> ! </hash> ! <hash n="oracle.tip.tools.ide.pm.addin.PMProjectSettings"> ! <hash n="Integration_Content"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! </hash> ! </hash> ! <hash n="oracle.toplink.addin.TopLinkProjectSettings"> ! <hash n="toplinkContentSet"> ! <list n="pattern-filters"> ! <string v="+**"/> ! </list> ! <list n="url-path"> ! <url path="toplink/"/> ! </list> ! </hash> ! </hash> ! </jpr:project> |
From: <fim...@li...> - 2010-05-11 19:45:13
|
Update of /cvsroot/fimi/HttpClient In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20042 Modified Files: storedProc1.deploy Log Message: [no comments] Index: storedProc1.deploy =================================================================== RCS file: /cvsroot/fimi/HttpClient/storedProc1.deploy,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** storedProc1.deploy 11 May 2010 16:34:52 -0000 1.1.1.1 --- storedProc1.deploy 11 May 2010 19:45:02 -0000 1.2 *************** *** 1,214 **** ! <?xml version = '1.0' encoding = 'UTF-8'?> ! <stored-procedure-deployment nselem="stored-procedure-deployment" class="oracle.jdeveloper.deploy.sp.StoredProcProfile" xmlns="http://xmlns.oracle.com/jdeveloper/101303/deploy/stored-proc"> ! <defaultConnection>DBConnection1</defaultConnection> ! <fileGroups> ! <groups> ! <Item class="oracle.jdeveloper.deploy.common.PackagingFileGroup" internalName="project-output"> ! <contributors> ! <Item type="3"/> ! </contributors> ! <displayName>Project Output</displayName> ! <filters> ! <rules> ! <Item type="1" pattern="**/CVS/"/> ! <Item type="1" pattern="**.cdi"/> ! <Item type="1" pattern="**.contrib"/> ! <Item type="1" pattern="**.keep"/> ! <Item type="1" pattern="**.rvi"/> ! <Item type="1" pattern=".jsps/"/> ! <Item type="1" pattern=".tags/"/> ! <Item type="1" pattern=".dtags/"/> ! <Item type="1" pattern="**/*.jht"/> ! <Item type="1" pattern="**/*.jjt"/> ! <Item type="1" pattern="**/*.jxt"/> ! <Item type="0" pattern="**"/> ! </rules> ! </filters> ! <targetWithinJar/> ! </Item> ! </groups> ! </fileGroups> ! <listOfChildren class="java.util.ArrayList"> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackage"> ! <invokerRights>CURRENT_USER</invokerRights> ! <listOfChildren class="java.util.ArrayList"> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedFunction"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>parseToClob</javaMethodName> ! <javaParamTypes class="[Ljava.lang.String;"/> ! <javaReturnType>oracle.sql.CLOB</javaReturnType> ! <plsqlMethodName>parseToClob</plsqlMethodName> ! <plsqlParameters class="[Loracle.jdeveloper.deploy.sp.PlsqlParameter;"/> ! <plsqlReturnType>CLOB</plsqlReturnType> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setCookie</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! <Item>java.lang.String</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setCookie</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p2</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType/> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setProxy</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! <Item>int</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setProxy</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p2</parameterName> ! <plsqlDatatype> ! <datatype>7</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType class="java.lang.String"/> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setProxyAuth</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! <Item>java.lang.String</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setProxyAuth</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p2</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType class="java.lang.String"/> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setURL</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setURL</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType class="java.lang.String"/> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setURLParameter</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! <Item>java.lang.String</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setURLParameter</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p2</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType class="java.lang.String"/> ! </methodSignature> ! </Item> ! </listOfChildren> ! <plsqlPackageName>HTTP_CLIENT#J</plsqlPackageName> ! <replaceExisting>true</replaceExisting> ! <schemaName class="java.lang.String"/> ! </Item> ! </listOfChildren> ! <loadjavaOptions> ! <debugFlag>false</debugFlag> ! <definerFlag>false</definerFlag> ! <encoding/> ! <forceFlag>true</forceFlag> ! <grant/> ! <noverifyFlag>true</noverifyFlag> ! <orderFlag>false</orderFlag> ! <resolveType>0</resolveType> ! <resolverSpec/> ! <schema/> ! <synonymFlag>false</synonymFlag> ! <tableSchema/> ! <tempJarURL/> ! <verboseFlag>true</verboseFlag> ! </loadjavaOptions> ! </stored-procedure-deployment> --- 1,225 ---- ! <?xml version = '1.0' encoding = 'UTF-8'?> ! <stored-procedure-deployment nselem="stored-procedure-deployment" class="oracle.jdeveloper.deploy.sp.StoredProcProfile" xmlns="http://xmlns.oracle.com/jdeveloper/101303/deploy/stored-proc"> ! <defaultConnection>DBConnection1</defaultConnection> ! <fileGroups> ! <groups> ! <Item class="oracle.jdeveloper.deploy.common.PackagingFileGroup" internalName="project-output"> ! <contributors> ! <Item type="3"/> ! </contributors> ! <displayName>Project Output</displayName> ! <filters> ! <rules> ! <Item type="1" pattern="**/CVS/"/> ! <Item type="1" pattern="**.cdi"/> ! <Item type="1" pattern="**.contrib"/> ! <Item type="1" pattern="**.keep"/> ! <Item type="1" pattern="**.rvi"/> ! <Item type="1" pattern=".jsps/"/> ! <Item type="1" pattern=".tags/"/> ! <Item type="1" pattern=".dtags/"/> ! <Item type="1" pattern="**/*.jht"/> ! <Item type="1" pattern="**/*.jjt"/> ! <Item type="1" pattern="**/*.jxt"/> ! <Item type="0" pattern="**"/> ! </rules> ! </filters> ! <targetWithinJar/> ! </Item> ! </groups> ! </fileGroups> ! <listOfChildren class="java.util.ArrayList"> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackage"> ! <invokerRights>CURRENT_USER</invokerRights> ! <listOfChildren class="java.util.ArrayList"> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedFunction"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>parseToClob</javaMethodName> ! <javaParamTypes class="[Ljava.lang.String;"/> ! <javaReturnType>oracle.sql.CLOB</javaReturnType> ! <plsqlMethodName>parseToClob</plsqlMethodName> ! <plsqlParameters class="[Loracle.jdeveloper.deploy.sp.PlsqlParameter;"/> ! <plsqlReturnType>CLOB</plsqlReturnType> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setCookie</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! <Item>java.lang.String</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setCookie</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p2</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType/> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setProxy</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! <Item>int</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setProxy</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p2</parameterName> ! <plsqlDatatype> ! <datatype>7</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType class="java.lang.String"/> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setProxyAuth</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! <Item>java.lang.String</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setProxyAuth</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p2</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType class="java.lang.String"/> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setURL</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setURL</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType class="java.lang.String"/> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>setURLParameter</javaMethodName> ! <javaParamTypes> ! <Item>java.lang.String</Item> ! <Item>java.lang.String</Item> ! </javaParamTypes> ! <javaReturnType/> ! <plsqlMethodName>setURLParameter</plsqlMethodName> ! <plsqlParameters> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p1</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! <Item> ! <nocopy>false</nocopy> ! <parameterName>p2</parameterName> ! <plsqlDatatype> ! <datatype>4</datatype> ! </plsqlDatatype> ! <plsqlParameterMode>IN</plsqlParameterMode> ! </Item> ! </plsqlParameters> ! <plsqlReturnType class="java.lang.String"/> ! </methodSignature> ! </Item> ! <Item class="oracle.jdeveloper.deploy.sp.PlsqlPackagedProcedure"> ! <methodSignature> ! <javaClassName>Client</javaClassName> ! <javaMethodName>clear</javaMethodName> ! <javaParamTypes class="[Ljava.lang.String;"/> ! <javaReturnType/> ! <plsqlMethodName>clear</plsqlMethodName> ! <plsqlParameters class="[Loracle.jdeveloper.deploy.sp.PlsqlParameter;"/> ! <plsqlReturnType class="java.lang.String"/> ! </methodSignature> ! </Item> ! </listOfChildren> ! <plsqlPackageName>HTTP_CLIENT#J</plsqlPackageName> ! <replaceExisting>true</replaceExisting> ! <schemaName class="java.lang.String"/> ! </Item> ! </listOfChildren> ! <loadjavaOptions> ! <debugFlag>false</debugFlag> ! <definerFlag>false</definerFlag> ! <encoding/> ! <forceFlag>true</forceFlag> ! <grant/> ! <noverifyFlag>true</noverifyFlag> ! <orderFlag>false</orderFlag> ! <resolveType>0</resolveType> ! <resolverSpec/> ! <schema/> ! <synonymFlag>false</synonymFlag> ! <tableSchema/> ! <tempJarURL/> ! <verboseFlag>true</verboseFlag> ! </loadjavaOptions> ! </stored-procedure-deployment> |
From: <fim...@li...> - 2010-05-11 19:45:12
|
Update of /cvsroot/fimi/HttpClient/database In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20042/database Modified Files: profile1.generate script1.sql Added Files: provider_1.sql Log Message: [no comments] Index: profile1.generate =================================================================== RCS file: /cvsroot/fimi/HttpClient/database/profile1.generate,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** profile1.generate 11 May 2010 16:34:53 -0000 1.1.1.1 --- profile1.generate 11 May 2010 19:45:02 -0000 1.2 *************** *** 1,23 **** ! <?xml version = '1.0' encoding = 'UTF-8'?> ! <GenerateDescriptor class="oracle.jdeveloper.offlinedb.model.GenerateDescriptor"> ! <SQLFileURL path="script1.sql"/> ! <cascadeDelete>false</cascadeDelete> ! <connectionName>DBConnection1</connectionName> ! <generateSQLPlus>false</generateSQLPlus> ! <generateSchemaNames>false</generateSchemaNames> ! <generateScripts>true</generateScripts> ! <generateSpoolCommands>false</generateSpoolCommands> ! <generateToDatabase>true</generateToDatabase> ! <manualReconcile>false</manualReconcile> ! <objectIDs> ! <Item class="oracle.jdeveloper.offlinedb.OfflineDBObjectID"> ! <ID>83ce44fd-0128-1000-8002-c0a800b60a70</ID> ! <parent/> ! <type>PACKAGE</type> ! </Item> ! </objectIDs> ! <properties/> ! <reconcile>false</reconcile> ! <replace>true</replace> ! <schemaName>FIMDS</schemaName> ! </GenerateDescriptor> --- 1,43 ---- ! <?xml version = '1.0' encoding = 'UTF-8'?> ! <GenerateDescriptor class="oracle.jdeveloper.offlinedb.model.GenerateDescriptor"> ! <SQLFileURL path="script1.sql"/> ! <cascadeDelete>false</cascadeDelete> ! <connectionName>DBConnection1</connectionName> ! <generateSQLPlus>false</generateSQLPlus> ! <generateSchemaNames>false</generateSchemaNames> ! <generateScripts>true</generateScripts> ! <generateSpoolCommands>false</generateSpoolCommands> ! <generateToDatabase>true</generateToDatabase> ! <manualReconcile>false</manualReconcile> ! <objectIDs> ! <Item class="oracle.jdeveloper.offlinedb.OfflineDBObjectID"> ! <ID>83ce44fd-0128-1000-8002-c0a800b60a70</ID> ! <parent/> ! <type>PACKAGE</type> ! </Item> ! <Item class="oracle.jdeveloper.offlinedb.OfflineDBObjectID"> ! <ID>882f80d9-0128-1000-8007-c0a800b60a70</ID> ! <parent/> ! <type>TABLE</type> ! </Item> ! <Item class="oracle.jdeveloper.offlinedb.OfflineDBObjectID"> ! <ID>888f9504-0128-1000-8020-c0a800b60a70</ID> ! <parent/> ! <type>PACKAGE</type> ! </Item> ! <Item class="oracle.jdeveloper.offlinedb.OfflineDBObjectID"> ! <ID>882b3443-0128-1000-8003-c0a800b60a70</ID> ! <parent/> ! <type>TABLE</type> ! </Item> ! <Item class="oracle.jdeveloper.offlinedb.OfflineDBObjectID"> ! <ID>8832bf7d-0128-1000-8017-c0a800b60a70</ID> ! <parent/> ! <type>TABLE</type> ! </Item> ! </objectIDs> ! <properties/> ! <reconcile>false</reconcile> ! <replace>true</replace> ! <schemaName>FIMDS</schemaName> ! </GenerateDescriptor> --- NEW FILE: provider_1.sql --- insert into provider_parser values(1,' declare srcClob CLOB := :i_input ; vBuffer VARCHAR2(255); l_amount BINARY_INTEGER := 255; l_pos PLS_INTEGER := 1; l_clob_len PLS_INTEGER; BEGIN DBMS_OUTPUT.ENABLE(1000000); l_clob_len := dbms_lob.getlength(srcClob); WHILE l_pos < l_clob_len LOOP dbms_lob.read(srcClob, l_amount, l_pos, vBuffer); IF vBuffer IS NOT NULL THEN dbms_output.PUT_line(vBuffer); END IF; l_pos := l_pos + l_amount; END LOOP; :i_output := ''<null>''; END; '); Index: script1.sql =================================================================== RCS file: /cvsroot/fimi/HttpClient/database/script1.sql,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** script1.sql 11 May 2010 16:34:53 -0000 1.1.1.1 --- script1.sql 11 May 2010 19:45:02 -0000 1.2 *************** *** 1,35 **** ! CREATE OR REPLACE PACKAGE HTTP_CLIENT# AS ! function getUrlSimple( ! i_url varchar2 ! ,i_proxyHost varchar2 := null ! ,i_proxyPort number := 3128 ! ,i_proxyUser varchar2 := null ! ,i_proxyPass varchar2 := null ! ) return clob; ! END HTTP_CLIENT#; ! / ! ! CREATE OR REPLACE PACKAGE BODY HTTP_CLIENT# AS ! function getUrlSimple( ! i_url varchar2 ! ,i_proxyHost varchar2 := null ! ,i_proxyPort number := 3128 ! ,i_proxyUser varchar2 := null ! ,i_proxyPass varchar2 := null ! ) return clob ! is ! begin ! if i_proxyHost is not null then ! HTTP_CLIENT#J.setProxy(i_proxyHost, i_proxyPort); ! end if; ! ! if i_proxyUser is not null then ! HTTP_CLIENT#J.setProxyAuth(i_proxyUser, i_proxyPass); ! end if; ! ! HTTP_CLIENT#J.setUrl(i_url); ! return HTTP_CLIENT#J.parseToClob; ! end getUrlSimple; ! END HTTP_CLIENT#; ! / ! --- 1,283 ---- ! ALTER TABLE PROVIDER DROP CONSTRAINT "PROVIDER_PARSER_FK1" ! ; ! ! ALTER TABLE PROVIDER_PROXY DROP CONSTRAINT "PROVIDER_PROXY_PROVIDER_FK1" ! ; ! ! DROP TABLE PROVIDER; ! ! DROP TABLE PROVIDER_PARSER; ! ! DROP TABLE PROVIDER_PROXY; ! ! CREATE OR REPLACE PACKAGE HTTP_CLIENT# AS ! function getUrlSimple( ! i_url varchar2 ! ,i_proxyHost varchar2 := null ! ,i_proxyPort number := 3128 ! ,i_proxyUser varchar2 := null ! ,i_proxyPass varchar2 := null ! ) return clob; ! END HTTP_CLIENT#; ! / ! ! CREATE OR REPLACE PACKAGE PROVIDER# AS ! function http_data( ! i_provider_name varchar2 ! ,i_v1 varchar2 := null ! ,i_v2 varchar2 := null ! ,i_v3 varchar2 := null ! ,i_v4 varchar2 := null ! ,i_v5 varchar2 := null ! ,i_v6 varchar2 := null ! ,i_v7 varchar2 := null ! ,i_v8 varchar2 := null ! ,i_v9 varchar2 := null ! ) return clob; ! ! procedure proceed( ! i_provider_name varchar2 ! ,i_v1 varchar2 := null ! ,i_v2 varchar2 := null ! ,i_v3 varchar2 := null ! ,i_v4 varchar2 := null ! ,i_v5 varchar2 := null ! ,i_v6 varchar2 := null ! ,i_v7 varchar2 := null ! ,i_v8 varchar2 := null ! ,i_v9 varchar2 := null ! ); ! END PROVIDER#; ! / ! ! CREATE OR REPLACE PACKAGE BODY HTTP_CLIENT# AS ! function getUrlSimple( ! i_url varchar2 ! ,i_proxyHost varchar2 := null ! ,i_proxyPort number := 3128 ! ,i_proxyUser varchar2 := null ! ,i_proxyPass varchar2 := null ! ) return clob ! is ! begin ! if i_proxyHost is not null then ! HTTP_CLIENT#J.setProxy(i_proxyHost, i_proxyPort); ! end if; ! ! if i_proxyUser is not null then ! HTTP_CLIENT#J.setProxyAuth(i_proxyUser, i_proxyPass); ! end if; ! ! HTTP_CLIENT#J.setUrl(i_url); ! return HTTP_CLIENT#J.parseToClob; ! end getUrlSimple; ! END HTTP_CLIENT#; ! / ! ! CREATE OR REPLACE PACKAGE BODY PROVIDER# AS ! function http_data( ! i_provider_name varchar2 ! ,i_v1 varchar2 := null ! ,i_v2 varchar2 := null ! ,i_v3 varchar2 := null ! ,i_v4 varchar2 := null ! ,i_v5 varchar2 := null ! ,i_v6 varchar2 := null ! ,i_v7 varchar2 := null ! ,i_v8 varchar2 := null ! ,i_v9 varchar2 := null ! ) return clob ! is ! l_html_data clob; ! l_url varchar2(512); ! begin ! for provider_t in (select * from provider where name = i_provider_name) loop ! HTTP_CLIENT#J.CLEAR; ! ! /* set proxy data */ ! for proxy_t in ! (select * from provider_proxy where provider_id = provider_t.id) ! loop ! HTTP_CLIENT#J.setproxy(proxy_t.host, proxy_t.port); ! if proxy_t.user is not null then ! HTTP_CLIENT#J.setproxyauth(proxy_t.user, proxy_t.pass); ! end if; ! end loop; ! ! /* set url */ ! l_url := provider_t.url; ! l_url := replace(l_url, '{:' || provider_t.p1 || ':}', i_v1); ! l_url := replace(l_url, '{:' || provider_t.p2 || ':}', i_v2); ! l_url := replace(l_url, '{:' || provider_t.p3 || ':}', i_v3); ! l_url := replace(l_url, '{:' || provider_t.p4 || ':}', i_v4); ! l_url := replace(l_url, '{:' || provider_t.p5 || ':}', i_v5); ! l_url := replace(l_url, '{:' || provider_t.p6 || ':}', i_v6); ! l_url := replace(l_url, '{:' || provider_t.p7 || ':}', i_v7); ! l_url := replace(l_url, '{:' || provider_t.p8 || ':}', i_v8); ! l_url := replace(l_url, '{:' || provider_t.p9 || ':}', i_v9); ! ! HTTP_CLIENT#J.seturl(l_url); ! ! /* later set parameters for url here */ ! /* ! for param_t in ! (select * from provider_url_param where provider_id = provider_t.id) ! loop ! declare ! l_param varchar2(255); ! begin ! l_param := param_t.value; ! l_param := replace(l_param, '{:' || provider_t.p1 || ':}', i_v1); ! l_param := replace(l_param, '{:' || provider_t.p2 || ':}', i_v2); ! l_param := replace(l_param, '{:' || provider_t.p3 || ':}', i_v3); ! l_param := replace(l_param, '{:' || provider_t.p4 || ':}', i_v4); ! l_param := replace(l_param, '{:' || provider_t.p5 || ':}', i_v5); ! l_param := replace(l_param, '{:' || provider_t.p6 || ':}', i_v6); ! l_param := replace(l_param, '{:' || provider_t.p7 || ':}', i_v7); ! l_param := replace(l_param, '{:' || provider_t.p8 || ':}', i_v8); ! l_param := replace(l_param, '{:' || provider_t.p9 || ':}', i_v9); ! HTTP_CLIENT#J.seturlparameter(param_t.name, l_param); ! end; ! end loop; ! */ ! ! /* now get the data */ ! l_html_data := HTTP_CLIENT#J.parsetoclob; ! ! /* finalize downloader */ ! HTTP_CLIENT#J.CLEAR; ! end loop; ! ! return l_html_data; ! end http_data; ! ! /* later file_data */ ! /* later other data w_get ... what so ever */ ! ! procedure proceed( ! i_provider_name varchar2 ! ,i_v1 varchar2 := null ! ,i_v2 varchar2 := null ! ,i_v3 varchar2 := null ! ,i_v4 varchar2 := null ! ,i_v5 varchar2 := null ! ,i_v6 varchar2 := null ! ,i_v7 varchar2 := null ! ,i_v8 varchar2 := null ! ,i_v9 varchar2 := null ! ) is ! l_src clob; ! l_parsed clob; ! begin ! l_src := http_data(i_provider_name,i_v1,i_v2,i_v3,i_v4,i_v5,i_v6,i_v7,i_v8,i_v9); ! ! end proceed; ! END PROVIDER#; ! / ! ! CREATE TABLE PROVIDER ! ( ! ID NUMBER NOT NULL, ! PARSER_ID NUMBER NOT NULL, ! NAME VARCHAR2(100) NOT NULL, ! URL VARCHAR2(512) NOT NULL, ! P1 VARCHAR2(255), ! P2 VARCHAR2(255), ! P3 VARCHAR2(255), ! P4 VARCHAR2(255), ! P5 VARCHAR2(255), ! P6 VARCHAR2(255), ! P7 VARCHAR2(255), ! P8 VARCHAR2(255), ! P9 VARCHAR2(255) ! ) ! ; ! ! CREATE TABLE PROVIDER_PARSER ! ( ! ID NUMBER NOT NULL, ! CMD CLOB NOT NULL ! ) ! ; ! ! CREATE TABLE PROVIDER_PROXY ! ( ! ID NUMBER NOT NULL, ! PROVIDER_ID NUMBER NOT NULL, ! HOST VARCHAR2(255) NOT NULL, ! PORT NUMBER DEFAULT 3128 NOT NULL, ! "USER" VARCHAR2(255), ! PASS VARCHAR2(255) ! ) ! ; ! ! ALTER TABLE PROVIDER ! ADD CONSTRAINT PROVIDER_PK PRIMARY KEY ! ( ! ID ! ) ! ENABLE ! ; ! ! ALTER TABLE PROVIDER ! ADD CONSTRAINT PROVIDER_UK1 UNIQUE ! ( ! PARSER_ID, ! URL ! ) ! ENABLE ! ; ! ! ALTER TABLE PROVIDER ! ADD CONSTRAINT PROVIDER_UK2 UNIQUE ! ( ! NAME ! ) ! ENABLE ! ; ! ! ALTER TABLE PROVIDER_PARSER ! ADD CONSTRAINT PARSER_PK PRIMARY KEY ! ( ! ID ! ) ! ENABLE ! ; ! ! ALTER TABLE PROVIDER_PROXY ! ADD CONSTRAINT PROVIDER_PROXY_PK PRIMARY KEY ! ( ! ID ! ) ! ENABLE ! ; ! ! ALTER TABLE PROVIDER ! ADD CONSTRAINT PROVIDER_PARSER_FK1 FOREIGN KEY ! ( ! ID ! ) ! REFERENCES PROVIDER_PARSER ! ( ! ID ! ) ENABLE ! ; ! ! ALTER TABLE PROVIDER_PROXY ! ADD CONSTRAINT PROVIDER_PROXY_PROVIDER_FK1 FOREIGN KEY ! ( ! ID ! ) ! REFERENCES PROVIDER ! ( ! ID ! ) ! ON DELETE CASCADE ENABLE ! ; ! ! COMMENT ON COLUMN PROVIDER.P1 IS 'find replace parameter 1' ! ; ! ! COMMENT ON COLUMN PROVIDER_PARSER.CMD IS 'Parser pl/ql statement' ! ; ! |
From: <fim...@li...> - 2010-05-11 19:45:12
|
Update of /cvsroot/fimi/HttpClient/src In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20042/src Modified Files: Client.java Log Message: [no comments] Index: Client.java =================================================================== RCS file: /cvsroot/fimi/HttpClient/src/Client.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Client.java 11 May 2010 16:34:54 -0000 1.1.1.1 --- Client.java 11 May 2010 19:45:02 -0000 1.2 *************** *** 1,116 **** ! //package www.http; ! ! import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; ! import java.io.BufferedReader; ! import java.io.InputStream; ! import java.io.InputStreamReader; ! import java.net.InetSocketAddress; ! import java.net.Proxy; ! import java.net.URL; ! import java.net.URLConnection; ! ! import java.sql.DriverManager; ! ! import java.util.Hashtable; ! import oracle.sql.CLOB; ! ! import www.http.ClientHttpRequest; ! ! // For deployment consult http://tinyurl.com/2ukqupb ! public class Client { ! private static ClientHttpRequest httpRequest; ! private static String encodedUserPass = null; ! private static Proxy proxy = null; ! private static Hashtable cookies = new Hashtable(); ! private static Hashtable params = new Hashtable(); ! private static URLConnection urlConn = null; ! ! public static void setProxy(String host, int port){ ! proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(host,port)); ! } ! ! public static void setProxyAuth(String user, String pass){ ! encodedUserPass = new String ! (Base64.encode(String.format("{0}:{1}", user, pass).getBytes())); ! } ! ! public static void setURL(String urlStr) throws Exception { ! URL url = new URL(urlStr); ! ! if (proxy != null) { ! urlConn = url.openConnection(proxy); ! } else { ! urlConn = url.openConnection(); ! } ! ! if (encodedUserPass != null) { ! urlConn.setRequestProperty("Proxy-Authorization", ! "Basic " + encodedUserPass); ! } ! ! //urlConn.connect(); ! httpRequest = new ClientHttpRequest(urlConn); ! } ! ! public static void setCookie(String a, String b) { ! cookies.put(a,b); ! } ! ! public static void setURLParameter(String name, String value) { ! params.put(name, value); ! } ! ! public static String parseToString() throws Exception { ! InputStream is = null; ! ! httpRequest.setCookies(cookies); ! httpRequest.setParameters(params); ! ! if (params.size() <= 0) { ! is = urlConn.getInputStream(); ! } else { ! is = httpRequest.post(); ! } ! ! return inputStreamToString(is); ! } ! ! public static CLOB parseToClob() throws Exception { ! CLOB clob = CLOB.createTemporary( ! DriverManager.getConnection("jdbc:default:connection:"), ! true, CLOB.DURATION_SESSION); ! ! clob.setString(1, parseToString()); ! ! return clob; ! } ! ! public static void main(String[] args) throws Exception { ! //setURL("http://scoach.ch/DEU/Factsheet/Bonus_Certificates/CH0048855313"); ! //setURL("http://www.google.com/search?hl=de&source=hp&q=hallo&aq=f&aqi=g10&aql=&oq=&gs_rfai="); ! //setURL("http://www.codingforums.com/showthread.php?t=152016"); ! setURL("http://www.codingforums.com/showthread.php?"); ! ! setURLParameter("t", "152016"); ! ! System.out.println(parseToString()); ! } ! ! /** ! * Private: convertis inputstream to string ! * @param in InputStream ! * @throws Exception ! */ ! private static String inputStreamToString(InputStream in) throws Exception { ! BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in)); ! StringBuilder stringBuilder = new StringBuilder(); ! String line = null; ! ! while ((line = bufferedReader.readLine()) != null) { ! stringBuilder.append(line + "\n"); ! } ! ! bufferedReader.close(); ! return stringBuilder.toString(); ! } ! } --- 1,125 ---- ! //package www.http; ! ! import com.sun.org.apache.xerces.internal.impl.dv.util.Base64; ! import java.io.BufferedReader; ! import java.io.InputStream; ! import java.io.InputStreamReader; ! import java.net.InetSocketAddress; ! import java.net.Proxy; ! import java.net.URL; ! import java.net.URLConnection; ! ! import java.sql.DriverManager; ! ! import java.util.Hashtable; ! import oracle.sql.CLOB; ! ! import www.http.ClientHttpRequest; ! ! // For deployment consult http://tinyurl.com/2ukqupb ! public class Client { ! private static ClientHttpRequest httpRequest = null; ! private static String encodedUserPass = null; ! private static Proxy proxy = null; ! private static Hashtable cookies = new Hashtable(); ! private static Hashtable params = new Hashtable(); ! private static URLConnection urlConn = null; ! ! public static void setProxy(String host, int port){ ! proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(host,port)); ! } ! ! public static void setProxyAuth(String user, String pass){ ! encodedUserPass = new String ! (Base64.encode(String.format("{0}:{1}", user, pass).getBytes())); ! } ! ! public static void setURL(String urlStr) throws Exception { ! URL url = new URL(urlStr); ! ! if (proxy != null) { ! urlConn = url.openConnection(proxy); ! } else { ! urlConn = url.openConnection(); ! } ! ! if (encodedUserPass != null) { ! urlConn.setRequestProperty("Proxy-Authorization", ! "Basic " + encodedUserPass); ! } ! ! //urlConn.connect(); ! httpRequest = new ClientHttpRequest(urlConn); ! } ! ! public static void setCookie(String a, String b) { ! cookies.put(a,b); ! } ! ! public static void setURLParameter(String name, String value) { ! params.put(name, value); ! } ! ! public static String parseToString() throws Exception { ! InputStream is = null; ! ! httpRequest.setCookies(cookies); ! httpRequest.setParameters(params); ! ! if (params.size() <= 0) { ! is = urlConn.getInputStream(); ! } else { ! is = httpRequest.post(); ! } ! ! return inputStreamToString(is); ! } ! ! public static CLOB parseToClob() throws Exception { ! CLOB clob = CLOB.createTemporary( ! DriverManager.getConnection("jdbc:default:connection:"), ! true, CLOB.DURATION_SESSION); ! ! clob.setString(1, parseToString()); ! ! return clob; ! } ! ! public static void main(String[] args) throws Exception { ! //setURL("http://scoach.ch/DEU/Factsheet/Bonus_Certificates/CH0048855313"); ! //setURL("http://www.google.com/search?hl=de&source=hp&q=hallo&aq=f&aqi=g10&aql=&oq=&gs_rfai="); ! //setURL("http://www.codingforums.com/showthread.php?t=152016"); ! setURL("http://www.codingforums.com/showthread.php?"); ! ! setURLParameter("t", "152016"); ! ! System.out.println(parseToString()); ! } ! ! public static void clear(){ ! ClientHttpRequest httpRequest = null; ! String encodedUserPass = null; ! Proxy proxy = null; ! Hashtable cookies = new Hashtable(); ! Hashtable params = new Hashtable(); ! URLConnection urlConn = null; ! } ! ! /** ! * Private: convertis inputstream to string ! * @param in InputStream ! * @throws Exception ! */ ! private static String inputStreamToString(InputStream in) throws Exception { ! BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in)); ! StringBuilder stringBuilder = new StringBuilder(); ! String line = null; ! ! while ((line = bufferedReader.readLine()) != null) { ! stringBuilder.append(line + "\n"); ! } ! ! bufferedReader.close(); ! return stringBuilder.toString(); ! } ! } |
From: <fim...@li...> - 2008-08-31 18:09:22
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/META-INF In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15184/src/META-INF Modified Files: persistence.xml Log Message: no message Index: persistence.xml =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/META-INF/persistence.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** persistence.xml 30 Aug 2008 11:43:16 -0000 1.5 --- persistence.xml 31 Aug 2008 18:09:25 -0000 1.6 *************** *** 16,19 **** --- 16,21 ---- <class>fimi.objects.dtmobjects.Quotejoin</class> <class>fimi.objects.Underlying</class> + <class>fimi.objects.Underlyingweight</class> + <class>fimi.objects.dtmobjects.Import</class> <properties> <property name="toplink.jdbc.user" value="fimi"/> *************** *** 22,26 **** <property name="toplink.jdbc.driver" value="org.postgresql.Driver"/> <property name="toplink.logging.level" value="FINE"/> - <property name="toplink.ddl-generation" value="create-tables"/> </properties> </persistence-unit> --- 24,27 ---- *************** *** 40,43 **** --- 41,46 ---- <class>fimi.objects.dtmobjects.Declare</class> <class>fimi.objects.dtmobjects.Quotejoin</class> + <class>fimi.objects.Underlyingweight</class> + <class>fimi.objects.dtmobjects.Import</class> <properties> <property name="toplink.jdbc.user" value="fimi"/> |
From: <fim...@li...> - 2008-08-31 18:09:19
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/objects In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15184/src/fimi/objects Modified Files: Underlying.java Datamart.java Added Files: Underlyingweight.java Log Message: no message Index: Underlying.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/objects/Underlying.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Underlying.java 30 Aug 2008 11:43:14 -0000 1.3 --- Underlying.java 31 Aug 2008 18:09:25 -0000 1.4 *************** *** 6,10 **** --- 6,12 ---- package fimi.objects; + import fimi.Globals; import java.io.Serializable; + import java.util.Collection; import java.util.Date; import javax.persistence.Column; *************** *** 13,16 **** --- 15,19 ---- import javax.persistence.GenerationType; import javax.persistence.Id; + import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Table; *************** *** 18,21 **** --- 21,27 ---- import javax.persistence.TemporalType; import javax.persistence.UniqueConstraint; + import oracle.toplink.essentials.expressions.Expression; + import oracle.toplink.essentials.expressions.ExpressionBuilder; + import oracle.toplink.essentials.queryframework.ReportQuery; /** *************** *** 46,49 **** --- 52,58 ---- private Date validfrom = null; + @OneToMany(mappedBy = "underlying") + private Collection<Underlyingweight> underlyingcollection; + public Underlying(){ try { *************** *** 150,154 **** --- 159,191 ---- } } + + public Collection<Underlyingweight> getUnderlyingcollection() { + return underlyingcollection; + } + + public void setUnderlyingcollection(Collection<Underlyingweight> underlyingcollection) { + this.underlyingcollection = underlyingcollection; + } + public Double underlyingWeight(Date refdate){ + ExpressionBuilder builder = new ExpressionBuilder(); + + ReportQuery rq = new ReportQuery(Underlyingweight.class, new ExpressionBuilder()); + rq.addMaximum("refdate", builder.get("refdate")); + rq.setSelectionCriteria(builder.get("underlying").equal(this)); + rq.setSelectionCriteria(builder.get("tradetime").lessThanEqual(refdate)); + rq.returnSingleValue(); + + Date date = (Date) Globals.getSession().executeQuery(rq); + + Expression exp = builder.get("refdate").equal(date); + exp = exp.and(builder.get("underlying").equal(this)); + + Underlyingweight u = + (Underlyingweight) Globals.getSession().readObject(Underlyingweight.class, exp); + + return u.getWeight(); + } + @Override public int hashCode() { --- NEW FILE: Underlyingweight.java --- /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package fimi.objects; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author cikic */ @Entity public class Underlyingweight implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name = "id", nullable = false) @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @JoinColumn(name = "underlying", referencedColumnName = "id") @ManyToOne private Underlying underlying; @Temporal(TemporalType.TIMESTAMP) private Date refdate; private double weight; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Date getRefdate() { return refdate; } public void setRefdate(Date refdate) { this.refdate = refdate; } public Underlying getUnderlying() { return underlying; } public void setUnderlying(Underlying underlying) { this.underlying = underlying; } public double getWeight() { return weight; } public void setWeight(double weight) { this.weight = weight; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Underlyingweight)) { return false; } Underlyingweight other = (Underlyingweight) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "fimi.objects.Underlyingweight[id=" + id + "]"; } } Index: Datamart.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/objects/Datamart.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Datamart.java 26 Aug 2008 17:32:34 -0000 1.3 --- Datamart.java 31 Aug 2008 18:09:25 -0000 1.4 *************** *** 7,10 **** --- 7,11 ---- import fimi.objects.dtmobjects.Declare; + import fimi.objects.dtmobjects.Import; import fimi.objects.dtmobjects.Quotejoin; import java.io.Serializable; *************** *** 59,62 **** --- 60,66 ---- private Collection<Declare> declaresCollecton; + @OneToMany(mappedBy = "datamart") + private Collection<Import> imports; + private String caption; *************** *** 64,68 **** private String script; - public Datamart(){} --- 68,71 ---- *************** *** 167,170 **** --- 170,181 ---- this.startDate = startDate; } + + public Collection<Import> getImports() { + return imports; + } + + public void setImports(Collection<Import> imports) { + this.imports = imports; + } @Override *************** *** 192,195 **** return "fimi.objects.Datamart[id=" + id + "]"; } - } --- 203,205 ---- |
From: <fim...@li...> - 2008-08-31 18:09:19
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/objects/dtmobjects In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15184/src/fimi/objects/dtmobjects Added Files: Import.java Log Message: no message --- NEW FILE: Import.java --- /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package fimi.objects.dtmobjects; import fimi.objects.Datamart; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import javax.persistence.UniqueConstraint; /** * * @author cikic */ @Entity @Table(name = "imports", uniqueConstraints=@UniqueConstraint(columnNames={"datamart", "jarlibrary"})) public class Import implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(name = "id", nullable = false) @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @JoinColumn(name = "datamart", referencedColumnName = "id") @ManyToOne private Datamart datamart; private String jarlibrary; private String classpath; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getClasspath() { return classpath; } public void setClasspath(String classpath) { this.classpath = classpath; } public Datamart getDatamart() { return datamart; } public void setDatamart(Datamart datamart) { this.datamart = datamart; } public String getJarlibrary() { return jarlibrary; } public void setJarlibrary(String jarlibrary) { this.jarlibrary = jarlibrary; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Import)) { return false; } Import other = (Import) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "fimi.objects.dtmobjects.Import[id=" + id + "]"; } } |
From: <fim...@li...> - 2008-08-31 18:09:19
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15184/src/fimi Modified Files: Main.java Globals.java Log Message: no message Index: Main.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/Main.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Main.java 25 Jul 2008 08:14:36 -0000 1.1.1.1 --- Main.java 31 Aug 2008 18:09:25 -0000 1.2 *************** *** 41,49 **** private static Session session; private static EntityManager em; - private static String interpreterImports = - "import fimi.*;" + - "import fimi.objects.*;" + - "import org.w3c.dom.*;" + - "import org.w3c.dom.html2.*;"; public static void main(String[] args) { --- 41,44 ---- *************** *** 77,81 **** try { interpreterSets(i); ! i.eval(interpreterImports); i.set( "portnum", Integer.valueOf(cmd.getOptionValue("s")).intValue() ); i.eval("setAccessibility(true)"); // turn off access restrictions --- 72,76 ---- try { interpreterSets(i); ! i.eval(Globals.interpreterImports); i.set( "portnum", Integer.valueOf(cmd.getOptionValue("s")).intValue() ); i.eval("setAccessibility(true)"); // turn off access restrictions *************** *** 89,93 **** try { interpreterSets(i); ! i.eval(interpreterImports); i.eval("source(" + cmd.getOptionValue("f") + ");"); } catch(Exception e) { --- 84,88 ---- try { interpreterSets(i); ! i.eval(Globals.interpreterImports); i.eval("source(" + cmd.getOptionValue("f") + ");"); } catch(Exception e) { *************** *** 118,122 **** try { interpreterSets(i); ! i.eval(interpreterImports); i.run(); } catch(Exception e) { --- 113,117 ---- try { interpreterSets(i); ! i.eval(Globals.interpreterImports); i.run(); } catch(Exception e) { Index: Globals.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/Globals.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Globals.java 30 Aug 2008 11:43:16 -0000 1.2 --- Globals.java 31 Aug 2008 18:09:25 -0000 1.3 *************** *** 16,20 **** public static String serialEncode = "LATIN9"; //Use for Object Serialisation public static int twoDigitYearRollAt = 32; ! private static EntityManager em; protected static void connect(String toplinkConf) { --- 16,29 ---- public static String serialEncode = "LATIN9"; //Use for Object Serialisation public static int twoDigitYearRollAt = 32; ! ! public static String interpreterImports = ! "import fimi.*;" + ! "import fimi.objects.*;" + ! "import fimi.objects.dtmobjects.*;" + ! "import fimi.datamart.*;" + ! "import fimi.datamart.types.*;" + ! "import org.w3c.dom.*;" + ! "import org.w3c.dom.html2.*;"; ! private static EntityManager em; protected static void connect(String toplinkConf) { |
From: <fim...@li...> - 2008-08-31 18:09:19
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15184/src/fimi/datamart Modified Files: Dtm.java Log Message: no message Index: Dtm.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart/Dtm.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Dtm.java 30 Aug 2008 11:43:16 -0000 1.11 --- Dtm.java 31 Aug 2008 18:09:25 -0000 1.12 *************** *** 6,10 **** --- 6,12 ---- package fimi.datamart; + import bsh.EvalError; import bsh.Interpreter; + import fimi.Globals; import fimi.Log; import fimi.objects.Datamart; *************** *** 12,15 **** --- 14,18 ---- import fimi.objects.Quote; import fimi.objects.dtmobjects.Declare; + import fimi.objects.dtmobjects.Import; import fimi.objects.dtmobjects.Quotejoin; import java.util.HashMap; *************** *** 39,44 **** Quote[] quotes = selectData(); Log.print(level.FINE, "fimi.datamert.Dtm.calc", quotes.length + " Quotes found"); // ***************************************************************** ! //initialise variables // ***************************************************************** if (dtm.getDeclares() != null) { --- 42,82 ---- Quote[] quotes = selectData(); Log.print(level.FINE, "fimi.datamert.Dtm.calc", quotes.length + " Quotes found"); + // ***************************************************************** ! // Import Libraries ! // ***************************************************************** ! ! // Fimi imports ! try { ! bsh.eval(Globals.interpreterImports); ! } catch (EvalError e) { ! e.printStackTrace(); ! System.err.println("Fimi imports failed:\n" + Globals.interpreterImports); ! } ! ! // User specific imports ! if (dtm.getImports() != null) { ! for (Import lib : dtm.getImports()){ ! String cmd = ""; ! ! if (lib.getClasspath() != null) { ! cmd += "addClassPath( \"" + lib.getClasspath() + "\" );"; ! } ! ! if (lib.getJarlibrary() != null) { ! cmd += "import " + lib.getJarlibrary() + ";"; ! } ! ! try { ! bsh.eval(cmd); ! } catch (EvalError e) { ! e.printStackTrace(); ! System.err.println("Import/Classpath failed:\n" + cmd); ! } ! } ! } ! ! // ***************************************************************** ! // initialise variables // ***************************************************************** if (dtm.getDeclares() != null) { *************** *** 50,54 **** Log.print(level.FINE, "fimi.datamart.Dtm.calc set variables", cmd); bsh.eval(cmd); ! } catch (Exception e) { e.printStackTrace(); System.err.println(cmd + "\n failed !"); --- 88,92 ---- Log.print(level.FINE, "fimi.datamart.Dtm.calc set variables", cmd); bsh.eval(cmd); ! } catch (EvalError e) { e.printStackTrace(); System.err.println(cmd + "\n failed !"); *************** *** 60,64 **** } ! //Iterate trough quotes for (int i=0;i<quotes.length;i++) { //Set Quote Object --- 98,104 ---- } ! // ***************************************************************** ! // Iterate trough quotes ! // ***************************************************************** for (int i=0;i<quotes.length;i++) { //Set Quote Object *************** *** 114,118 **** } } ! } //End of next quote // ***************************************************************** --- 154,162 ---- } } ! } ! ! // ***************************************************************** ! // End of next quote ! // ***************************************************************** // ***************************************************************** *************** *** 152,156 **** ReadAllQuery query = new ReadAllQuery(Quote.class, exp); - //query.addDescendingOrdering("tradetime"); query.addAscendingOrdering("tradetime"); --- 196,199 ---- |
From: <fim...@li...> - 2008-08-30 11:43:39
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/objects In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8666/src/fimi/objects Modified Files: Underlying.java Symbol.java Stype.java Log Message: no message Index: Symbol.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/objects/Symbol.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Symbol.java 3 Aug 2008 08:27:38 -0000 1.4 --- Symbol.java 30 Aug 2008 11:43:14 -0000 1.5 *************** *** 26,30 **** @Table(name = "symbol", uniqueConstraints=@UniqueConstraint(columnNames={"caption", "stype"})) ! @NamedQueries({@NamedQuery(name = "Symbol.findById", query = "SELECT s FROM Symbol s WHERE s.id = :id"), @NamedQuery(name = "Symbol.findByCaption", query = "SELECT s FROM Symbol s WHERE s.caption like :caption ")}) public class Symbol implements Serializable { private static final long serialVersionUID = 1L; --- 26,35 ---- @Table(name = "symbol", uniqueConstraints=@UniqueConstraint(columnNames={"caption", "stype"})) ! @NamedQueries({@NamedQuery(name = "Symbol.findById" ! , query = "SELECT s FROM Symbol s WHERE s.id = :id") ! , @NamedQuery(name = "Symbol.findByCaption" ! , query = "SELECT s FROM Symbol s WHERE s.caption = :caption ") ! }) ! public class Symbol implements Serializable { private static final long serialVersionUID = 1L; Index: Underlying.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/objects/Underlying.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Underlying.java 28 Aug 2008 19:48:17 -0000 1.2 --- Underlying.java 30 Aug 2008 11:43:14 -0000 1.3 *************** *** 13,17 **** import javax.persistence.GenerationType; import javax.persistence.Id; - import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Table; --- 13,16 ---- *************** *** 42,52 **** @Temporal(TemporalType.TIMESTAMP) ! private Date validtrough = new Date(); public Underlying(){ try { ! this.validtrough = fimi.Util.parseDate("2800-12-31", "YYYY-MM-DD"); } catch (Exception e) { ! this.validtrough = new Date(); } } --- 41,56 ---- @Temporal(TemporalType.TIMESTAMP) ! private Date validthrough = new Date(); ! ! @Temporal(TemporalType.TIMESTAMP) ! private Date validfrom = null; public Underlying(){ try { ! this.validthrough = fimi.Util.parseDate("2800-12-31", "YYYY-MM-DD"); ! this.validfrom = fimi.Util.parseDate("1932-01-01", "YYYY-MM-DD"); } catch (Exception e) { ! this.validthrough = new Date(); ! this.validfrom = null; } } *************** *** 56,62 **** this.underlying = underlying; try { ! this.validtrough = fimi.Util.parseDate("2800-12-31", "YYYY-MM-DD"); } catch (Exception e) { ! this.validtrough = new Date(); } } --- 60,95 ---- this.underlying = underlying; try { ! this.validthrough = fimi.Util.parseDate("2800-12-31", "YYYY-MM-DD"); ! this.validfrom = fimi.Util.parseDate("1932-01-01", "YYYY-MM-DD"); } catch (Exception e) { ! this.validthrough = new Date(); ! this.validfrom = null; ! } ! } ! ! public Underlying(Fi superior, Fi underlying, ! String validthrough, String dateFormat){ ! this.superior = superior; ! this.underlying = underlying; ! this.validfrom = null; ! ! try { ! this.validthrough = fimi.Util.parseDate(validthrough, dateFormat); ! } catch (Exception e) { ! this.validthrough = new Date(); ! } ! } ! ! public Underlying(Fi superior, Fi underlying, ! String validfrom, String validthrough, String dateFormat){ ! this.superior = superior; ! this.underlying = underlying; ! ! try { ! this.validthrough = fimi.Util.parseDate(validthrough, dateFormat); ! this.validfrom = fimi.Util.parseDate(validfrom, dateFormat); ! } catch (Exception e) { ! this.validthrough = new Date(); ! this.validfrom = null; } } *************** *** 86,95 **** } ! public Date getValidtrough() { ! return validtrough; } ! public void setValidtrough(Date validtrough) { ! this.validtrough = validtrough; } --- 119,152 ---- } ! public Date getValidthrough() { ! return validthrough; } ! public void setValidthrough(Date validthrough) { ! this.validthrough = validthrough; ! } ! ! public void setValidthrough(String validthrough, String dateFormat) { ! try { ! this.validthrough = fimi.Util.parseDate(validthrough, dateFormat); ! } catch (Exception e) { ! this.validthrough = new Date(); ! } ! } ! ! public Date getValidfrom() { ! return validfrom; ! } ! ! public void setValidfrom(Date validfrom) { ! this.validfrom = validfrom; ! } ! ! public void setValidfrom(String validfrom, String dateFormat) { ! try { ! this.validfrom = fimi.Util.parseDate(validfrom, dateFormat); ! } catch (Exception e) { ! this.validfrom = null; ! } } Index: Stype.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/objects/Stype.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Stype.java 24 Aug 2008 16:54:02 -0000 1.5 --- Stype.java 30 Aug 2008 11:43:15 -0000 1.6 *************** *** 29,33 **** query = "SELECT s FROM Stype s WHERE s.id = :id"), @NamedQuery(name = "Stype.findAllProvider", ! query = "SELECT s FROM Stype s WHERE s.provider = :provider"), @NamedQuery(name = "Stype.findByCaption", query = "SELECT s FROM Stype s WHERE s.caption = :caption"), --- 29,33 ---- query = "SELECT s FROM Stype s WHERE s.id = :id"), @NamedQuery(name = "Stype.findAllProvider", ! query = "SELECT s FROM Stype s WHERE s.provider = true"), @NamedQuery(name = "Stype.findByCaption", query = "SELECT s FROM Stype s WHERE s.caption = :caption"), |
From: <fim...@li...> - 2008-08-30 11:43:10
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8666/src/fimi Modified Files: Globals.java Util.java Trx.java Lookup.java Log Message: no message Index: Trx.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/Trx.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Trx.java 26 Aug 2008 17:32:34 -0000 1.4 --- Trx.java 30 Aug 2008 11:43:17 -0000 1.5 *************** *** 10,13 **** --- 10,14 ---- import oracle.toplink.essentials.exceptions.DatabaseException; import oracle.toplink.essentials.exceptions.TopLinkException; + import oracle.toplink.essentials.exceptions.TransactionException; import oracle.toplink.essentials.expressions.*; import oracle.toplink.essentials.logging.SessionLog; *************** *** 35,61 **** try { Globals.getEm().getTransaction().commit(); ! } catch (RollbackException e) { ! // if duplicate key do update ! boolean duplicateKey = false; ! ! Throwable e1 = e.getCause(); ! while (e1 != null) { ! if (e1.getClass().equals(DatabaseException.class)) { ! DatabaseException dbe = (DatabaseException) e1; ! } ! if (e1.getClass().equals(org.postgresql.util.PSQLException.class)){ ! PSQLException psqle = (PSQLException) e1; ! //System.out.println("==>>>>>>>>>>>>>>>>>== " + psqle.getErrorCode()); ! //System.out.println("==>>>>>>>>>>>>>>>>>== " + psqle.getMessage()); ! if (e1.getMessage().contains("unique")){ ! duplicateKey = true; ! } ! } ! ! //System.out.println("=============== " + e1.getClass()); ! e1 = e1.getCause(); ! } ! ! if (duplicateKey) { Log.print(level.INFO, "fimi.Trx.merge", "-------- > Duplicate Key " + obj.getClass().getName()); --- 36,41 ---- try { Globals.getEm().getTransaction().commit(); ! } catch (RollbackException e) { ! if (isDuplicateKey(e)) { Log.print(level.INFO, "fimi.Trx.merge", "-------- > Duplicate Key " + obj.getClass().getName()); *************** *** 125,131 **** public static void persist(Object obj){ ! begin(); ! Globals.getEm().persist(obj); ! commit(); //TODO: Make some Exception handling here } --- 105,120 ---- public static void persist(Object obj){ ! try { ! begin(); ! Globals.getEm().persist(obj); ! commit(); ! } catch (RollbackException e) { ! if (isDuplicateKey(e)){ ! Log.print(level.WARNING, "fimi.Trx.perist", "--------> " + ! "Nothing happened Object with this Keys exists allready"); ! } ! } catch (TransactionException te) { ! te.printStackTrace(); ! } } *************** *** 135,137 **** --- 124,150 ---- Trx.commit(); //TODO: Make some Exception handling here } + + private static boolean isDuplicateKey(RollbackException e) { + // if duplicate key do update + boolean duplicateKey = false; + + Throwable e1 = e.getCause(); + while (e1 != null) { + if (e1.getClass().equals(DatabaseException.class)) { + DatabaseException dbe = (DatabaseException) e1; + } + if (e1.getClass().equals(org.postgresql.util.PSQLException.class)){ + PSQLException psqle = (PSQLException) e1; + //System.out.println("==>>>>>>>>>>>>>>>>>== " + psqle.getErrorCode()); + //System.out.println("==>>>>>>>>>>>>>>>>>== " + psqle.getMessage()); + if (e1.getMessage().contains("unique")){ + duplicateKey = true; + } + } + + e1 = e1.getCause(); + } + + return duplicateKey; + } } Index: Util.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/Util.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Util.java 23 Aug 2008 19:59:09 -0000 1.7 --- Util.java 30 Aug 2008 11:43:16 -0000 1.8 *************** *** 22,32 **** import java.lang.reflect.Method; import fimi.objects.*; ! import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; - import java.util.jar.JarEntry; - import java.util.jar.JarFile; import oracle.toplink.essentials.logging.SessionLog; --- 22,32 ---- import java.lang.reflect.Method; import fimi.objects.*; ! import java.lang.String; ! import java.lang.String; ! import java.util.HashMap; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import oracle.toplink.essentials.logging.SessionLog; *************** *** 404,406 **** --- 404,456 ---- } } + + public static Date parseIMM(String imm){ + HashMap<String,String> month = new HashMap<String,String>(); + String strDate; + + month.put("F", "01"); month.put("A", "01"); + month.put("G", "02"); month.put("B", "02"); + month.put("H", "03"); month.put("C", "03"); + month.put("J", "04"); month.put("D", "04"); + month.put("K", "05"); month.put("E", "05"); + month.put("M", "06"); month.put("I", "06"); + month.put("N", "07"); month.put("L", "07"); + month.put("Q", "08"); month.put("O", "08"); + month.put("U", "09"); month.put("P", "09"); + month.put("V", "10"); month.put("R", "10"); + month.put("X", "11"); month.put("S", "11"); + month.put("Z", "12"); month.put("T", "12"); + + Integer intYear = Integer.valueOf(imm.substring(2, imm.length())); + if (intYear >= Globals.twoDigitYearRollAt) { + intYear += 1900; + } else { + intYear += 2000; + } + + String strYear = intYear.toString(); + String strMonth = month.get(imm.substring(1, 2).toUpperCase()) + "-"; + String strDay = "01"; + strDate = strYear + "-" + strMonth + "-" + strDay; + + Calendar cal = Calendar.getInstance(); + + try { + cal.setTime(parseDate(strDate, "YYYY-MM-DD")); + } catch (Exception e) { + e.printStackTrace(); + System.err.println("Cannot parse " + strDate); + } + + // Go to first friday + while ( cal.get(Calendar.DAY_OF_WEEK) != Calendar.FRIDAY ) { + cal.add(Calendar.DATE, 1); + } + + // Go 3rd Firday + cal.add(Calendar.DATE, 21); + + // Return IMM Date + return cal.getTime(); + } } Index: Lookup.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/Lookup.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Lookup.java 24 Aug 2008 16:54:03 -0000 1.3 --- Lookup.java 30 Aug 2008 11:43:17 -0000 1.4 *************** *** 11,15 **** --- 11,17 ---- import fimi.objects.Quote; import fimi.objects.Stype; + import fimi.objects.Symbol; import java.lang.reflect.*; + import java.util.Calendar; import java.util.Date; import java.util.List; *************** *** 30,34 **** //TODO: Make parameter, value as arrays ! public Object findSingle(String queryname, String parameter, String value){ //System.out.println("hallo"); Query qry = Globals.getEm().createNamedQuery(queryname); --- 32,36 ---- //TODO: Make parameter, value as arrays ! public Object findSingle(String queryname, String parameter, Object value){ //System.out.println("hallo"); Query qry = Globals.getEm().createNamedQuery(queryname); *************** *** 44,47 **** --- 46,65 ---- } + public Object findSingle(String queryname, String[] parameters, Object[] values){ + //System.out.println("hallo"); + Query qry = Globals.getEm().createNamedQuery(queryname); + + for (int i=0;i<parameters.length;i++) { + qry.setParameter(parameters[i], values[i]); + } + + try { + return qry.getSingleResult(); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + //TODO: Make parameter, value as arrays public Object[] findArray(String queryname, String parameter, String value){ *************** *** 81,85 **** exp = exp.and(builder.get("tradetime").equal(lastQuoteDate(fi, market, qtimeframe))); ! Quote result = (Quote) Globals.getSession().readObject(Quote.class, exp); return result; } --- 99,103 ---- exp = exp.and(builder.get("tradetime").equal(lastQuoteDate(fi, market, qtimeframe))); ! Quote result = (Quote) this.readObject(Quote.class, exp); return result; } *************** *** 99,102 **** --- 117,144 ---- } + public Fi getFiBySymbol(String symbol){ + return getFiBySymbol(symbol, null); + } + + public Fi getFiBySymbol(String symbol, String provider){ + ExpressionBuilder builder = new ExpressionBuilder(); + Expression exp = builder.get("caption").equal(symbol); + + if (provider != null) { + Stype st = getStype(provider); + exp = exp.and(builder.get("stype").equal(st)); + } + + Symbol realSymbol = (Symbol) this.readObject(Symbol.class, exp); + + return realSymbol.getFi(); + } + + public Stype getStype(String caption){ + Stype result = new Stype(); + result = (Stype) findSingle("Stype.findByCaption", "caption", caption); + return result; + } + public Stype getProvider(String caption){ Stype result = new Stype(); *************** *** 113,117 **** --- 155,182 ---- } + public Date nextValueDay(Date inDay){ + boolean valueDay = true; + Calendar result = Calendar.getInstance(); + result.setTime(inDay); + result.add(Calendar.DATE, 1); + + int dow = result.get(Calendar.DAY_OF_WEEK); + if(dow == Calendar.SUNDAY || dow == Calendar.SATURDAY) { + valueDay = false; + } else if (2==1){ + //TODO: lookup if day is an offday -> new entity bean + } + + // Get recursive next day until its a valid day + if (valueDay == false){ + result.setTime(nextValueDay(result.getTime())); + } + + return result.getTime(); + } + + /* ************************************************************************/ /* --- P R I V A T E S --- */ + /* ************************************************************************/ private Object[] byBean(Object obj, boolean single) throws Exception { ExpressionBuilder builder = new ExpressionBuilder(); *************** *** 149,151 **** --- 214,228 ---- return result; } + + private Object readObject(Class c, Expression exp){ + Object result = null; + + try { + result = Globals.getSession().readObject(c, exp); + } catch (Exception e) { + e.printStackTrace(); + } + + return result; + } } Index: Globals.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/Globals.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Globals.java 25 Jul 2008 08:14:36 -0000 1.1.1.1 --- Globals.java 30 Aug 2008 11:43:16 -0000 1.2 *************** *** 15,18 **** --- 15,19 ---- //public static String serialEncode = "ISO-8859-5"; //Use for Object Serialisation public static String serialEncode = "LATIN9"; //Use for Object Serialisation + public static int twoDigitYearRollAt = 32; private static EntityManager em; |
From: <fim...@li...> - 2008-08-30 11:43:09
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/META-INF In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8666/src/META-INF Modified Files: persistence.xml Log Message: no message Index: persistence.xml =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/META-INF/persistence.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** persistence.xml 28 Aug 2008 19:48:17 -0000 1.4 --- persistence.xml 30 Aug 2008 11:43:16 -0000 1.5 *************** *** 22,25 **** --- 22,26 ---- <property name="toplink.jdbc.driver" value="org.postgresql.Driver"/> <property name="toplink.logging.level" value="FINE"/> + <property name="toplink.ddl-generation" value="create-tables"/> </properties> </persistence-unit> |
From: <fim...@li...> - 2008-08-30 11:43:08
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8666/src/fimi/datamart Modified Files: Dtm.java Log Message: no message Index: Dtm.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart/Dtm.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Dtm.java 29 Aug 2008 14:40:43 -0000 1.10 --- Dtm.java 30 Aug 2008 11:43:16 -0000 1.11 *************** *** 39,44 **** Quote[] quotes = selectData(); Log.print(level.FINE, "fimi.datamert.Dtm.calc", quotes.length + " Quotes found"); ! //initialise variables if (dtm.getDeclares() != null) { for (Declare declare : dtm.getDeclares() ){ --- 39,45 ---- Quote[] quotes = selectData(); Log.print(level.FINE, "fimi.datamert.Dtm.calc", quotes.length + " Quotes found"); ! // ***************************************************************** //initialise variables + // ***************************************************************** if (dtm.getDeclares() != null) { for (Declare declare : dtm.getDeclares() ){ *************** *** 85,89 **** } ! //Execute Script String[] scriptLines = dtm.getScript().split("\n"); for (String line : scriptLines) { --- 86,92 ---- } ! // ***************************************************************** ! // Execute Script ! // ***************************************************************** String[] scriptLines = dtm.getScript().split("\n"); for (String line : scriptLines) { *************** *** 113,117 **** --- 116,122 ---- } //End of next quote + // ***************************************************************** // Getting the Result + // ***************************************************************** result = new HashMap<String,Object[]>(); |
From: <fim...@li...> - 2008-08-30 08:12:19
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart/types In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv19164/src/fimi/datamart/types Modified Files: FTalib.java Log Message: no message Index: FTalib.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart/types/FTalib.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FTalib.java 29 Aug 2008 14:40:44 -0000 1.2 --- FTalib.java 30 Aug 2008 08:12:27 -0000 1.3 *************** *** 16,20 **** private FDouble[] var = new FDouble[10];; private int length; ! public FTalib(int length){ for (int i=0;i<this.var.length;i++){ --- 16,23 ---- private FDouble[] var = new FDouble[10];; private int length; ! private Core core = new Core(); ! private MInteger outBegIdx = new MInteger(); ! private MInteger outNbElements = new MInteger(); ! public FTalib(int length){ for (int i=0;i<this.var.length;i++){ *************** *** 73,79 **** } - Core core = new Core(); - MInteger outBegIdx = new MInteger(); - MInteger outNbElements = new MInteger(); double[] output = new double[baise.getLength()]; --- 76,79 ---- *************** *** 82,151 **** outBegIdx, outNbElements, output); //Output ! ! if (outNbElements.value > 0 ) { ! return output[outNbElements.value -1]; //[0]; //[outBegIdx.value]; ! } ! ! return 0; ! } ! } ! ! /* ! ! private static double[] getDbl(Double[] in){ ! double[] result = new double[in.length]; ! for (int i=0;i<in.length;i++){ ! result[i] = (double) in[i]; ! } ! ! return result; } ! public static double[] sma_test(Variable in, int days){ ! ! Core core = new Core(); ! MInteger outBegIdx = new MInteger(); ! MInteger outNbElements = new MInteger(); ! double[] output = new double[in.getLength()]; ! ! core.sma(in.pos(), in.pos() + (days -1), //Range ! in.getArr(), days, //Input ! outBegIdx, outNbElements, output); //Output ! ! System.out.println("Begin i: " + outBegIdx.value); ! System.out.println("Nr : " + outNbElements.value); ! ! if (outNbElements.value > 1 ) { ! // zuviele ! System.out.println("zuviel"); ! return output; ! } else { ! System.out.println("passt" + outBegIdx.value); ! return output; //[0]; //[outBegIdx.value]; ! } ! } ! * ! * ! public double sma(Variable in, int days){ ! if (in.pos() + days > in.getLength()){ return 0; } ! Core core = new Core(); ! MInteger outBegIdx = new MInteger(); ! MInteger outNbElements = new MInteger(); ! double[] output = new double[in.getLength()]; ! ! core.sma(in.pos(), in.pos() + (days -1), //Range ! in.getArr(), days, //Input ! outBegIdx, outNbElements, output); //Output ! ! if (outNbElements.value > 0 ) { ! return output[outNbElements.value -1]; //[0]; //[outBegIdx.value]; } - - return 0; } ! * ! */ \ No newline at end of file --- 82,115 ---- outBegIdx, outNbElements, output); //Output ! return getResult(output); } + + public double stddev(double in, int days, int dev){ + FDouble baise = var[0]; + baise.set(in); ! if (baise.pos() + days > baise.getLength()){ return 0; } ! double[] output = new double[baise.getLength()]; ! //core.stdDev(length, length, arg2, length, length, arg5, arg6, arg7) ! core.stdDev(baise.pos(), baise.pos() + (days -1), //Range ! baise.getArr(), days, dev, //Input ! outBegIdx, outNbElements, output); //Output ! ! return getResult(output); ! } ! ! /* ************************************************************************ ! * P R I V A T E S * ! * ***********************************************************************/ ! ! private double getResult(double[] result) { if (outNbElements.value > 0 ) { ! return result[outNbElements.value -1]; //[0]; //[outBegIdx.value]; ! } else { ! return 0; } } ! } \ No newline at end of file |
From: <fim...@li...> - 2008-08-30 08:12:19
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv19164/src/fimi/test Modified Files: QuickStart.java Log Message: no message Index: QuickStart.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/test/QuickStart.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** QuickStart.java 29 Aug 2008 14:40:44 -0000 1.7 --- QuickStart.java 30 Aug 2008 08:12:27 -0000 1.8 *************** *** 354,359 **** Declare movet = new Declare (uniPairDtm, "movet", FDouble.class, true); ! ! Declare ratio = new Declare (uniPairDtm, "theratio", FDouble.class, true); /* since we need 2 symbols for unipairs we define a leftouter join */ --- 354,360 ---- Declare movet = new Declare (uniPairDtm, "movet", FDouble.class, true); ! Declare ta_stddev = new Declare (uniPairDtm, "ta_stddev", FTalib.class, false); ! Declare sshort = new Declare (uniPairDtm, "sshort", FDouble.class, true); ! Declare slong = new Declare (uniPairDtm, "slong", FDouble.class, true); /* since we need 2 symbols for unipairs we define a leftouter join */ *************** *** 376,381 **** script += "double ratio_delta20_20 = ratio_delta20 - ratio_substract_gd20.get();\n"; script += "//Finally calculate stdev of ratio_delta20_20 with 2 stdevs\n"; ! script += "//TODO \n"; ! script += "theratio.set(ratio_gd20.get()); \n"; uniPairDtm.setScript(script); --- 377,383 ---- script += "double ratio_delta20_20 = ratio_delta20 - ratio_substract_gd20.get();\n"; script += "//Finally calculate stdev of ratio_delta20_20 with 2 stdevs\n"; ! script += "double stddev = ta_stddev.stddev(ratio_delta20_20,20,2); \n"; ! script += "sshort.set( ratio_substract_gd20.get() + stddev); \n"; ! script += "slong.set( ratio_substract_gd20.get() - stddev); \n"; uniPairDtm.setScript(script); *************** *** 385,389 **** Trx.merge(new Object[] {date, closet, closeb, ratio_gd20, ta_ratio_gd20, ratio_substract_gd20, ! ta_ratio_substract_gd20, movet, ratio} ); Trx.merge(join); } --- 387,392 ---- Trx.merge(new Object[] {date, closet, closeb, ratio_gd20, ta_ratio_gd20, ratio_substract_gd20, ! ta_ratio_substract_gd20, movet, sshort, ! slong, ta_stddev} ); Trx.merge(join); } |
From: <fim...@li...> - 2008-08-29 14:40:35
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/test In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv7088/src/fimi/test Modified Files: QuickStart.java Log Message: no message Index: QuickStart.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/test/QuickStart.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** QuickStart.java 28 Aug 2008 19:48:17 -0000 1.6 --- QuickStart.java 29 Aug 2008 14:40:44 -0000 1.7 *************** *** 317,320 **** --- 317,321 ---- System.out.print(fimi.Util.concatStr(dtm.getResultAsCsv())); + dtm.saveResultAsCsv("D:/simple_dtm.txt", true); } *************** *** 346,350 **** Declare closeb = new Declare (uniPairDtm, "closeb", FDouble.class, true); ! Declare ratio_gd20 = new Declare (uniPairDtm, "ratio_gd20", FDouble.class, false); Declare ta_ratio_gd20 = new Declare (uniPairDtm, "ta_ratio_gd20", FTalib.class, false); --- 347,351 ---- Declare closeb = new Declare (uniPairDtm, "closeb", FDouble.class, true); ! Declare ratio_gd20 = new Declare (uniPairDtm, "ratio_gd20", FDouble.class, true); Declare ta_ratio_gd20 = new Declare (uniPairDtm, "ta_ratio_gd20", FTalib.class, false); *************** *** 353,357 **** Declare movet = new Declare (uniPairDtm, "movet", FDouble.class, true); ! /* since we need 2 symbols for unipairs we define a leftouter join */ Quotejoin join = new Quotejoin("trigger"); --- 354,360 ---- Declare movet = new Declare (uniPairDtm, "movet", FDouble.class, true); ! ! Declare ratio = new Declare (uniPairDtm, "theratio", FDouble.class, true); ! /* since we need 2 symbols for unipairs we define a leftouter join */ Quotejoin join = new Quotejoin("trigger"); *************** *** 361,365 **** join.setDatamart(uniPairDtm); ! /* And define the Script as learnd ein Part 3 */ String script = "date.set(quote.getTradetime());\n"; --- 364,368 ---- join.setDatamart(uniPairDtm); ! /* And define the Script as learnd in Part 3 */ String script = "date.set(quote.getTradetime());\n"; *************** *** 374,377 **** --- 377,381 ---- script += "//Finally calculate stdev of ratio_delta20_20 with 2 stdevs\n"; script += "//TODO \n"; + script += "theratio.set(ratio_gd20.get()); \n"; uniPairDtm.setScript(script); *************** *** 381,385 **** Trx.merge(new Object[] {date, closet, closeb, ratio_gd20, ta_ratio_gd20, ratio_substract_gd20, ! ta_ratio_substract_gd20, movet} ); Trx.merge(join); } --- 385,389 ---- Trx.merge(new Object[] {date, closet, closeb, ratio_gd20, ta_ratio_gd20, ratio_substract_gd20, ! ta_ratio_substract_gd20, movet, ratio} ); Trx.merge(join); } *************** *** 394,397 **** --- 398,402 ---- } + /* Dtm dtm = new Dtm(simpleDtm); System.out.println(dtm.getDatamart().getCaption()); *************** *** 399,404 **** dtm.calc(); System.out.print(fimi.Util.concatStr(dtm.getResultAsCsv())); ! //String[] test = (new Dtm(simpleDtm)).getResultAsCsv(); } } --- 404,411 ---- dtm.calc(); System.out.print(fimi.Util.concatStr(dtm.getResultAsCsv())); + */ ! (new Dtm(simpleDtm)).saveResultAsCsv("D:/result.txt", true); ! System.out.print("file saved"); } } |
From: <fim...@li...> - 2008-08-29 14:40:35
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart/types In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv7088/src/fimi/datamart/types Modified Files: FTalib.java Log Message: no message Index: FTalib.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart/types/FTalib.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FTalib.java 26 Aug 2008 17:32:36 -0000 1.1 --- FTalib.java 29 Aug 2008 14:40:44 -0000 1.2 *************** *** 70,74 **** if (baise.pos() + days > baise.getLength()){ - baise.next(); return 0; } --- 70,73 ---- *************** *** 85,89 **** if (outNbElements.value > 0 ) { - baise.next(); return output[outNbElements.value -1]; //[0]; //[outBegIdx.value]; } --- 84,87 ---- |
From: <fim...@li...> - 2008-08-29 14:40:35
|
Update of /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv7088/src/fimi/datamart Modified Files: Dtm.java Log Message: no message Index: Dtm.java =================================================================== RCS file: /cvsroot/fimi/volatile_new/V001/fimi/src/fimi/datamart/Dtm.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Dtm.java 28 Aug 2008 19:48:17 -0000 1.9 --- Dtm.java 29 Aug 2008 14:40:43 -0000 1.10 *************** *** 147,151 **** ReadAllQuery query = new ReadAllQuery(Quote.class, exp); ! query.addDescendingOrdering("tradetime"); Vector quotesVector = (Vector) fimi.Globals.getSession().executeQuery(query); --- 147,152 ---- ReadAllQuery query = new ReadAllQuery(Quote.class, exp); ! //query.addDescendingOrdering("tradetime"); ! query.addAscendingOrdering("tradetime"); Vector quotesVector = (Vector) fimi.Globals.getSession().executeQuery(query); |