You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(64) |
Apr
(38) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: todd r. <to...@us...> - 2005-03-31 20:54:26
|
Update of /cvsroot/pocolap/pocolap/web/mcsDemo/tools/com/pocolap/hsqldb/datetime In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9992/web/mcsDemo/tools/com/pocolap/hsqldb/datetime Removed Files: DateAgent.java Log Message: Reorganization of resources --- DateAgent.java DELETED --- |
|
From: todd r. <to...@us...> - 2005-03-31 20:54:21
|
Update of /cvsroot/pocolap/pocolap/data/scripts_tools/outdated/oldtools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9992/data/scripts_tools/outdated/oldtools Added Files: setupNSS_hsqldb.sql README.txt build.xml pocohsqldb.jar hsqldbConverter.pl Log Message: Reorganization of resources --- NEW FILE: pocohsqldb.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: build.xml --- <project name="HSQLDB Date functions" basedir="." default="run"> <property name="jarname" value="pocohsqldb.jar" /> <property name="buildDir" value="build" /> <target name="run" > <antcall target="cleanAll" /> <antcall target="compile" /> <antcall target="jar" /> <antcall target="cleanAll" /> </target> <target name="buildDir"> <mkdir dir="${buildDir}" /> </target> <target name="cleanAll"> <delete dir="${buildDir}" /> </target> <target name="compile" depends="buildDir"> <javac srcdir="./com/pocolap/hsqldb/datetime" destdir="${buildDir}" classpath="com.pocolap.hsqldb.datetime" /> </target> <target name="jar"> <jar destfile="${jarname}" basedir ="${buildDir}" includes="com/**" /> </target> </project> --- NEW FILE: README.txt --- This is the README.txt file for pocolap tools used to convert data for use with the MyCgiServer live demo site. The "tools" directory includes: hsqldbConverter.pl - a Perl script that converts the setupNSS.sql script from MySQL syntax for use with HSQLDB v1.6.1. pocohsqldb.jar - jar file HSQLDB must have access to in order to run the converted setupNSS.sql script created by scripter.pl. Make sure that this jar file is in your CLASSPATH before attempting to run the HSQLDB script created by scripter.pl build.xml - ant build file used to build pocohsqldb.jar The following file is included, but not guaranteed up-to-date with each release: setupNSS_hsqldb.sql - the converted setupNSS.sql script created with hsqldbConverter.pl The following files are created and in use on the MCS site, but not included in any distribution, mostly because they may contain some security information. nss.backup, nss.data, nss.properties, nss.script - HSQLDB data files created by running the setupNSS_hsqldb.sql script in HSQLDB. --- NEW FILE: hsqldbConverter.pl --- #! /usr/bin/perl ############################# # This script is used to convert setupNSS.sql # from MySQL syntax to HSQLDB v1.6.1. # It was originally written for v1.7.1 and later # discovered that it needed to run in v1.6.1. As # a result, this script makes a lot of modifications # to the SQL statements, including changing "not null" # fields to "null", removing all DEFAULT values and # converting all tables to upper case. # # This script is intended to make my life easier, and not meant # for production use. If you want to extend this # to create scripts for other RDBMS's, # please feel free! (Just share it with the # rest of us, if you would). # # In order for the resulting script to run, you # will need to ensure that com.pocolap.hsqldb.datetime # package is on your CLASSPATH, otherwise # HSQLDB won't be able to run this script ############################# $num = $#ARGV; if ($num<0){ print "USAGE: scripter.pl <outputFileName>"; exit; } @tables = ("CALENDAR","CUSTOMERS","SALABLEITEMS","SALES"); open(SCRIPTFILE, "<", "../../../userdocs/setupNSS.sql") || die "Couldn't open script file"; open(OUTFILE, ">", $ARGV[0]) || die "Couldn't open file for writing"; #Put instructions in script print OUTFILE "-- You must have com.pocolap.hsqldb.datetime.DateAgent\n-- in your CLASSPATH before running this script\n"; #Special Aliases print OUTFILE "create alias DATE_ADD for \"com.pocolap.hsqldb.datetime.DateAgent.dateAdd\"\n"; print OUTFILE "create alias DATE_FORMAT for \"com.pocolap.hsqldb.datetime.DateAgent.dateFormat\"\n"; while(defined ($str=<SCRIPTFILE>)){ if ($str =~ m/^create database/i || $str =~ m/^use nss\;$/i || $str =~ m/^drop/i){ print OUTFILE "-- skipped declarartion"; }elsif ($str =~ /^grant/i){ $user = substr($str,0,index($str, "@")); @items = split(/ /,$user); $user = $items[$#items]; @items = split(/ /,$str); $pass = $items[$#items]; $pass =~ s/\'//g; #This will still have the ; on it! print OUTFILE "create user $user password $pass\n"; foreach my $tab (@tables){ print OUTFILE "grant select on \"$tab\" to $user\;\n"; } }else{ #Replace quote identifiers $str =~ s/\`/\"/g; #Remove Unknown keywords $str =~ s/ unsigned//i; #Remove unsupported keywords $str =~ s/default '.*' not //i; #Replace different keywords $str =~ s/auto_increment/identity/i; #Odd syntax differences if ($str =~ m/ if exists/i){ $str =~ s/ if exists//i ; $str =~ s/\;$/ if exists\;/; } if ($str =~ m/INTERVAL \d DAY/i){ $str =~ s/INTERVAL //i; $str =~ s/ DAY//i; } #convert case of everything $str =~ s/\"(\w+)\"/\"\U$1\"/g; #here's what makes perl and RE's so cool and crappy! print OUTFILE $str; } } print 'Done'; close(SCRIPTFILE); close(OUTFILE); --- NEW FILE: setupNSS_hsqldb.sql --- -- You must have com.pocolap.hsqldb.datetime.DateAgent -- in your CLASSPATH before running this script create alias DATE_ADD for "com.pocolap.hsqldb.datetime.DateAgent.dateAdd" create alias DATE_FORMAT for "com.pocolap.hsqldb.datetime.DateAgent.dateFormat" -- skipped declarartion -- skipped declarartion -- skipped declarartion-- skipped declarartion-- skipped declarartion-- skipped declarartion create table "CUSTOMERS"( "CUSTOMERID" int identity primary key , "CUSTOMERNUMBER" int, "FIRSTNAME" varchar(50) null, "LASTNAME" varchar(50) null , "ADDRESS" varchar(100) null, "CITY" varchar(60) null, "STATENAME" varchar(50) null, "STATEABBREV" char(2) null, "ZIP" varchar (15) null, "PHONE" varchar(25) null, "BIRTHDATE" date null, "SIZINGGENDER" varchar(20) null , "SHOESIZE" float null, "WIDESIZES" bit null ); create table "SALABLEITEMS"( "SALABLEITEMSID" int identity primary key , "SKU" int null, "DESCRIPTION" varchar(50) null, "ISPRODUCT" bit null, "ISSIZEDEPENDANT" bit null, "COLOR" varchar(30) null, "VENDOR" varchar(80) null, "VENDORNUMBER" int null); create table "CALENDAR"( "CALENDARID" int identity primary key, "DAYDATE" date null, "DAYNAME" varchar(12) null, "DAYABBREV" char(3) null, "DAYOFWEEK" int null, "DAYOFMONTH" int null, "MONTHNAME" varchar(12) null, "MONTHABBREV" char(3) null, "MONTHOFYEAR" int null, "YEAR" int null, "ISHOLIDAY" bit null, "WASOPENED" bit null); create table "SALES"( "CUSTOMERID" int null, "SALABLEITEMSID" int null, "CALENDARID" int null, "AMOUNT" float null, "WEBSALE" bit null); create user nssUser password nssPass; grant select on "CALENDAR" to nssUser; grant select on "CUSTOMERS" to nssUser; grant select on "SALABLEITEMS" to nssUser; grant select on "SALES" to nssUser; insert into "CUSTOMERS" ("CUSTOMERNUMBER","FIRSTNAME","LASTNAME","ADDRESS","CITY", "STATENAME","STATEABBREV","ZIP","PHONE","BIRTHDATE","SIZINGGENDER","SHOESIZE", "WIDESIZES") values (0, 'Nobody', 'Blank', '0 Identity Rd', 'Portland', 'Oregon', 'OR', '97201', '503-555-0001', '1950-01-01','mens','10.0', false); insert into "CUSTOMERS" ("CUSTOMERNUMBER","FIRSTNAME","LASTNAME","ADDRESS","CITY", "STATENAME","STATEABBREV","ZIP","PHONE","BIRTHDATE","SIZINGGENDER","SHOESIZE", "WIDESIZES") values (17, 'Tom', 'Ling', '112 SomeStreet', 'Portland', 'Oregon', 'OR', '97201', '503-555-1233', '1962-02-25','mens','7.5', false); insert into "CUSTOMERS" ("CUSTOMERNUMBER","FIRSTNAME","LASTNAME","ADDRESS","CITY", "STATENAME","STATEABBREV","ZIP","PHONE","BIRTHDATE","SIZINGGENDER","SHOESIZE", "WIDESIZES") values (19, 'Sammy', 'Hamm', '4102 W. First', 'Portland', 'Oregon', 'OR', '97210', '503-555-4754', '1964-10-04','mens','9.0', true); insert into "CUSTOMERS" ("CUSTOMERNUMBER","FIRSTNAME","LASTNAME","ADDRESS","CITY", "STATENAME","STATEABBREV","ZIP","PHONE","BIRTHDATE","SIZINGGENDER","SHOESIZE", "WIDESIZES") values (24, 'Sarah', 'Weston', '421 Sideline St. Apt #4', 'Lake Oswego', 'Oregon', 'OR', '97035', '503-555-8874', '1974-03-21','mens','8.0', false); insert into "CUSTOMERS" ("CUSTOMERNUMBER","FIRSTNAME","LASTNAME","ADDRESS","CITY", "STATENAME","STATEABBREV","ZIP","PHONE","BIRTHDATE","SIZINGGENDER","SHOESIZE", "WIDESIZES") values (25, 'Lisa', 'Weston', '421 Sideline St. Apt #4', 'Lake Oswego', 'Oregon', 'OR', '97035', '503-555-8874', '1991-10-07','girls','2.0', true); insert into "CUSTOMERS" ("CUSTOMERNUMBER","FIRSTNAME","LASTNAME","ADDRESS","CITY", "STATENAME","STATEABBREV","ZIP","PHONE","BIRTHDATE","SIZINGGENDER","SHOESIZE", "WIDESIZES") values (26, 'Bill', 'Franklin', '801 Lake Ave.', 'Portland', 'Oregon', 'OR', '97202', '503-555-4120', '1965-09-21','mens','10.0', false); insert into "CUSTOMERS" ("CUSTOMERNUMBER","FIRSTNAME","LASTNAME","ADDRESS","CITY", "STATENAME","STATEABBREV","ZIP","PHONE","BIRTHDATE","SIZINGGENDER","SHOESIZE", "WIDESIZES") values (28, 'Wilma', 'Barkley', '7021 SW 66th', 'Tigard', 'Oregon', 'OR', '97224', '503-555-4998', '1975-09-21','womens','7.0', false); insert into "CUSTOMERS" ("CUSTOMERNUMBER","FIRSTNAME","LASTNAME","ADDRESS","CITY", "STATENAME","STATEABBREV","ZIP","PHONE","BIRTHDATE","SIZINGGENDER","SHOESIZE", "WIDESIZES") values (29, 'Walter', 'McClellan', '10425 Walling Cir', 'West Linn', 'Oregon', 'OR', '97068', '503-555-8856', '1938-02-29', 'mens','8.5', true); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('234001', '36" laces', true, false, 'Brown', 'Laces USA', '78778'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('234002', '36" laces', true, false, 'Black', 'Laces USA', '78778'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('234003', '36" laces', true, false, 'Beige', 'Laces USA', '78778'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('234004', '36" laces', true, false, 'White', 'Laces USA', '78778'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('234011', '54" laces', true, false, 'Brown', 'Laces USA', '78778'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('234012', '54" laces', true, false, 'Black', 'Laces USA', '78778'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('234013', '54" laces', true, false, 'Beige', 'Laces USA', '78778'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('234014', '54" laces', true, false, 'White', 'Laces USA', '78778'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('170211', 'odor insoles', true, true, 'none', 'feeterEater', '117'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('170211', 'cushioned insoles', true, true, 'none', 'feeterEater', '117'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('170211', 'cushioned odor insoles', true, true, 'none', 'feeterEater', '117'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('42187', 'Polish', true, false, 'Black', 'Shine Right', '4242'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('42188', 'Polish', true, false, 'Brown', 'Shine Right', '4242'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('42189', 'Polish', true, false, 'Tan', 'Shine Right', '4242'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('42190', 'Polish', true, false, 'Beige', 'Shine Right', '4242'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('42191', 'Polish', true, false, 'Red', 'Shine Right', '4242'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('42192', 'Polish', true, false, 'Blue', 'Shine Right', '4242'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('100', 'Restitch', false, false, 'none', 'Self', '1'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('101', 'Glue', false, false, 'none', 'Self', '1'); insert into "SALABLEITEMS" ("SKU","DESCRIPTION","ISPRODUCT","ISSIZEDEPENDANT", "COLOR","VENDOR","VENDORNUMBER") values ('102', 'Shine', false, false, 'none', 'Self', '1'); insert into "CALENDAR" ("DAYDATE") values ('2002-12-29'); insert into "CALENDAR" ("DAYDATE") values ('2003-01-05'); insert into "CALENDAR" ("DAYDATE") values ('2003-01-12'); insert into "CALENDAR" ("DAYDATE") values ('2003-01-19'); insert into "CALENDAR" ("DAYDATE") values ('2003-01-26'); insert into "CALENDAR" ("DAYDATE") values ('2003-02-02'); insert into "CALENDAR" ("DAYDATE") values ('2003-02-09'); insert into "CALENDAR" ("DAYDATE") values ('2003-02-16'); insert into "CALENDAR" ("DAYDATE") values ('2003-02-23'); insert into "CALENDAR" ("DAYDATE") values ('2003-03-02'); insert into "CALENDAR" ("DAYDATE") values ('2003-03-09'); insert into "CALENDAR" ("DAYDATE") values ('2003-03-16'); insert into "CALENDAR" ("DAYDATE") values ('2003-03-23'); insert into "CALENDAR" ("DAYDATE") values ('2003-03-30'); insert into "CALENDAR" ("DAYDATE") values ('2003-04-06'); insert into "CALENDAR" ("DAYDATE") values ('2003-04-13'); insert into "CALENDAR" ("DAYDATE") values ('2003-04-20'); insert into "CALENDAR" ("DAYDATE") values ('2003-04-27'); insert into "CALENDAR" ("DAYDATE") values ('2003-05-04'); insert into "CALENDAR" ("DAYDATE") values ('2003-05-11'); insert into "CALENDAR" ("DAYDATE") values ('2003-05-18'); insert into "CALENDAR" ("DAYDATE") values ('2003-05-25'); insert into "CALENDAR" ("DAYDATE") values ('2003-06-01'); update "CALENDAR" set "DAYNAME" = DATE_FORMAT("DAYDATE", '%W'); insert into "CALENDAR" ("DAYDATE") select DATE_ADD("DAYDATE", 1) from "CALENDAR"; insert into "CALENDAR" ("DAYDATE") select DATE_ADD("DAYDATE", 2) from "CALENDAR" where "DAYNAME" = 'Sunday'; insert into "CALENDAR" ("DAYDATE") select DATE_ADD("DAYDATE", 3) from "CALENDAR" where "DAYNAME" = 'Sunday'; insert into "CALENDAR" ("DAYDATE") select DATE_ADD("DAYDATE", 4) from "CALENDAR" where "DAYNAME" = 'Sunday'; insert into "CALENDAR" ("DAYDATE") select DATE_ADD("DAYDATE", 5) from "CALENDAR" where "DAYNAME" = 'Sunday'; insert into "CALENDAR" ("DAYDATE") select DATE_ADD("DAYDATE", 6) from "CALENDAR" where "DAYNAME" = 'Sunday'; update "CALENDAR" set "DAYNAME" = DATE_FORMAT("DAYDATE", '%W'), "DAYABBREV" = DATE_FORMAT("DAYDATE", '%a'), "DAYOFWEEK" = DATE_FORMAT("DAYDATE", '%w'), "DAYOFMONTH" = DATE_FORMAT("DAYDATE", '%e'), "MONTHNAME" = DATE_FORMAT("DAYDATE", '%M'), "MONTHABBREV" = DATE_FORMAT("DAYDATE", '%b'), "MONTHOFYEAR" = DATE_FORMAT("DAYDATE",'%c'), "YEAR" = DATE_FORMAT("DAYDATE", '%Y'); update "CALENDAR" set "WASOPENED"='1'; update "CALENDAR" set "WASOPENED"='0' where "DAYNAME" = 'Sunday' or "DAYNAME"='Monday'; update "CALENDAR" set "ISHOLIDAY"='1' where "DAYDATE" = '2002-12-31' or "DAYDATE" = '2003-01-01' or "DAYDATE" = '2003-02-17' or "DAYDATE" = '2003-05-05' or "DAYDATE" = '2003-05-26'; insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('1', '3', '72', '2.25', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('1', '2', '72', '2.25', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('1', '2', '72', '2.25', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('4', '7', '101', '2.50', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('4', '7', '100', '2.50', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('3', '5', '47', '2.50', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('3', '6', '47', '2.50', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('3', '7', '47', '2.50', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('3', '6', '116', '2.50', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('3', '10', '116', '15.00', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('7', '11', '75', '17.50', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('7', '20', '75', '10.00', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('2', '15', '105', '7.25', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('2', '10', '105', '15.00', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('2', '13', '105', '7.25', false); insert into "SALES" ("CUSTOMERID","SALABLEITEMSID","CALENDARID","AMOUNT","WEBSALE") values ('2', '18', '105', '8.00', false); |
Update of /cvsroot/pocolap/pocolap/userdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9992/userdocs Removed Files: Notes on using Oracle.txt Creating the pocOLAPinternal database.txt Creating the nss database.txt config_file_how_to.sxw config_file_how_to.pdf setupNSS.sql Log Message: Reorganization of resources --- Notes on using Oracle.txt DELETED --- --- Creating the nss database.txt DELETED --- --- config_file_how_to.pdf DELETED --- --- setupNSS.sql DELETED --- --- config_file_how_to.sxw DELETED --- --- Creating the pocOLAPinternal database.txt DELETED --- |
Update of /cvsroot/pocolap/pocolap/data/scripts_tools/outdated In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9992/data/scripts_tools/outdated Added Files: MANIFEST.MF sampleconfig.xml testPage.jsp config.xml build.xml setupNSS.sql web.xml CaseConverter.pl Log Message: Reorganization of resources --- NEW FILE: MANIFEST.MF --- Manifest-Version: 1.0 Created-By: TaR --- NEW FILE: build.xml --- <project name="Package MCS site" basedir="." default="run"> <property name="zipFile" value="site.zip" /> <property name="buildDir" value="build" /> <property name="topDir" value="../../" /> <property name="srcDir" value="${topDir}/src" /> <property name="binDir" value="${topDir}/bin" /> <property name="cpj2ee" value="/opt/eclipse/jars/j2ee.jar" /> <!--<property name="cpxerces" value="/opt/eclipse/jars/xercesImpl.jar:/opt/eclipse/jars/xmlParserAPIs.jar" /> --> <property name="cpxerces" value="/opt/eclipse/jars/oldXerces.jar" /> <target name="run"> <antcall target="populateBuild" /> <antcall target="zip" /> </target> <target name="populateBuild" depends="cleanBuild"> <javac description="compile source code to classes directory" srcdir="${srcDir}" destdir="${buildDir}/WEB-INF/classes" excludes="**/Test*" classpath="com.pocolap.**:${cpj2ee}:${cpxerces}" /> <copy todir="${buildDir}" description="copy jsp pages"> <fileset dir="${srcDir}/jsps" includes="*.jsp,Error.html" excludes="jspRedirector.jsp" /> </copy> <copy todir="${buildDir}/WEB-INF/tlds" description="copy tld"> <fileset dir="${srcDir}/tlds" includes="*" /> </copy> <copy todir="${buildDir}/WEB-INF" description="copy descriptor (web.xml)"> <fileset dir="." includes="web.xml" /> </copy> <copy todir="${buildDir}/META-INF" description="copy manifest"> <fileset dir="." includes="MANIFEST.MF" /> </copy> <copy todir="${buildDir}/scripts" description="copy js and css files"> <fileset dir="${srcDir}/scripts" includes="*" /> </copy> <copy todir="${buildDir}/config" description="copy config file"> <fileset dir="." includes="config.xml" /> </copy> </target> <target name="zip" description="Bundle build into a zip file"> <zip destfile="${zipFile}" basedir="${buildDir}" /> </target> <target name="cleanBuild"> <delete dir="${buildDir}" /> <mkdir dir="${buildDir}" /> <mkdir dir="${buildDir}/META-INF" /> <mkdir dir="${buildDir}/WEB-INF" /> <mkdir dir="${buildDir}/WEB-INF/classes" /> <mkdir dir="${buildDir}/WEB-INF/tlds" /> <mkdir dir="${buildDir}/scripts" /> <mkdir dir="${buildDir}/config" /> </target> <target name="cleanAll"> <delete dir="${buildDir}" /> </target> </project> --- NEW FILE: config.xml --- <reptconfig> <rept name="Sales SpreadSheet"> <source classtype="com.pocolap.conn.StandardJDBC" driver="org.gjt.mm.mysql.Driver" user="nssUser" pass="nssPass">jdbc:mysql://localhost:3306/nss</source> <measure name="Sold Items" table="SALES" key="AMOUNT" function="sum" /> <dimension name="Customers" table="CUSTOMERS" key="CUSTOMERID" measureKey="CUSTOMERID"> <group name="Customer" defaultField="Customer Last Name"> <field name="Customer Last Name" key="LASTNAME" /> <!-- other fields are to be used when formatting is implemented --> <field name="Customer Number" key="CUSTOMERNUMBER" /> <drilldown>Shoe Size</drilldown> </group> <group name="Customer Origin" defaultField="Zip Code"> <field name="Zip Code" key="ZIP" /> <field name="City" key="CITY" /> <drilldown>Customer</drilldown> </group> <group name="Shoe Size"> <field name="Shoe Size" key="SHOESIZE" /> <field name="Size Type" key="SIZINGGENDER" /> <field name="Extra Width" key="WIDESIZES" /> </group> </dimension> <dimension name="Items to Sell" table="SALABLEITEMS" key="SALABLEITEMSID" measureKey="SALABLEITEMSID"> <group name="Stock Keeping Unit"> <field name="SKU Value" key="SKU" /> <field name="Product Desription" key="DESCRIPTION" /> <field name="Product or Service" key="ISPRODUCT" /> <drilldown>Vendor</drilldown> </group> <group name="Vendor"> <field name="Vendor Name" key="VENDOR" /> <field name="Vendor Number" key="VENDORNUMBER" /> <drilldown>Stock Keeping Unit</drilldown> </group> </dimension> <dimension name="Dates" table="CALENDAR" key="CALENDARID" measureKey="CALENDARID"> <group name="Sale Date"> <field name="Date" key="DAYDATE" /> </group> <group name="Month" defaultField="Month"> <field name="Number of Month" key="MONTHOFYEAR" /> <field name="Month" key="MONTHNAME" /> <field name="Abbreviated Month" key="MONTHABBREV" /> <drilldown>Sale Date</drilldown> </group> <group name="Year"> <field name="Year" key="YEAR" /> <drilldown>Month</drilldown> <drilldown>Sale Date</drilldown> </dimension> </rept> </reptconfig> --- NEW FILE: testPage.jsp --- <%@page language="java" import="java.sql.*"%> <%! Driver driver = null; String dbURL = null; Connection conn = null; Statement stat = null; ResultSet rs = null; Object rsValue = null; int counter; String query = "select * from \"CUSTOMERS\";"; %> <% try { driver = (Driver) Class.forName("org.hsqldb.jdbcDriver").newInstance(); dbURL = "jdbc:hsqldb:" + application.getRealPath("/~pocolap/nss/nss"); conn = DriverManager.getConnection(dbURL,"nssUser", "nssPass"); stat = conn.createStatement(); rs = stat.executeQuery(query); } catch (Exception e) { out.print("Unable do make connection to customers"); out.print(e); } %> <html> <head> <title>Test Page</title> <meta http-equiv="Content-Type" content="text/html; charset="> </head> <body bgcolor="#FFFFFF" text="#000000"> <h3>Test Page<br> </h3> <table border="1"><tr><td>ID</td><td>NAME</td></tr> <% if (rs!=null){ if (rs.next()){ StringBuffer buffer = new StringBuffer("<tr><td>"); Object id = rs.getObject(1); Object name = rs.getObject(2); if (id==null){ //id = "null"; buffer.append("null"); }else{ buffer.append(id.toString()+" "); } buffer.append("</td><td>"); if (name==null){ buffer.append("null"); }else{ buffer.append(name.toString()+" "); } buffer.append("</td></tr>"); out.println(buffer.toString()); }else{ out.println("No rows for " + application.getRealPath("/~pocolap/nss/nss")); } }else{ out.println("it's null"); } try{ rs.close(); stat.close(); conn.close(); }catch(Exception e){ //ignore } %> </table> Done </body </html> --- NEW FILE: CaseConverter.pl --- #! /usr/bin/perl ########################## # # This script creates config.xml by # copying sampleconfig.xml and # converting all "table" and "key" # entries to uppercase since HSQLDB # converts everything whether you # want it to or not. # ########################### $origfile = "sampleconfig.xml"; $config = "config.xml"; open (ORIG, "<", $origfile) || die "Couldn't open original file"; open (CONFIG, ">", $config) || die "Couldn't open config file"; while (defined ($str=<ORIG>)){ if ($str =~ /table=\"/ || $str =~ /key=\"/){ @tokens = split(/ /,$str); foreach my $token (@tokens){ if ($token =~ /table=\"/ || $token =~ /key=\"/ || $token =~ /measureKey=\"/ ){ $token =~ s/\"(\w+)\"/\"\U$1\"/g; } print CONFIG "$token "; } }else{ print CONFIG $str; } } close(ORIG); close(CONFIG); print 'Done'; --- NEW FILE: setupNSS.sql --- create database if not exists nss; use nss; drop table if exists `customers`; drop table if exists `salableitems`; drop table if exists `calendar`; drop table if exists `sales`; create table `customers`( `customerid` int unsigned auto_increment primary key , `customerNumber` int, `firstName` varchar(50) null, `lastName` varchar(50) default ' ' not null , `address` varchar(100) null, `city` varchar(60) null, `stateName` varchar(50) null, `stateAbbrev` char(2) null, `zip` varchar (15) null, `phone` varchar(25) null, `birthdate` date null, `sizingGender` varchar(20) default 'mens' not null , `shoesize` float null, `wideSizes` bit default '0' not null ); create table `salableitems`( `salableitemsid` int unsigned auto_increment primary key , `sku` int default '0' not null, `description` varchar(50) default ' ' not null, `isProduct` bit default '0' not null, `isSizeDependant` bit default '0' not null, `color` varchar(30) default 'none' not null, `vendor` varchar(80) default ' ' not null, `vendorNumber` int default '0' not null); create table `calendar`( `calendarid` int unsigned auto_increment primary key, `dayDate` date default '1950-01-01' not null, `dayName` varchar(12) default ' ' not null, `dayAbbrev` char(3) default ' ' not null, `dayOfWeek` int default '0' not null, `dayOfMonth` int default '0' not null, `monthName` varchar(12) default ' ' not null, `monthAbbrev` char(3) default ' ' not null, `monthOfYear` int default '0' not null, `year` int default '0' not null, `isHoliday` bit default '0' not null, `wasOpened` bit default '0' not null); create table `sales`( `customerid` int default '0' not null, `salableitemsid` int default '0' not null, `calendarid` int default '0' not null, `amount` float default '0' not null, `webSale` bit default '0' not null); GRANT select,insert,delete,update on nss.* to nssUser@localhost identified by 'nssPass'; insert into `customers` (`customerNumber`,`firstName`,`lastName`,`address`,`city`, `stateName`,`stateAbbrev`,`zip`,`phone`,`birthdate`,`sizingGender`,`shoesize`, `wideSizes`) values (17, 'Tom', 'Ling', '112 SomeStreet', 'Portland', 'Oregon', 'OR', '97201', '503-555-1233', '1962-02-25','mens','7.5', '0'); insert into `customers` (`customerNumber`,`firstName`,`lastName`,`address`,`city`, `stateName`,`stateAbbrev`,`zip`,`phone`,`birthdate`,`sizingGender`,`shoesize`, `wideSizes`) values (19, 'Sammy', 'Hamm', '4102 W. First', 'Portland', 'Oregon', 'OR', '97210', '503-555-4754', '1964-10-04','mens','9.0', '1'); insert into `customers` (`customerNumber`,`firstName`,`lastName`,`address`,`city`, `stateName`,`stateAbbrev`,`zip`,`phone`,`birthdate`,`sizingGender`,`shoesize`, `wideSizes`) values (24, 'Sarah', 'Weston', '421 Sideline St. Apt #4', 'Lake Oswego', 'Oregon', 'OR', '97035', '503-555-8874', '1974-03-21','mens','8.0', '0'); insert into `customers` (`customerNumber`,`firstName`,`lastName`,`address`,`city`, `stateName`,`stateAbbrev`,`zip`,`phone`,`birthdate`,`sizingGender`,`shoesize`, `wideSizes`) values (25, 'Lisa', 'Weston', '421 Sideline St. Apt #4', 'Lake Oswego', 'Oregon', 'OR', '97035', '503-555-8874', '1991-10-07','girls','2.0', '0'); insert into `customers` (`customerNumber`,`firstName`,`lastName`,`address`,`city`, `stateName`,`stateAbbrev`,`zip`,`phone`,`birthdate`,`sizingGender`,`shoesize`, `wideSizes`) values (26, 'Bill', 'Franklin', '801 Lake Ave.', 'Portland', 'Oregon', 'OR', '97202', '503-555-4120', '1965-09-21','mens','10.0', '0'); insert into `customers` (`customerNumber`,`firstName`,`lastName`,`address`,`city`, `stateName`,`stateAbbrev`,`zip`,`phone`,`birthdate`,`sizingGender`,`shoesize`, `wideSizes`) values (28, 'Wilma', 'Barkley', '7021 SW 66th', 'Tigard', 'Oregon', 'OR', '97224', '503-555-4998', '1975-09-21','womens','7.0', '0'); insert into `customers` (`customerNumber`,`firstName`,`lastName`,`address`,`city`, `stateName`,`stateAbbrev`,`zip`,`phone`,`birthdate`,`sizingGender`,`shoesize`, `wideSizes`) values (29, 'Walter', 'McClellan', '10425 Walling Cir', 'West Linn', 'Oregon', 'OR', '97068', '503-555-8856', '1938-02-29', 'mens','8.5', '1'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('234001', '36" laces', '1', '0', 'Brown', 'Laces USA', '78778'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('234002', '36" laces', '1', '0', 'Black', 'Laces USA', '78778'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('234003', '36" laces', '1', '0', 'Beige', 'Laces USA', '78778'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('234004', '36" laces', '1', '0', 'White', 'Laces USA', '78778'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('234011', '54" laces', '1', '0', 'Brown', 'Laces USA', '78778'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('234012', '54" laces', '1', '0', 'Black', 'Laces USA', '78778'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('234013', '54" laces', '1', '0', 'Beige', 'Laces USA', '78778'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('234014', '54" laces', '1', '0', 'White', 'Laces USA', '78778'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('170211', 'odor insoles', '1', '1', 'none', 'feeterEater', '117'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('170211', 'cushioned insoles', '1', '1', 'none', 'feeterEater', '117'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('170211', 'cushioned odor insoles', '1', '1', 'none', 'feeterEater', '117'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('42187', 'Polish', '1', '0', 'Black', 'Shine Right', '4242'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('42188', 'Polish', '1', '0', 'Brown', 'Shine Right', '4242'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('42189', 'Polish', '1', '0', 'Tan', 'Shine Right', '4242'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('42190', 'Polish', '1', '0', 'Beige', 'Shine Right', '4242'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('42191', 'Polish', '1', '0', 'Red', 'Shine Right', '4242'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('42192', 'Polish', '1', '0', 'Blue', 'Shine Right', '4242'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('100', 'Restitch', '0', '0', 'none', 'Self', '1'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('101', 'Glue', '0', '0', 'none', 'Self', '1'); insert into `salableitems` (`sku`,`description`,`isProduct`,`isSizeDependant`, `color`,`vendor`,`vendorNumber`) values ('102', 'Shine', '0', '0', 'none', 'Self', '1'); insert into `calendar` (`dayDate`) values ('2002-12-29'); insert into `calendar` (`dayDate`) values ('2003-01-05'); insert into `calendar` (`dayDate`) values ('2003-01-12'); insert into `calendar` (`dayDate`) values ('2003-01-19'); insert into `calendar` (`dayDate`) values ('2003-01-26'); insert into `calendar` (`dayDate`) values ('2003-02-02'); insert into `calendar` (`dayDate`) values ('2003-02-09'); insert into `calendar` (`dayDate`) values ('2003-02-16'); insert into `calendar` (`dayDate`) values ('2003-02-23'); insert into `calendar` (`dayDate`) values ('2003-03-02'); insert into `calendar` (`dayDate`) values ('2003-03-09'); insert into `calendar` (`dayDate`) values ('2003-03-16'); insert into `calendar` (`dayDate`) values ('2003-03-23'); insert into `calendar` (`dayDate`) values ('2003-03-30'); insert into `calendar` (`dayDate`) values ('2003-04-06'); insert into `calendar` (`dayDate`) values ('2003-04-13'); insert into `calendar` (`dayDate`) values ('2003-04-20'); insert into `calendar` (`dayDate`) values ('2003-04-27'); insert into `calendar` (`dayDate`) values ('2003-05-04'); insert into `calendar` (`dayDate`) values ('2003-05-11'); insert into `calendar` (`dayDate`) values ('2003-05-18'); insert into `calendar` (`dayDate`) values ('2003-05-25'); insert into `calendar` (`dayDate`) values ('2003-06-01'); update `calendar` set `dayName` = DATE_FORMAT(`dayDate`, '%W'); insert into `calendar` (`dayDate`) select DATE_ADD(`dayDate`, INTERVAL 1 DAY) from `calendar`; insert into `calendar` (`dayDate`) select DATE_ADD(`dayDate`, INTERVAL 2 DAY) from `calendar` where `dayName` = 'Sunday'; insert into `calendar` (`dayDate`) select DATE_ADD(`dayDate`, INTERVAL 3 DAY) from `calendar` where `dayName` = 'Sunday'; insert into `calendar` (`dayDate`) select DATE_ADD(`dayDate`, INTERVAL 4 DAY) from `calendar` where `dayName` = 'Sunday'; insert into `calendar` (`dayDate`) select DATE_ADD(`dayDate`, INTERVAL 5 DAY) from `calendar` where `dayName` = 'Sunday'; insert into `calendar` (`dayDate`) select DATE_ADD(`dayDate`, INTERVAL 6 DAY) from `calendar` where `dayName` = 'Sunday'; update `calendar` set `dayName` = DATE_FORMAT(`dayDate`, '%W'), `dayAbbrev` = DATE_FORMAT(`dayDate`, '%a'), `dayOfWeek` = DATE_FORMAT(`dayDate`, '%w'), `dayOfMonth` = DATE_FORMAT(`dayDate`, '%e'), `monthName` = DATE_FORMAT(`dayDate`, '%M'), `monthAbbrev` = DATE_FORMAT(`dayDate`, '%b'), `monthOfYear` = DATE_FORMAT(`dayDate`,'%c'), `year` = DATE_FORMAT(`dayDate`, '%Y'); update `calendar` set `wasOpened`='1'; update `calendar` set `wasOpened`='0' where `dayName` = 'Sunday' or `dayName`='Monday'; update `calendar` set `isHoliday`='1' where `dayDate` = '2002-12-31' or `dayDate` = '2003-01-01' or `dayDate` = '2003-02-17' or `dayDate` = '2003-05-05' or `dayDate` = '2003-05-26'; insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('1', '3', '35', '2.25', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('1', '2', '35', '2.25', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('1', '2', '35', '2.25', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('4', '7', '27', '2.50', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('4', '7', '32', '2.50', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('3', '5', '47', '2.50', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('3', '6', '47', '2.50', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('3', '7', '47', '2.50', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('3', '6', '116', '2.50', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('3', '10', '116', '15.00', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('7', '11', '75', '17.50', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('7', '20', '75', '10.00', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('2', '15', '105', '7.25', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('2', '10', '105', '15.00', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('2', '13', '105', '7.25', '0'); insert into `sales` (`customerid`,`salableitemsid`,`calendarid`,`amount`,`webSale`) values ('2', '18', '105', '8.00', '0'); --- NEW FILE: web.xml --- <?xml version="1.0"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>XTabMain</servlet-name> <servlet-class>com.pocolap.servlets.XTabMain</servlet-class> <init-param> <param-name>whs_b</param-name> <param-value>./config/config.xml</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>XTabMain</servlet-name> <url-pattern>/servlets/XTabMain</url-pattern> </servlet-mapping> <taglib> <taglib-uri>ReptTags</taglib-uri> <taglib-location>/WEB-INF/tlds/ReptTags.tld</taglib-location> </taglib> </web-app> --- NEW FILE: sampleconfig.xml --- <reptconfig> <rept name="Sales SpreadSheet"> <source classtype="com.pocolap.conn.StandardJDBC" driver="org.gjt.mm.mysql.Driver" user="nssUser" pass="nssPass">jdbc:mysql://localhost:3306/nss</source> <measure name="Sold Items" table="sales" key="amount" function="sum" /> <dimension name="Customers" table="customers" key="customerid" measureKey="customerid"> <group name="Customer" defaultField="Customer Last Name"> <field name="Customer Last Name" key="lastName" /> <!-- other fields are to be used when formatting is implemented --> <field name="Customer Number" key="customerNumber" /> <drilldown>Shoe Size</drilldown> </group> <group name="Customer Origin" defaultField="Zip Code"> <field name="Zip Code" key="zip" /> <field name="City" key="city" /> <drilldown>Customer</drilldown> </group> <group name="Shoe Size"> <field name="Shoe Size" key="shoesize" /> <field name="Size Type" key="sizingGender" /> <field name="Extra Width" key="wideSizes" /> </group> </dimension> <dimension name="Items to Sell" table="salableitems" key="salableitemsid" measureKey="salableitemsid"> <group name="Stock Keeping Unit"> <field name="SKU Value" key="sku" /> <field name="Product Desription" key="description" /> <field name="Product or Service" key="isProduct" /> <drilldown>Vendor</drilldown> </group> <group name="Vendor"> <field name="Vendor Name" key="vendor" /> <field name="Vendor Number" key="vendorNumber" /> <drilldown>Stock Keeping Unit</drilldown> </group> </dimension> <dimension name="Dates" table="calendar" key="calendarid" measureKey="calendarid"> <group name="Sale Date"> <field name="Date" key="dayDate" /> </group> <group name="Month" defaultField="Month"> <field name="Number of Month" key="monthOfYear" /> <field name="Month" key="monthName" /> <field name="Abbreviated Month" key="monthAbbrev" /> <drilldown>Sale Date</drilldown> </group> <group name="Year"> <field name="Year" key="year" /> <drilldown>Month</drilldown> <drilldown>Sale Date</drilldown> </dimension> </rept> </reptconfig> |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:35
|
Update of /cvsroot/pocolap/pocolap/data/scripts_tools/hsqldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/scripts_tools/hsqldb Log Message: Directory /cvsroot/pocolap/pocolap/data/scripts_tools/hsqldb added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:35
|
Update of /cvsroot/pocolap/pocolap/data/scripts_tools/outdated/oldtools/com/pocolap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/scripts_tools/outdated/oldtools/com/pocolap Log Message: Directory /cvsroot/pocolap/pocolap/data/scripts_tools/outdated/oldtools/com/pocolap added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:35
|
Update of /cvsroot/pocolap/pocolap/data/xsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/xsd Log Message: Directory /cvsroot/pocolap/pocolap/data/xsd added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:35
|
Update of /cvsroot/pocolap/pocolap/data/xsd/CrosstabXSD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/xsd/CrosstabXSD Log Message: Directory /cvsroot/pocolap/pocolap/data/xsd/CrosstabXSD added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:34
|
Update of /cvsroot/pocolap/pocolap/data/scripts_tools/outdated/oldtools/com/pocolap/hsqldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/scripts_tools/outdated/oldtools/com/pocolap/hsqldb Log Message: Directory /cvsroot/pocolap/pocolap/data/scripts_tools/outdated/oldtools/com/pocolap/hsqldb added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:34
|
Update of /cvsroot/pocolap/pocolap/data/scripts_tools/outdated/oldtools/com In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/scripts_tools/outdated/oldtools/com Log Message: Directory /cvsroot/pocolap/pocolap/data/scripts_tools/outdated/oldtools/com added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:33
|
Update of /cvsroot/pocolap/pocolap/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data Log Message: Directory /cvsroot/pocolap/pocolap/data added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:29
|
Update of /cvsroot/pocolap/pocolap/data/scripts_tools/derby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/scripts_tools/derby Log Message: Directory /cvsroot/pocolap/pocolap/data/scripts_tools/derby added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:29
|
Update of /cvsroot/pocolap/pocolap/data/pocolapDB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/pocolapDB Log Message: Directory /cvsroot/pocolap/pocolap/data/pocolapDB added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:29
|
Update of /cvsroot/pocolap/pocolap/data/pocolapDB/sampleDB/seg0 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/pocolapDB/sampleDB/seg0 Log Message: Directory /cvsroot/pocolap/pocolap/data/pocolapDB/sampleDB/seg0 added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:29
|
Update of /cvsroot/pocolap/pocolap/data/scripts_tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/scripts_tools Log Message: Directory /cvsroot/pocolap/pocolap/data/scripts_tools added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:28
|
Update of /cvsroot/pocolap/pocolap/data/pocolapDB/sampleDB/log In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/pocolapDB/sampleDB/log Log Message: Directory /cvsroot/pocolap/pocolap/data/pocolapDB/sampleDB/log added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:26
|
Update of /cvsroot/pocolap/pocolap/data/pocolapDB/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/pocolapDB/resources Log Message: Directory /cvsroot/pocolap/pocolap/data/pocolapDB/resources added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 20:53:26
|
Update of /cvsroot/pocolap/pocolap/data/pocolapDB/crosstabdefs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9703/data/pocolapDB/crosstabdefs Log Message: Directory /cvsroot/pocolap/pocolap/data/pocolapDB/crosstabdefs added to the repository |
|
From: todd r. <to...@us...> - 2005-03-31 16:31:08
|
Update of /cvsroot/pocolap/pocolap/src/com/pocolap/servlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19672/src/com/pocolap/servlets Modified Files: SelectionHelper.java Log Message: Fixed bug in actionSelection that occassionally led to IndexOutOfBoundsException Index: SelectionHelper.java =================================================================== RCS file: /cvsroot/pocolap/pocolap/src/com/pocolap/servlets/SelectionHelper.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SelectionHelper.java 24 Mar 2005 17:08:19 -0000 1.10 --- SelectionHelper.java 31 Mar 2005 16:30:56 -0000 1.11 *************** *** 55,59 **** protected Selector selector ; private HashMap parameters ; ! static Logger logger = Logger.getLogger(SelectionHelper.class); --- 55,75 ---- protected Selector selector ; private HashMap parameters ; ! ! private static Vector attrs; ! ! static { ! attrs = new Vector(); ! attrs.add(pocOLAPConstants.ATTR_ACROSSSELECTOR); ! attrs.add(pocOLAPConstants.ATTR_DETAIL_ITEM); ! attrs.add(pocOLAPConstants.ATTR_DOWNSELECTOR); ! attrs.add(pocOLAPConstants.ATTR_FILTER_ACTION); ! attrs.add(pocOLAPConstants.ATTR_FILTER_FIELD); ! attrs.add(pocOLAPConstants.ATTR_FILTER_TABLE); ! attrs.add(pocOLAPConstants.ATTR_FILTERS); ! attrs.add(pocOLAPConstants.ATTR_REPT_LIST); ! attrs.add(pocOLAPConstants.ATTR_REPT_SELECTED); ! attrs.add(pocOLAPConstants.ATTR_SCHEMA); ! } ! static Logger logger = Logger.getLogger(SelectionHelper.class); *************** *** 149,152 **** --- 165,169 ---- */ public void clearAttributes(HttpServletRequest req){ + String errclass = getClass().getName()+".clearAttributes(HttpServletRequest)"; Vector vector = new Vector(); Enumeration enumeration = req.getSession().getAttributeNames(); *************** *** 157,161 **** Iterator iter = vector.iterator(); while (iter.hasNext()){ ! req.getSession().removeAttribute((String)iter.next()); } } --- 174,187 ---- Iterator iter = vector.iterator(); while (iter.hasNext()){ ! String item = (String)iter.next(); ! if (logger.isDebugEnabled()){ ! logger.debug(errclass+": Evaluating "+item+" for removal"); ! } ! if (attrs.contains(item)){ ! if (logger.isDebugEnabled()){ ! logger.debug(errclass+": Removing " + item + " from session"); ! } ! req.getSession().removeAttribute(item); ! } } } *************** *** 203,206 **** --- 229,236 ---- direction = pocOLAPConstants.ACTION_ACROSS_START ; + if (logger.isDebugEnabled()){ + logger.debug(errclass+": Direction of selection is \"" + direction+ "\""); + } + String number = action.replaceAll(direction,"");; if (number.equals("") || number.equals("0")){ *************** *** 212,215 **** --- 242,249 ---- Integer stop = new Integer(number); + if (logger.isDebugEnabled()){ + logger.debug(errclass+": Depth of selection is " + stop); + } + if (crosstabdef!=null){ *************** *** 218,221 **** --- 252,259 ---- String rootname = ((String[])parameters.get(direction+"1"))[0]; + if (logger.isDebugEnabled()){ + logger.debug(errclass+": Root for this selection is " + rootname); + } + if (rootname.equals(Selector.ROLLUP)){ selector = null; *************** *** 226,229 **** --- 264,272 ---- //No Selector? Let's make one selector = new Selector(crosstabdef,dim); + + if (logger.isDebugEnabled()){ + logger.debug(errclass+": Selector has been created"); + } + }else{ if (stop.intValue()>=1){ *************** *** 242,249 **** //If we replaced the Selectors root, we'll skip the next part if (stop.intValue()>1){ for (int x=2;x<=stop.intValue();x++){ String selectedname = ((String[])parameters.get(direction+x))[0]; ! //TODO - rootname could be <ROLLUP> or <DRILLDOWN> or ======== ! //Assuming a group name for now if (selectedname.equals(Selector.ROLLUP) || selectedname.equals(Selector.DRILLDOWN)){ --- 285,302 ---- //If we replaced the Selectors root, we'll skip the next part if (stop.intValue()>1){ + + if (logger.isDebugEnabled()){ + logger.debug(errclass+": Preparing to loop through groups, beginning at x=2"); + } + + //Let's see what has been selected for (int x=2;x<=stop.intValue();x++){ String selectedname = ((String[])parameters.get(direction+x))[0]; ! ! if (logger.isDebugEnabled()){ ! logger.debug(errclass+": x="+x+"; itemname="+selectedname); ! ! } ! if (selectedname.equals(Selector.ROLLUP) || selectedname.equals(Selector.DRILLDOWN)){ *************** *** 257,264 **** --- 310,326 ---- } }else if(selectedname.equals(Selector.DRILLDOWN)){ + + if (logger.isDebugEnabled()){ + logger.debug(errclass+": Drilling down on this item"); + } + if (x==2 && selector.getItemCount()==1){ //We're working with a default item, so we //won't find it in selector + if (logger.isDebugEnabled()){ + logger.debug(errclass+": Drilling into the default item"); + } + GroupItem defgroup = null; if (dim.getDefGroup()!=null) *************** *** 271,280 **** GroupItem defgroup1 = DefinitionHelper.getGroup(dim,selector.getSelectionItem(x).getGroupName()); String[] drilldowns = defgroup1.getDrilldownArray(); ! if (drilldowns!=null && drilldowns.length>0){ ! GroupItem group = DefinitionHelper.getGroup(dim,drilldowns[0]); ! if (group!=null){ ! selector.addGroup(group); } } }else{ --- 333,376 ---- GroupItem defgroup1 = DefinitionHelper.getGroup(dim,selector.getSelectionItem(x).getGroupName()); + if (logger.isDebugEnabled()){ + logger.debug(errclass+": Found the GroupItem " + defgroup1.getName() +" and preparing to process it"); + } + String[] drilldowns = defgroup1.getDrilldownArray(); ! if (drilldowns!=null && drilldowns.length>0){ ! //Need to find the first available (unused) drilldown ! for (int y=0;y<drilldowns.length;y++){ ! String dd = drilldowns[y]; ! ! if (logger.isDebugEnabled()){ ! logger.debug(errclass+": Determining whether " + dd+ " is already in the selector"); ! } ! ! boolean isused = false; ! for (int z=0;z<x;z++){ ! SelectionItem si = selector.getSelectionItem(z); ! if (si!=null && si.getGroupName()!=null && si.getGroupName().equals(dd)){ ! isused=true; ! break; ! } ! } ! ! if (logger.isDebugEnabled()){ ! logger.debug(errclass+": Determined the decision to use " + dd+ " is "+isused); ! } ! ! if (!isused){ ! //This one looks good! ! GroupItem group = DefinitionHelper.getGroup(dim,dd); ! if (group!=null){ ! selector.addGroup(group); ! if (logger.isDebugEnabled()){ ! logger.debug(errclass+": Added "+ group.getName()+" to the selector"); ! } ! } ! break; ! } } + } }else{ |
|
From: Rashmi B. <ra...@us...> - 2005-03-30 20:53:31
|
Update of /cvsroot/pocolap/pocolap/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4735 Added Files: InputDataDerby.html Log Message: Input Data for 'Employee Hours' --- NEW FILE: InputDataDerby.html --- <html> <head> <title>pocOLAP, the "little" OLAP Project - Input Data</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link type="text/css" rel="stylesheet" href="scripts/ReptGenStyle.css"/> </head> <body bgcolor="#FFFFFF" text="#000000"> <p><b><font size="+2">Data used for the Sample Database</font></b></p> <p>The data presented in the pocOLAP sample report is generated from the following tables:</p> <p><b><font size="+1"><a href="#laborhours">LaborHours</a> <font size="3">(<measure>)</font><br> </font></b><b><font size="+1"><a href="#employees">Employees</a> <font size="3">(<dimension>)</font><br> <a href="#workitems">WorkItems</a> <font size="3">(<dimension>)</font><br> <a href="#worktypes">WorkTypes</a> <font size="3">(<dimension>)<br> </font><a href="#calendar">Calendar</a> <font size="3">(<dimension>)</font></font></b></p> <p> </p> <p><b><u><a name="laborhours">LaborHours</a></u></b></p> <table border="1"> [...4804 lines suppressed...] <tr> <td><font size="-1">161</font></td> <td><font size="-1">2003-06-07</font></td> <td><font size="-1">Saturday</font></td> <td><font size="-1">Sat</font></td> <td><font size="-1">6</font></td> <td><font size="-1">7</font></td> <td><font size="-1">June</font></td> <td><font size="-1">Jun</font></td> <td><font size="-1">6</font></td> <td><font size="-1">2003</font></td> <td><font size="-1">0</font></td> <td><font size="-1">1</font></td> </tr> </table> <p><br> </p> <p> </p> </body> </html> |
|
From: Rashmi B. <ra...@us...> - 2005-03-30 16:55:17
|
Update of /cvsroot/pocolap/pocolap/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4240 Modified Files: InputData.html Log Message: no message Index: InputData.html =================================================================== RCS file: /cvsroot/pocolap/pocolap/web/InputData.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InputData.html 30 Mar 2005 16:00:46 -0000 1.1 --- InputData.html 30 Mar 2005 16:54:48 -0000 1.2 *************** *** 10,15 **** <p>The data presented in the pocOLAP sample report is generated from the following tables:</p> ! <p><b><font size="+1"><a href="#cust">Customers</a><br> ! <a href="#sitems">SalableItems</a><br><a href="#sales">Sales</a><br><a href="#calendar">Calendar</a></font></b></p> <p><b><u><a name="cust">Customers</a></u></b></p> <table width="100%" border="1"> --- 10,140 ---- <p>The data presented in the pocOLAP sample report is generated from the following tables:</p> ! <p><b><font size="+1"><a href="#sales">Sales</a> <font size="3">(<measure>)</font><br> ! </font></b><b><font size="+1"><a href="#cust">Customers</a> <font size="3">(<dimension>)</font><br> ! <a href="#sitems">SalableItems</a> <font size="3">(<dimension>)</font><br> ! <a href="#calendar">Calendar</a> <font size="3">(<dimension>)</font></font></b></p> ! <p><b><u><a name="sales">Sales</a></u></b></p> ! <table width="100%" border="1"> ! <tr> ! <td><b><font size="-1">CustomerId</font></b></td> ! <td><b><font size="-1">SalableItemsId</font></b></td> ! <td><b><font size="-1">CalendarId</font></b></td> ! <td><b><font size="-1">Amount</font></b></td> ! <td><b><font size="-1">webSale</font></b></td> ! </tr> ! <tr> ! <td><font size="-1">1</font></td> ! <td><font size="-1">3</font></td> ! <td><font size="-1">35</font></td> ! <td><font size="-1">2.25</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">1</font></td> ! <td><font size="-1">2</font></td> ! <td><font size="-1">35</font></td> ! <td><font size="-1">2.25</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">1</font></td> ! <td><font size="-1">2</font></td> ! <td><font size="-1">35</font></td> ! <td><font size="-1">2.25</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">4</font></td> ! <td><font size="-1">7</font></td> ! <td><font size="-1">27</font></td> ! <td><font size="-1">2.5</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">4</font></td> ! <td><font size="-1">7</font></td> ! <td><font size="-1">32</font></td> ! <td><font size="-1">2.5</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">3</font></td> ! <td><font size="-1">5</font></td> ! <td><font size="-1">47</font></td> ! <td><font size="-1">2.5</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">3</font></td> ! <td><font size="-1">6</font></td> ! <td><font size="-1">47</font></td> ! <td><font size="-1">2.5</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">3</font></td> ! <td><font size="-1">7</font></td> ! <td><font size="-1">47</font></td> ! <td><font size="-1">2.5</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">3</font></td> ! <td><font size="-1">6</font></td> ! <td><font size="-1">116</font></td> ! <td><font size="-1">2.5</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">3</font></td> ! <td><font size="-1">10</font></td> ! <td><font size="-1">116</font></td> ! <td><font size="-1">15.0</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">7</font></td> ! <td><font size="-1">11</font></td> ! <td><font size="-1">75</font></td> ! <td><font size="-1">17.5</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">7</font></td> ! <td><font size="-1">20</font></td> ! <td><font size="-1">75</font></td> ! <td><font size="-1">10.0</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">2</font></td> ! <td><font size="-1">15</font></td> ! <td><font size="-1">105</font></td> ! <td><font size="-1">7.25</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">2</font></td> ! <td><font size="-1">10</font></td> ! <td><font size="-1">105</font></td> ! <td><font size="-1">15.0</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">2</font></td> ! <td><font size="-1">13</font></td> ! <td><font size="-1">105</font></td> ! <td><font size="-1">7.25</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! <tr> ! <td><font size="-1">2</font></td> ! <td><font size="-1">18</font></td> ! <td><font size="-1">105</font></td> ! <td><font size="-1">8.0</font></td> ! <td><font size="-1">0</font></td> ! </tr> ! </table> ! <p> </p> <p><b><u><a name="cust">Customers</a></u></b></p> <table width="100%" border="1"> *************** *** 358,484 **** </table> <p> </p> - <p><b><u><a name="sales">Sales</a></u></b></p> - <table width="100%" border="1"> - <tr> - <td><b><font size="-1">CustomerId</font></b></td> - <td><b><font size="-1">SalableItemsId</font></b></td> - <td><b><font size="-1">CalendarId</font></b></td> - <td><b><font size="-1">Amount</font></b></td> - <td><b><font size="-1">webSale</font></b></td> - </tr> - <tr> - <td><font size="-1">1</font></td> - <td><font size="-1">3</font></td> - <td><font size="-1">35</font></td> - <td><font size="-1">2.25</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">1</font></td> - <td><font size="-1">2</font></td> - <td><font size="-1">35</font></td> - <td><font size="-1">2.25</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">1</font></td> - <td><font size="-1">2</font></td> - <td><font size="-1">35</font></td> - <td><font size="-1">2.25</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">4</font></td> - <td><font size="-1">7</font></td> - <td><font size="-1">27</font></td> - <td><font size="-1">2.5</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">4</font></td> - <td><font size="-1">7</font></td> - <td><font size="-1">32</font></td> - <td><font size="-1">2.5</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">3</font></td> - <td><font size="-1">5</font></td> - <td><font size="-1">47</font></td> - <td><font size="-1">2.5</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">3</font></td> - <td><font size="-1">6</font></td> - <td><font size="-1">47</font></td> - <td><font size="-1">2.5</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">3</font></td> - <td><font size="-1">7</font></td> - <td><font size="-1">47</font></td> - <td><font size="-1">2.5</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">3</font></td> - <td><font size="-1">6</font></td> - <td><font size="-1">116</font></td> - <td><font size="-1">2.5</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">3</font></td> - <td><font size="-1">10</font></td> - <td><font size="-1">116</font></td> - <td><font size="-1">15.0</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">7</font></td> - <td><font size="-1">11</font></td> - <td><font size="-1">75</font></td> - <td><font size="-1">17.5</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">7</font></td> - <td><font size="-1">20</font></td> - <td><font size="-1">75</font></td> - <td><font size="-1">10.0</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">2</font></td> - <td><font size="-1">15</font></td> - <td><font size="-1">105</font></td> - <td><font size="-1">7.25</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">2</font></td> - <td><font size="-1">10</font></td> - <td><font size="-1">105</font></td> - <td><font size="-1">15.0</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">2</font></td> - <td><font size="-1">13</font></td> - <td><font size="-1">105</font></td> - <td><font size="-1">7.25</font></td> - <td><font size="-1">0</font></td> - </tr> - <tr> - <td><font size="-1">2</font></td> - <td><font size="-1">18</font></td> - <td><font size="-1">105</font></td> - <td><font size="-1">8.0</font></td> - <td><font size="-1">0</font></td> - </tr> - </table> - <p> </p> <p><b><u><a name="calendar">Calendar</a></u></b></p> <p> --- 483,486 ---- |
|
From: todd r. <to...@us...> - 2005-03-30 16:01:25
|
Update of /cvsroot/pocolap/pocolap/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5012/web Added Files: InputData.html Log Message: html related to demo site --- NEW FILE: InputData.html --- <html> <head> <title>pocOLAP, the "little" OLAP Project - Input Data</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link type="text/css" rel="stylesheet" href="scripts/ReptGenStyle.css"/> </head> <body bgcolor="#FFFFFF" text="#000000"> <p><b><font size="+2">Data used for the Sample Database</font></b></p> <p>The data presented in the pocOLAP sample report is generated from the following tables:</p> <p><b><font size="+1"><a href="#cust">Customers</a><br> <a href="#sitems">SalableItems</a><br><a href="#sales">Sales</a><br><a href="#calendar">Calendar</a></font></b></p> <p><b><u><a name="cust">Customers</a></u></b></p> <table width="100%" border="1"> <tr> <td><b><font size="-1">CustomerID</font></b></td> <td><b><font size="-1">Number</font></b></td> <td><b><font size="-1">FirstName</font></b></td> [...2720 lines suppressed...] <tr> <td><font size="-1">161</font></td> <td><font size="-1">2003-06-07</font></td> <td><font size="-1">Saturday</font></td> <td><font size="-1">Sat</font></td> <td><font size="-1">6</font></td> <td><font size="-1">7</font></td> <td><font size="-1">June</font></td> <td><font size="-1">Jun</font></td> <td><font size="-1">6</font></td> <td><font size="-1">2003</font></td> <td><font size="-1">0</font></td> <td><font size="-1">1</font></td> </tr> </table> <p><br> </p> <p> </p> </body> </html> |
|
From: todd r. <to...@us...> - 2005-03-24 17:08:28
|
Update of /cvsroot/pocolap/pocolap/src/com/pocolap/servlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4972/src/com/pocolap/servlets Modified Files: HelperFactory.java SelectionHelper.java pocOLAPConstants.java Log Message: Fixed Bug 1169363 - Reset button doesn't work correctly Index: SelectionHelper.java =================================================================== RCS file: /cvsroot/pocolap/pocolap/src/com/pocolap/servlets/SelectionHelper.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SelectionHelper.java 22 Feb 2005 20:15:59 -0000 1.9 --- SelectionHelper.java 24 Mar 2005 17:08:19 -0000 1.10 *************** *** 78,82 **** action = pocOLAPConstants.ACTION_NEW; ! if(action.equalsIgnoreCase(pocOLAPConstants.ACTION_NEW)) { //Might want to make the clearAttributes method a //bit more selective - in the future, we may want --- 78,83 ---- action = pocOLAPConstants.ACTION_NEW; ! if(action.equalsIgnoreCase(pocOLAPConstants.ACTION_NEW) || ! action.equalsIgnoreCase(pocOLAPConstants.ACTION_RESET)) { //Might want to make the clearAttributes method a //bit more selective - in the future, we may want *************** *** 89,93 **** clearAttributes(req); crossTabName = (String)req.getParameter(pocOLAPConstants.ELEMENT_REPT_SELECTOR); ! crosstabdef =null; page = actionNew(crossTabName); --- 90,99 ---- clearAttributes(req); crossTabName = (String)req.getParameter(pocOLAPConstants.ELEMENT_REPT_SELECTOR); ! ! if (action.equalsIgnoreCase(pocOLAPConstants.ACTION_RESET) && ! currDefinition!=null){ ! crossTabName=currDefinition.getCrossTabDef().getRept().getName(); ! } ! crosstabdef =null; page = actionNew(crossTabName); Index: HelperFactory.java =================================================================== RCS file: /cvsroot/pocolap/pocolap/src/com/pocolap/servlets/HelperFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** HelperFactory.java 16 Mar 2005 20:56:29 -0000 1.8 --- HelperFactory.java 24 Mar 2005 17:08:19 -0000 1.9 *************** *** 39,43 **** ServletHelper s = null ; ! if (action.equalsIgnoreCase(pocOLAPConstants.ACTION_NEW)){ s = new SelectionHelper(); }else if(action.startsWith(pocOLAPConstants.ACTION_ACROSS_START)|| --- 39,44 ---- ServletHelper s = null ; ! if (action.equalsIgnoreCase(pocOLAPConstants.ACTION_NEW) || ! action.equalsIgnoreCase(pocOLAPConstants.ACTION_RESET)){ s = new SelectionHelper(); }else if(action.startsWith(pocOLAPConstants.ACTION_ACROSS_START)|| Index: pocOLAPConstants.java =================================================================== RCS file: /cvsroot/pocolap/pocolap/src/com/pocolap/servlets/pocOLAPConstants.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pocOLAPConstants.java 18 Mar 2005 15:53:12 -0000 1.7 --- pocOLAPConstants.java 24 Mar 2005 17:08:19 -0000 1.8 *************** *** 60,63 **** --- 60,64 ---- /*ACTIONs are values of the "action" parameter*/ public static final String ACTION_NEW = "new"; + public static final String ACTION_RESET = "reset"; public static final String ACTION_TEST = "test"; public static final String ACTION_DOWN_START = ELEMENT_SELECTOR_DOWN; |
|
From: todd r. <to...@us...> - 2005-03-24 17:08:28
|
Update of /cvsroot/pocolap/pocolap/src/jsps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4972/src/jsps Modified Files: ReptPage.jsp Log Message: Fixed Bug 1169363 - Reset button doesn't work correctly Index: ReptPage.jsp =================================================================== RCS file: /cvsroot/pocolap/pocolap/src/jsps/ReptPage.jsp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ReptPage.jsp 18 Mar 2005 15:53:12 -0000 1.9 --- ReptPage.jsp 24 Mar 2005 17:08:19 -0000 1.10 *************** *** 26,30 **** <p id="wait" style="text-align:center;font-size:14pt;font-family:san-serif;color:red">Please be patient while the report loads</p> <rept:reptgrid /> ! <input type="submit" value="reset" /> </form> </body> --- 26,30 ---- <p id="wait" style="text-align:center;font-size:14pt;font-family:san-serif;color:red">Please be patient while the report loads</p> <rept:reptgrid /> ! <input type="submit" value="reset" onclick="setAction('reset')" /> </form> </body> |
|
From: Rashmi B. <ra...@us...> - 2005-03-21 20:13:26
|
Update of /cvsroot/pocolap/pocolap/src/com/pocolap/servlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19298 Modified Files: SavedReportHelper.java Added Files: TestSavedReportHelper.java Log Message: changes for saved reports --- NEW FILE: TestSavedReportHelper.java --- /* * TestSavedReportHelper.java * Created on Mar 21, 2005 * Copyright (c) 2005 Rashmi Banthia Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.pocolap.servlets; import junit.framework.TestCase; import junit.framework.TestSuite ; import junit.framework.Test ; import com.pocolap.schema.CrossTabDef ; import com.pocolap.selectors.Selector ; import com.pocolap.xtab.filter.FilterList ; /** * @author Rashmi Banthia * */ public class TestSavedReportHelper extends TestCase { private String crosstabdefAsXML = "<crosstab xmlns=\"http://www.pocolap.com\"> "+ "<rept name=\"Sample SpreadSheet\" index=\"58\"> "+ " <!-- This is the config file for the Sample database that "+ " comes with pocolap. This should be placed in the "+ " pocolapDB/crosstabdefs directory if you would like "+ " to use the sample database. You may remove this "+ " file if you do not want to use the sample database."+ " --> "+ " <source classtype=\"com.pocolap.conn.PocOlapSampleDatabaseConnection\" driver=\"org.apache.derby.jdbc.EmbeddedDriver\" dbString=\"jdbc:derby:;databaseName=${}\"/> "+ " <measure name=\"Sold Items\" table=\"SALES\" key=\"AMOUNT\" function=\"sum\" /> "+ " <dimension name=\"Customers\" table=\"CUSTOMERS\" key=\"CUSTOMERID\" measureKey=\"CUSTOMERID\"> "+ " <group name=\"Customer\" defaultField=\"Customer Last Name\"> "+ " <field name=\"Customer Last Name\" key=\"LASTNAME\" /> "+ " <!-- other fields are to be used when formatting is implemented --> "+ " <field name=\"Customer Number\" key=\"CUSTOMERNUMBER\" /> "+ " <drilldown>Shoe Size</drilldown> "+ " </group> "+ " <group name=\"Customer Origin\" defaultField=\"Zip Code\"> "+ " <field name=\"Zip Code\" key=\"ZIP\" /> "+ " <field name=\"City\" key=\"CITY\" /> "+ " <drilldown>Customer</drilldown> "+ " </group> "+ " <group name=\"Shoe Size\"> "+ " <field name=\"Shoe Size\" key=\"SHOESIZE\" /> "+ " <field name=\"Size Type\" key=\"SIZINGGENDER\" /> "+ " <field name=\"Extra Width\" key=\"WIDESIZES\" /> "+ " </group> "+ " </dimension> "+ " <dimension name=\"Items to Sell\" table=\"SALABLEITEMS\" key=\"SALABLEITEMSID\" measureKey=\"SALABLEITEMSID\"> "+ " <group name=\"Stock Keeping Unit\"> "+ " <field name=\"SKU Value\" key=\"SKU\" /> "+ " <field name=\"Product Desription\" key=\"DESCRIPTION\" /> "+ " <field name=\"Product or Service\" key=\"ISPRODUCT\" /> "+ " <drilldown>Vendor</drilldown> "+ " </group> "+ " <group name=\"Vendor\"> "+ " <field name=\"Vendor Name\" key=\"VENDOR\" /> "+ " <field name=\"Vendor Number\" key=\"VENDORNUMBER\" /> "+ " <drilldown>Stock Keeping Unit</drilldown> "+ " </group> "+ " </dimension> "+ " <dimension name=\"Dates\" table=\"CALENDAR\" key=\"CALENDARID\" measureKey=\"CALENDARID\"> "+ " <group name=\"Sale Date\"> "+ " <field name=\"Date\" key=\"DAYDATE\" /> "+ " </group> "+ " <group name=\"Month\" defaultField=\"MONTH\"> "+ " <field name=\"Number of Month\" key=\"MONTHOFYEAR\" /> "+ " <field name=\"Month\" key=\"MONTHNAME\" /> "+ " <field name=\"Abbreviated Month\" key=\"MONTHABBREV\" /> "+ " <drilldown>Sale Date</drilldown> "+ " </group> "+ " <group name=\"Year\"> "+ " <field name=\"Year\" key=\""year"\" /> "+ " <drilldown>Month</drilldown> "+ " <drilldown>Sale Date</drilldown> "+ " </group> "+ " </dimension> "+ " <supplemental> "+ " <reporticon src=\"pocologo_tiny.jpg\" alt=\"The pocOLAP logo\" "+ " height=\"75\" width=\"75\" top=\"10\" left=\"10\" /> "+ " <description>This shows data stored in a Derby database</description> "+ " <link linktext=\"Learn more at the pocOLAP home page\" linkurl=\"http://pocolap.sourceforge.net\" /> "+ " </supplemental> "+ " </rept> " ; private String endtags = " </savedreport> </crosstab> " ; private String savedreportname= "Sample Saved Report" ; public TestSavedReportHelper(final String name){ super(name); } public void testSelectors(){ String savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <selector> "+ " <selectordimension across=\"Customers\" down=\"Items to Sell\" /> "+ " <across name=\"Customer Origin\" level=\"1\" /> "+ " <across name=\"Customer\" level=\"2\" /> "+ " <across name=\"Shoe Size\" level=\"3\" /> "+ " <down name=\"Vendor\" level=\"1\" /> "+ " <down name=\"Stock Keeping Unit\" level=\"2\" /> "+ " </selector> " ; CrossTabDef crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } SavedReportHelper s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); Selector acrossselector = s.acrossselector ; assertNotNull(acrossselector); assertEquals(acrossselector.getItemCount(),4); Selector downselector = s.downselector ; assertNotNull(downselector); assertEquals(downselector.getItemCount(),3); //In this tag there is a down attribute but no down elements. savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <selector> "+ " <selectordimension across=\"Customers\" down=\"Items to Sell\" /> "+ " <across name=\"Customer Origin\" level=\"1\" /> "+ " <across name=\"Customer\" level=\"2\" /> "+ " <across name=\"Shoe Size\" level=\"3\" /> "+ " </selector> " ; crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); acrossselector = s.acrossselector ; assertNotNull(acrossselector); assertEquals(acrossselector.getItemCount(),4); downselector = s.downselector ; assertNull(downselector); } public void testSelectorEmpty(){ String savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <selector> "+ " </selector> " ; CrossTabDef crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } SavedReportHelper s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); Selector acrossselector = s.acrossselector ; Selector downselector = s.downselector ; assertNull(acrossselector); assertNull(downselector); //In the following case the across attribute is absent, so the following across // elements will be ignored. savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <selector> "+ " <selectordimension down=\"Items to Sell\" /> "+ " <across name=\"Customer Origin\" level=\"1\" /> "+ " <across name=\"Customer\" level=\"2\" /> "+ " <across name=\"Shoe Size\" level=\"3\" /> "+ " <down name=\"Vendor\" level=\"1\" /> "+ " <down name=\"Stock Keeping Unit\" level=\"2\" /> "+ " </selector> " ; crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); acrossselector = s.acrossselector ; downselector = s.downselector ; assertNull(acrossselector); assertNotNull(downselector); assertEquals(downselector.getItemCount(),3); } public void testFilter(){ String savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <filter> "+ " <table name=\"Customers\"> "+ " <field name=\"Customer Last Name\" type=\"text\" > "+ " <matchlist>Hamm</matchlist> "+ " <matchlist>Weston</matchlist> "+ " <excludeMatchList/> "+ " <matchStrings/> "+ " <excludeMatchStrings/> "+ " <greaterThan>Barkley</greaterThan> "+ " <lessThan>Weston</lessThan> "+ " <combineWithAnd/> "+ " <range startvalue=\"Barkley\" endvalue=\"Weston\"/> "+ " </field> "+ " </table> "+ " </filter> " ; CrossTabDef crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } SavedReportHelper s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); Selector acrossselector = s.acrossselector ; Selector downselector = s.downselector ; assertNull(acrossselector); assertNull(downselector); FilterList[] filterlist = s.filterlist ; assertNotNull(filterlist); assertEquals(filterlist.length,1); assertEquals(filterlist[0].getName(),"Customers"); } public void testEmptyFilter(){ String savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <filter> "+ " </filter> " ; CrossTabDef crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } SavedReportHelper s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); Selector acrossselector = s.acrossselector ; Selector downselector = s.downselector ; assertNull(acrossselector); assertNull(downselector); FilterList[] filterlist = s.filterlist ; assertNull(filterlist); savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <filter> "+ " <table name=\"Customers\"> "+ " </table> "+ " </filter> " ; crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); acrossselector = s.acrossselector ; downselector = s.downselector ; assertNull(acrossselector); assertNull(downselector); filterlist = s.filterlist ; assertNotNull(filterlist); assertEquals(filterlist.length,1); assertNotNull(filterlist[0]); assertEquals(filterlist[0].getName(),"Customers"); savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <filter> "+ " <table name=\"Customers\"> "+ " <field name=\"Customer Last Name\" type=\"text\" > "+ " </field> "+ " </table> "+ " </filter> " ; crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); acrossselector = s.acrossselector ; downselector = s.downselector ; assertNull(acrossselector); assertNull(downselector); filterlist = s.filterlist ; assertNotNull(filterlist); assertEquals(filterlist.length,1); assertNull(filterlist[0]); } public void testSelectorFilter(){ String savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <selector> "+ " <selectordimension across=\"Customers\" down=\"Items to Sell\" /> "+ " <across name=\"Customer Origin\" level=\"1\" /> "+ " <across name=\"Customer\" level=\"2\" /> "+ " <across name=\"Shoe Size\" level=\"3\" /> "+ " <down name=\"Vendor\" level=\"1\" /> "+ " <down name=\"Stock Keeping Unit\" level=\"2\" /> "+ " </selector> "+ " <filter> "+ " <table name=\"Customers\"> "+ " <field name=\"Customer Last Name\" type=\"text\" > "+ " <matchlist>Hamm</matchlist> "+ " <matchlist>Weston</matchlist> "+ " <excludeMatchList/> "+ " <matchStrings/> "+ " <excludeMatchStrings/> "+ " <greaterThan>Barkley</greaterThan> "+ " <lessThan>Weston</lessThan> "+ " <combineWithAnd/> "+ " <range startvalue=\"Barkley\" endvalue=\"Weston\"/> "+ " </field> "+ " </table> "+ " </filter> " ; CrossTabDef crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } SavedReportHelper s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); Selector acrossselector = s.acrossselector ; Selector downselector = s.downselector ; assertNotNull(acrossselector); assertNotNull(downselector); FilterList[] filterlist = s.filterlist ; assertNotNull(filterlist); assertEquals(filterlist.length,1); assertEquals(filterlist[0].getName(),"Customers"); } public void testFilterNumber(){ String savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <filter> "+ " <table name=\"Customers\"> "+ " <field name=\"Shoe Size\" type=\"number\" > "+ " <greaterThan>2.0</greaterThan> "+ " <lessThan>10.0</lessThan> "+ " </field> "+ " </table> "+ " </filter> " ; CrossTabDef crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } SavedReportHelper s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); Selector acrossselector = s.acrossselector ; Selector downselector = s.downselector ; assertNull(acrossselector); assertNull(downselector); FilterList[] filterlist = s.filterlist ; assertNotNull(filterlist); assertEquals(filterlist.length,1); assertEquals(filterlist[0].getName(),"Customers"); } public void testFilterDate(){ String savedreport1 = "<savedreport name=\"Sample Saved Report\"> "+ " <filter> "+ " <table name=\"Dates\"> "+ " <field name=\"Date\" type=\"date\" > "+ " <range startvalue=\"2000-01-16\" endvalue=\"2005-03-16\" /> "+ " </field> "+ " </table> "+ " </filter> "; CrossTabDef crosstab = null ; try{ crosstab = CrossTabDef.Factory.parse(crosstabdefAsXML+savedreport1+endtags); } catch (Exception e){ e.printStackTrace(); } SavedReportHelper s = new SavedReportHelper(); s.actionLoadReport(crosstab,savedreportname); Selector acrossselector = s.acrossselector ; Selector downselector = s.downselector ; assertNull(acrossselector); assertNull(downselector); FilterList[] filterlist = s.filterlist ; assertNotNull(filterlist); assertEquals(filterlist.length,1); assertEquals(filterlist[0].getName(),"Dates"); } } Index: SavedReportHelper.java =================================================================== RCS file: /cvsroot/pocolap/pocolap/src/com/pocolap/servlets/SavedReportHelper.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SavedReportHelper.java 17 Mar 2005 20:04:48 -0000 1.2 --- SavedReportHelper.java 21 Mar 2005 20:13:15 -0000 1.3 *************** *** 111,127 **** if (sel!=null){ //Retrieving across dimension name ! dim = sel.getSelectordimension().getAcross() ; ! if (dim!=null){ ! AcrossItem[] acrossarr = sel.getAcrossArray(); ! if (acrossarr!=null && acrossarr.length > 0){ ! //Creating selector object ! selector = new Selector(currDefinition,DefinitionHelper.getDimension(currDefinition,dim)); ! ! for (int i = 0;i<acrossarr.length;i++){ ! GroupItem defgroup1 = DefinitionHelper.getGroup(DefinitionHelper.getDimension(currDefinition,dim),acrossarr[i].getName()); ! selector.addGroup(defgroup1); ! } ! } ! } } else { --- 111,129 ---- if (sel!=null){ //Retrieving across dimension name ! if (sel.getSelectordimension()!=null) { ! dim = sel.getSelectordimension().getAcross() ; ! if (dim!=null){ ! AcrossItem[] acrossarr = sel.getAcrossArray(); ! if (acrossarr!=null && acrossarr.length > 0){ ! //Creating selector object ! selector = new Selector(currDefinition,DefinitionHelper.getDimension(currDefinition,dim)); ! ! for (int i = 0;i<acrossarr.length;i++){ ! GroupItem defgroup1 = DefinitionHelper.getGroup(DefinitionHelper.getDimension(currDefinition,dim),acrossarr[i].getName()); ! selector.addGroup(defgroup1); ! } ! } ! } ! } } else { *************** *** 141,155 **** if (sel!=null){ //Retrieving down dimension name ! dim = sel.getSelectordimension().getDown() ; ! if (dim!=null){ ! DownItem[] downarr = sel.getDownArray(); ! if (downarr!=null && downarr.length > 0 ){ ! dnselector = new Selector(currDefinition,DefinitionHelper.getDimension(currDefinition,dim)); ! for (int i = 0;i<downarr.length;i++){ ! GroupItem defgroup1 = DefinitionHelper.getGroup(DefinitionHelper.getDimension(currDefinition,dim),downarr[i].getName()); ! dnselector.addGroup(defgroup1); ! } ! } ! } } else { --- 143,159 ---- if (sel!=null){ //Retrieving down dimension name ! if (sel.getSelectordimension()!=null) { ! dim = sel.getSelectordimension().getDown() ; ! if (dim!=null){ ! DownItem[] downarr = sel.getDownArray(); ! if (downarr!=null && downarr.length > 0 ){ ! dnselector = new Selector(currDefinition,DefinitionHelper.getDimension(currDefinition,dim)); ! for (int i = 0;i<downarr.length;i++){ ! GroupItem defgroup1 = DefinitionHelper.getGroup(DefinitionHelper.getDimension(currDefinition,dim),downarr[i].getName()); ! dnselector.addGroup(defgroup1); ! } ! } ! } ! } } else { *************** *** 169,177 **** TableItem[] tablearr = filter.getTableArray(); if (tablearr!=null && tablearr.length > 0) { ! flist = new FilterList[tablearr.length]; ! for (int i=0;i<tablearr.length;i++){ String tablename = tablearr[i].getName(); FilterFieldItem[] filterfieldarr = tablearr[i].getFieldArray(); ! FilterList list=new FilterList(tablename); for (int j=0;j<filterfieldarr.length;j++){ String fieldname = filterfieldarr[j].getName(); --- 173,181 ---- TableItem[] tablearr = filter.getTableArray(); if (tablearr!=null && tablearr.length > 0) { ! flist = new FilterList[tablearr.length]; ! for (int i=0;i<tablearr.length;i++){ String tablename = tablearr[i].getName(); FilterFieldItem[] filterfieldarr = tablearr[i].getFieldArray(); ! FilterList list= new FilterList(tablename); for (int j=0;j<filterfieldarr.length;j++){ String fieldname = filterfieldarr[j].getName(); *************** *** 212,215 **** --- 216,221 ---- if (!FilterUtilities.isFieldFilterEmpty(filter1)) list.add(filter1); + if (list.isEmpty()) + list=null; } flist[i] = list ; *************** *** 220,224 **** else { logger.debug(errclass+" No saved filters found! "); ! } return flist ; } --- 226,248 ---- else { logger.debug(errclass+" No saved filters found! "); ! } ! ! /*int count = 0; ! for (int i = 0 ; i<flist.length;i++){ ! if (flist[i]!=null) { ! count++; ! } ! } ! FilterList[] tmp = null; ! if (count>0){ ! tmp = new FilterList[count+1]; ! for (int i=0,j=0;i<flist.length;i++){ ! if (flist[i]!=null) { ! tmp[j++]=flist[i]; ! } ! } ! } ! flist = tmp ; ! */ return flist ; } |