You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
|
Sep
(46) |
Oct
(102) |
Nov
(10) |
Dec
(21) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(1) |
Feb
(3) |
Mar
(14) |
Apr
(9) |
May
(12) |
Jun
(4) |
Jul
(40) |
Aug
(60) |
Sep
(38) |
Oct
(2) |
Nov
(1) |
Dec
(42) |
2008 |
Jan
(23) |
Feb
(29) |
Mar
(107) |
Apr
(27) |
May
(3) |
Jun
(1) |
Jul
(15) |
Aug
(7) |
Sep
(19) |
Oct
|
Nov
(2) |
Dec
|
2009 |
Jan
(36) |
Feb
(4) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(15) |
Jul
(30) |
Aug
(32) |
Sep
(11) |
Oct
(21) |
Nov
(12) |
Dec
(15) |
2010 |
Jan
(29) |
Feb
(9) |
Mar
(25) |
Apr
|
May
(7) |
Jun
(5) |
Jul
(21) |
Aug
(32) |
Sep
(10) |
Oct
(8) |
Nov
(29) |
Dec
(8) |
2011 |
Jan
(9) |
Feb
(35) |
Mar
(11) |
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(30) |
2012 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <mwl...@us...> - 2010-03-19 18:40:26
|
Revision: 1052 http://cishell.svn.sourceforge.net/cishell/?rev=1052&view=rev Author: mwlinnem Date: 2010-03-19 18:40:20 +0000 (Fri, 19 Mar 2010) Log Message: ----------- Hopefully fixes problem with not building the database feature. Modified Paths: -------------- trunk/deployment/org.cishell.reference.releng/build-files/allElements.xml Modified: trunk/deployment/org.cishell.reference.releng/build-files/allElements.xml =================================================================== --- trunk/deployment/org.cishell.reference.releng/build-files/allElements.xml 2010-03-18 20:45:49 UTC (rev 1051) +++ trunk/deployment/org.cishell.reference.releng/build-files/allElements.xml 2010-03-19 18:40:20 UTC (rev 1052) @@ -22,6 +22,10 @@ <property name="type" value="feature" /> <property name="id" value="org.cishell.reference.gui.feature" /> </ant> + <ant antfile="${genericTargets}" target="${target}"> + <property name="type" value="feature" /> + <property name="id" value="org.cishell.reference.database.feature" /> + </ant> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-03-18 20:45:56
|
Revision: 1051 http://cishell.svn.sourceforge.net/cishell/?rev=1051&view=rev Author: mwlinnem Date: 2010-03-18 20:45:49 +0000 (Thu, 18 Mar 2010) Log Message: ----------- This should switch the build to using Java 1.4 Modified Paths: -------------- trunk/deployment/org.cishell.reference.releng/build-files/build.properties Modified: trunk/deployment/org.cishell.reference.releng/build-files/build.properties =================================================================== --- trunk/deployment/org.cishell.reference.releng/build-files/build.properties 2010-03-17 20:11:38 UTC (rev 1050) +++ trunk/deployment/org.cishell.reference.releng/build-files/build.properties 2010-03-18 20:45:49 UTC (rev 1051) @@ -96,10 +96,10 @@ javacFailOnError=true # The version of the source code -javacSource=1.4 +javacSource=1.5 # The version of the byte code targeted -javacTarget=1.4 +javacTarget=1.5 #collPlace=eclipse #collBase=. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-17 20:11:45
|
Revision: 1050 http://cishell.svn.sourceforge.net/cishell/?rev=1050&view=rev Author: pataphil Date: 2010-03-17 20:11:38 +0000 (Wed, 17 Mar 2010) Log Message: ----------- * Added org.cishell.utilities.ProgressMonitorUtilities. * Reviewed by Micah. Modified Paths: -------------- trunk/core/org.cishell.utilities/META-INF/MANIFEST.MF Added Paths: ----------- trunk/core/org.cishell.utilities/src/org/cishell/utilities/ProgressMonitorUtilities.java Modified: trunk/core/org.cishell.utilities/META-INF/MANIFEST.MF =================================================================== --- trunk/core/org.cishell.utilities/META-INF/MANIFEST.MF 2010-03-16 22:42:41 UTC (rev 1049) +++ trunk/core/org.cishell.utilities/META-INF/MANIFEST.MF 2010-03-17 20:11:38 UTC (rev 1050) @@ -22,9 +22,9 @@ prefuse.data.util, prefuse.util, prefuse.util.collections -Export-Package: org.cishell.utilities, - org.cishell.utilities.dictionary, - org.cishell.utilities.database, +Export-Package: org.cishell.utilities, + org.cishell.utilities.database, + org.cishell.utilities.dictionary, org.cishell.utilities.mutateParameter, org.cishell.utilities.mutateParameter.defaultvalue, org.cishell.utilities.mutateParameter.dropdown, Added: trunk/core/org.cishell.utilities/src/org/cishell/utilities/ProgressMonitorUtilities.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/ProgressMonitorUtilities.java (rev 0) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/ProgressMonitorUtilities.java 2010-03-17 20:11:38 UTC (rev 1050) @@ -0,0 +1,27 @@ +package org.cishell.utilities; + +import org.cishell.framework.algorithm.AlgorithmCanceledException; +import org.cishell.framework.algorithm.ProgressMonitor; + +public class ProgressMonitorUtilities { + public static void handleCanceledAlgorithm(ProgressMonitor progressMonitor) + throws AlgorithmCanceledException { + if (progressMonitor.isCanceled()) { + throw new AlgorithmCanceledException(); + } + } + + public static void handlePausedAlgorithm(ProgressMonitor progressMonitor) { + while (progressMonitor.isPaused()) { + try { + Thread.sleep(1); + } catch (InterruptedException e) {} + } + } + + public static void handleCanceledOrPausedAlgorithm(ProgressMonitor progressMonitor) + throws AlgorithmCanceledException { + handleCanceledAlgorithm(progressMonitor); + handlePausedAlgorithm(progressMonitor); + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-03-16 22:42:46
|
Revision: 1049 http://cishell.svn.sourceforge.net/cishell/?rev=1049&view=rev Author: mwlinnem Date: 2010-03-16 22:42:41 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added hsqldb and derbylib. Maybe THIS will fix the CIShell build. Modified Paths: -------------- trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml Modified: trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml =================================================================== --- trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml 2010-03-16 22:37:00 UTC (rev 1048) +++ trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml 2010-03-16 22:42:41 UTC (rev 1049) @@ -89,7 +89,19 @@ <param name="element.id" value="commons_pool"/> <param name="project.name" value="/libs/commons_pool"/> <param name="url" value="https://cishell.svn.sourceforge.net/svnroot/cishell/trunk"/> - </antcall> + </antcall> + <antcall target="svn.co"> + <param name="target" value="plugins"/> + <param name="element.id" value="derbylib"/> + <param name="project.name" value="/libs/derbylib"/> + <param name="url" value="https://cishell.svn.sourceforge.net/svnroot/cishell/trunk"/> + </antcall> + <antcall target="svn.co"> + <param name="target" value="plugins"/> + <param name="element.id" value="hsqldb"/> + <param name="project.name" value="/libs/hsqldb"/> + <param name="url" value="https://cishell.svn.sourceforge.net/svnroot/cishell/trunk"/> + </antcall> <antcall target="svn.co"> <param name="target" value="plugins"/> <param name="element.id" value="cern.colt"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-03-16 22:37:07
|
Revision: 1048 http://cishell.svn.sourceforge.net/cishell/?rev=1048&view=rev Author: mwlinnem Date: 2010-03-16 22:37:00 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added missing commons_dbcp and commons_pool dependencies. Could this solve the build problem entirely? Modified Paths: -------------- trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml Modified: trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml =================================================================== --- trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml 2010-03-16 22:04:02 UTC (rev 1047) +++ trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml 2010-03-16 22:37:00 UTC (rev 1048) @@ -78,6 +78,18 @@ <param name="project.name" value="/libs/org.apache.commons.collections"/> <param name="url" value="https://cishell.svn.sourceforge.net/svnroot/cishell/trunk"/> </antcall> + <antcall target="svn.co"> + <param name="target" value="plugins"/> + <param name="element.id" value="commons_dbcp"/> + <param name="project.name" value="/libs/commons_dbcp"/> + <param name="url" value="https://cishell.svn.sourceforge.net/svnroot/cishell/trunk"/> + </antcall> + <antcall target="svn.co"> + <param name="target" value="plugins"/> + <param name="element.id" value="commons_pool"/> + <param name="project.name" value="/libs/commons_pool"/> + <param name="url" value="https://cishell.svn.sourceforge.net/svnroot/cishell/trunk"/> + </antcall> <antcall target="svn.co"> <param name="target" value="plugins"/> <param name="element.id" value="cern.colt"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
Revision: 1047 http://cishell.svn.sourceforge.net/cishell/?rev=1047&view=rev Author: mwlinnem Date: 2010-03-16 22:04:02 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added echo to report what feature the build process is building. A bold new commit where no CIShell developer has committed before (or at least, not in a long time). Modified Paths: -------------- trunk/deployment/org.cishell.reference.releng.eclipse/eclipse/plugins/org.eclipse.pde.build_3.3.2.R331_v20071019/scripts/productBuild/productBuild.xml Modified: trunk/deployment/org.cishell.reference.releng.eclipse/eclipse/plugins/org.eclipse.pde.build_3.3.2.R331_v20071019/scripts/productBuild/productBuild.xml =================================================================== --- trunk/deployment/org.cishell.reference.releng.eclipse/eclipse/plugins/org.eclipse.pde.build_3.3.2.R331_v20071019/scripts/productBuild/productBuild.xml 2010-03-16 18:16:57 UTC (rev 1046) +++ trunk/deployment/org.cishell.reference.releng.eclipse/eclipse/plugins/org.eclipse.pde.build_3.3.2.R331_v20071019/scripts/productBuild/productBuild.xml 2010-03-16 22:04:02 UTC (rev 1047) @@ -37,6 +37,7 @@ <!-- already, use preSetup or postSetup to fetch it if necessary --> <!-- ===================================================================== --> <target name="generateFeature"> + <echo message="building the features '%{featureList}'"/> <eclipse.generateFeature featureId="org.eclipse.pde.build.container.feature" buildDirectory="${buildDirectory}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-03-16 18:17:15
|
Revision: 1046 http://cishell.svn.sourceforge.net/cishell/?rev=1046&view=rev Author: mwlinnem Date: 2010-03-16 18:16:57 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added google collections. Modified Paths: -------------- trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml Modified: trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml =================================================================== --- trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml 2010-03-16 18:14:54 UTC (rev 1045) +++ trunk/deployment/org.cishell.reference.releng/build-files/fetchSvnAll.xml 2010-03-16 18:16:57 UTC (rev 1046) @@ -176,6 +176,13 @@ <param name="url" value="https://cishell.svn.sourceforge.net/svnroot/cishell/trunk"/> </antcall> + <antcall target="svn.co"> + <param name="target" value="plugins"/> + <param name="element.id" value="google-collections"/> + <param name="project.name" value="/libs/google-collections"/> + <param name="url" value="https://cishell.svn.sourceforge.net/svnroot/cishell/trunk"/> + </antcall> + <antcall target="svn.co"> <param name="target" value="plugins"/> <param name="element.id" value="org.cishell.reference.service.database"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-03-16 18:15:01
|
Revision: 1045 http://cishell.svn.sourceforge.net/cishell/?rev=1045&view=rev Author: mwlinnem Date: 2010-03-16 18:14:54 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Added google collections and cishell utilities to database feature. Modified Paths: -------------- trunk/deployment/org.cishell.reference.database.feature/feature.xml Modified: trunk/deployment/org.cishell.reference.database.feature/feature.xml =================================================================== --- trunk/deployment/org.cishell.reference.database.feature/feature.xml 2010-03-16 18:12:10 UTC (rev 1044) +++ trunk/deployment/org.cishell.reference.database.feature/feature.xml 2010-03-16 18:14:54 UTC (rev 1045) @@ -81,4 +81,17 @@ install-size="0" version="0.0.0"/> + <plugin + id="org.cishell.utilities" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="google_collections" + download-size="0" + install-size="0" + version="0.0.0"/> + </feature> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-03-16 18:12:18
|
Revision: 1044 http://cishell.svn.sourceforge.net/cishell/?rev=1044&view=rev Author: mwlinnem Date: 2010-03-16 18:12:10 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Moving google collections to CIShell repository because org.cishell.utilities depends on it. Added Paths: ----------- trunk/libs/google-collections/.classpath trunk/libs/google-collections/.project trunk/libs/google-collections/META-INF/ trunk/libs/google-collections/META-INF/MANIFEST.MF trunk/libs/google-collections/build.properties trunk/libs/google-collections/google-collect-1.0.jar Added: trunk/libs/google-collections/.classpath =================================================================== --- trunk/libs/google-collections/.classpath (rev 0) +++ trunk/libs/google-collections/.classpath 2010-03-16 18:12:10 UTC (rev 1044) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry exported="true" kind="lib" path="google-collect-1.0.jar"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: trunk/libs/google-collections/.project =================================================================== --- trunk/libs/google-collections/.project (rev 0) +++ trunk/libs/google-collections/.project 2010-03-16 18:12:10 UTC (rev 1044) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>google-collections</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: trunk/libs/google-collections/META-INF/MANIFEST.MF =================================================================== --- trunk/libs/google-collections/META-INF/MANIFEST.MF (rev 0) +++ trunk/libs/google-collections/META-INF/MANIFEST.MF 2010-03-16 18:12:10 UTC (rev 1044) @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Google_collections +Bundle-SymbolicName: google_collections +Bundle-Version: 1.0.0 +Bundle-ClassPath: google-collect-1.0.jar +Export-Package: com.google.common.annotations, + com.google.common.base, + com.google.common.base.internal, + com.google.common.collect +Bundle-RequiredExecutionEnvironment: J2SE-1.5 Added: trunk/libs/google-collections/build.properties =================================================================== --- trunk/libs/google-collections/build.properties (rev 0) +++ trunk/libs/google-collections/build.properties 2010-03-16 18:12:10 UTC (rev 1044) @@ -0,0 +1,2 @@ +bin.includes = META-INF/,\ + google-collect-1.0.jar Added: trunk/libs/google-collections/google-collect-1.0.jar =================================================================== (Binary files differ) Property changes on: trunk/libs/google-collections/google-collect-1.0.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-03-16 18:10:28
|
Revision: 1043 http://cishell.svn.sourceforge.net/cishell/?rev=1043&view=rev Author: mwlinnem Date: 2010-03-16 18:10:18 +0000 (Tue, 16 Mar 2010) Log Message: ----------- Initial import. Added Paths: ----------- trunk/libs/google-collections/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sz...@us...> - 2010-03-10 11:49:48
|
Revision: 1042 http://cishell.svn.sourceforge.net/cishell/?rev=1042&view=rev Author: szasziz Date: 2010-03-10 11:49:40 +0000 (Wed, 10 Mar 2010) Log Message: ----------- Modified Paths: -------------- trunk/clients/gui/org.cishell.reference.gui.brand.cishell/plugin.xml Modified: trunk/clients/gui/org.cishell.reference.gui.brand.cishell/plugin.xml =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.brand.cishell/plugin.xml 2010-03-03 21:47:35 UTC (rev 1041) +++ trunk/clients/gui/org.cishell.reference.gui.brand.cishell/plugin.xml 2010-03-10 11:49:40 UTC (rev 1042) @@ -54,6 +54,19 @@ relative="org.cishell.reference.gui.log.LogView" visible="true"/> </perspectiveExtension> + + <perspectiveExtension + targetID="org.cishell.reference.gui.workspace.Perspective"> + <view + closeable="false" + id="org.cishell.reference.gui.workflow.WorkflowView" + moveable="true" + ratio="0.75" + relationship="top" + relative="org.cishell.reference.gui.log.LogView" + visible="true"> + </view> + </perspectiveExtension> <perspectiveExtension targetID="org.cishell.reference.gui.workspace.Perspective"> <view id="org.cishell.reference.gui.datamanager.DataManagerView" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-03-03 21:47:48
|
Revision: 1041 http://cishell.svn.sourceforge.net/cishell/?rev=1041&view=rev Author: pataphil Date: 2010-03-03 21:47:35 +0000 (Wed, 03 Mar 2010) Log Message: ----------- * Added NumberUtilities.roundToNDecimalPlaces(). * Cleaned up/refactored TableUtilities and added TableUtilities.extractDoubleFromCell(). * Finally had LogMessageHandler reviewed and refactored to be more straightforward. * Reviewed by Joseph. Modified Paths: -------------- trunk/core/org.cishell.utilities/src/org/cishell/utilities/NumberUtilities.java trunk/core/org.cishell.utilities/src/org/cishell/utilities/TableUtilities.java trunk/core/org.cishell.utilities/src/org/cishell/utilities/osgi/logging/LogMessageHandler.java Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/NumberUtilities.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/NumberUtilities.java 2010-02-23 18:33:04 UTC (rev 1040) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/NumberUtilities.java 2010-03-03 21:47:35 UTC (rev 1041) @@ -133,6 +133,13 @@ } } + public static double roundToNDecimalPlaces(double original, int decimalPlaceCount) { + String formatString = "#." + StringUtilities.multiply("#", decimalPlaceCount); + DecimalFormat format = new DecimalFormat(formatString); + + return Double.valueOf(format.format(original)); + } + public static boolean isEven(long number) { return ((number % 2) == 0); } Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/TableUtilities.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/TableUtilities.java 2010-02-23 18:33:04 UTC (rev 1040) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/TableUtilities.java 2010-03-03 21:47:35 UTC (rev 1041) @@ -11,125 +11,145 @@ import prefuse.util.collections.IntIterator; public class TableUtilities { - public static String[] filterSchemaColumnNamesByClass - (Schema schema, Class objectClass) throws ColumnNotFoundException - { - ArrayList workingColumnNames = new ArrayList(); + public static Table copyTable(Table oldTable) { + Schema oldSchema = oldTable.getSchema(); + Table newTable = oldSchema.instantiate(); + + for (Iterator rowIt = oldTable.tuples(); rowIt.hasNext();) { + Tuple row = (Tuple) rowIt.next(); + newTable.addTuple(row); + } + + return newTable; + } - for (int ii = 0; ii < schema.getColumnCount(); ii++) { - if (objectClass.isAssignableFrom(schema.getColumnType(ii))) - workingColumnNames.add(schema.getColumnName(ii)); + public static Table copyNRowsFromTableUsingIntIterator( + Table originalTable, IntIterator iterator, int topN, boolean isDescending) + { + // TODO: Add a couple comments in this method + + Schema tableSchema = originalTable.getSchema(); + final int numTableRows = originalTable.getRowCount(); + Table newTable = createTableUsingSchema(tableSchema); + final int numRowsToCopy = Math.min(numTableRows, topN); + int[] originalTableRowsToCopy = new int [numTableRows]; + + newTable.addRows(numRowsToCopy); + + for (int ii = 0; ii < numTableRows; ii++) { + originalTableRowsToCopy[ii] = iterator.nextInt(); } + + // TODO: Comment the side-effects here - if (workingColumnNames.size() == 0) { - throw new ColumnNotFoundException - ("No column of type " + objectClass.getName() + " was found."); + if (!isDescending) { + for (int ii = 0; ii < numRowsToCopy; ii++) { + copyTableRow(ii, originalTableRowsToCopy[ii], newTable, originalTable); + } } + else { + for (int ii = 0; ii < numRowsToCopy; ii++) { + copyTableRow( + ii, originalTableRowsToCopy[numTableRows - ii - 1], newTable, originalTable); + } + } - String[] finalColumnNames = new String [workingColumnNames.size()]; + return newTable; + } - return (String[])workingColumnNames.toArray(finalColumnNames); + public static void copyTableRow( + int newTableRow, int originalTableRow, Table newTable, Table originalTable) + { + final int numTableColumns = originalTable.getColumnCount(); + + for (int ii = 0; ii < numTableColumns; ii++) + newTable.set(newTableRow, ii, originalTable.get(originalTableRow, ii)); } - - public static List getAllColumnNames(Schema schema) - throws ColumnNotFoundException { - List workingColumnNames = new ArrayList(); - + + public static List<String> getAllColumnNames(Schema schema) throws ColumnNotFoundException { + List<String> workingColumnNames = new ArrayList<String>(); + for (int ii = 0; ii < schema.getColumnCount(); ii++) { workingColumnNames.add(schema.getColumnName(ii)); } if (workingColumnNames.size() == 0) { - throw new ColumnNotFoundException - ("No columns found in the schema."); + throw new ColumnNotFoundException("No columns found in the schema."); } return workingColumnNames; } - - public static String formNonConflictingNewColumnName( - Schema schema, String suggestedColumnName) + + public static String[] getValidStringColumnNamesInTable(Table table) throws ColumnNotFoundException { - List workingColumnNames = getAllColumnNames(schema); - - if(!workingColumnNames.contains(suggestedColumnName)) { - return suggestedColumnName; - } - else { - int columnNameSuffix = 1; - while(true) { - String newColumnName = - suggestedColumnName.concat("_" + columnNameSuffix); - if(!workingColumnNames.contains(newColumnName)) { - return newColumnName; - } - columnNameSuffix++; - } - } + return filterSchemaColumnNamesByClass(table.getSchema(), String.class); + } + + public static String[] getValidNumberColumnNamesInTable(Table table) + throws ColumnNotFoundException { + Class<?>[] possibleNumberClasses = { + byte.class, + byte[].class, + Byte.class, + Byte[].class, + short.class, + short[].class, + Short.class, + Short[].class, + int.class, + int[].class, + Integer.class, + Integer[].class, + long.class, + long[].class, + Long.class, + Long[].class, + float.class, + float[].class, + Float.class, + Float[].class, + double.class, + double[].class, + Double.class, + Double[].class + }; + + return filterSchemaColumnNamesByClasses(table.getSchema(), possibleNumberClasses); } - - public static String formNonConflictingNewColumnName( - Schema schema, String[] suggestedColumnNames) + + public static String[] getValidIntegerColumnNamesInTable(Table table) throws ColumnNotFoundException { - List workingColumnNames = getAllColumnNames(schema); + Class<?>[] possibleIntegerClasses = { + int.class, + Integer.class, + int[].class, + Integer[].class + }; + + return filterSchemaColumnNamesByClasses(table.getSchema(), possibleIntegerClasses); + } - boolean suggestedNameFound = false; - for(int suggestedNameIndex = 0; suggestedNameIndex < suggestedColumnNames.length; suggestedNameIndex++) { - for(int i = 0; i < workingColumnNames.size(); i++) { - if(workingColumnNames.get(i).toString().equalsIgnoreCase(suggestedColumnNames[suggestedNameIndex])) { - suggestedNameFound = true; - break; - } - } - /* - * To ensure that whenever a suggested name is found in the original column schema, create a name. - * */ - if(suggestedNameFound) { - break; - } - } + public static String[] getValidDateColumnNamesInTable(Table table) + throws ColumnNotFoundException { + Class<?>[] possibleDateClasses = { + Date.class, + int.class, + Integer.class, + String.class, + int[].class, + Integer[].class, + String[].class, + }; - /* - * If none of the suggested names are conflicting then return the first suggested name. - * */ - if(!suggestedNameFound) { - return suggestedColumnNames[0]; - } + return filterSchemaColumnNamesByClasses(table.getSchema(), possibleDateClasses); + } - /* - * This part of code will be executed only if the suggested names are already present in the - * column schema. - * */ - boolean newColumnNameFound = false; - int columnNameSuffix = 2; - while(true) { - /* - * The pattern for new names will be taken from the first suggested column name. - * */ - String newColumnName = - suggestedColumnNames[0].concat("_" + columnNameSuffix); - for(int i = 0; i < workingColumnNames.size(); i++) { - if(workingColumnNames.get(i).toString().equalsIgnoreCase(newColumnName)) { - newColumnNameFound = true; - break; - } - } - if(!newColumnNameFound) { - return newColumnName; - } - columnNameSuffix++; - } - } - - public static String[] filterSchemaColumnNamesByClasses - (Schema schema, Class[] objectClasses) throws ColumnNotFoundException - { - ArrayList workingColumnNames = new ArrayList(); + public static String[] filterSchemaColumnNamesByClasses( + Schema schema, Class<?>[] objectClasses) throws ColumnNotFoundException { + ArrayList<String> workingColumnNames = new ArrayList<String>(); for (int ii = 0; ii < schema.getColumnCount(); ii++) { - for (int jj = 0; jj < objectClasses.length; jj++) { - Class objectClass = objectClasses[jj]; - + for (Class<?> objectClass : objectClasses) { if (objectClass.isAssignableFrom(schema.getColumnType(ii))) { workingColumnNames.add(schema.getColumnName(ii)); @@ -142,9 +162,8 @@ String[] finalColumnNames = new String [workingColumnNames.size()]; return (String[])workingColumnNames.toArray(finalColumnNames); - } - // An exception is thrown if there is not at least 1 column name. - else { + } else { + // An exception is thrown if there is not at least 1 column name. StringBuffer objectClassesString = new StringBuffer(); objectClassesString.append("["); @@ -158,79 +177,108 @@ objectClassesString.append("]"); - throw new ColumnNotFoundException - ("No column of types " + objectClassesString + " was found."); + throw new ColumnNotFoundException( + "No column of types " + objectClassesString + " was found."); } } - - public static String[] getValidStringColumnNamesInTable(Table table) - throws ColumnNotFoundException - { - return filterSchemaColumnNamesByClass(table.getSchema(), String.class); - } - - public static String[] getValidDateColumnNamesInTable(Table table) - throws ColumnNotFoundException - { - Class[] possibleDateClasses = { - Date.class, - int.class, - Integer.class, - String.class, - int[].class, - Integer[].class, - String[].class, - }; + + public static String[] filterSchemaColumnNamesByClass(Schema schema, Class<?> objectClass) + throws ColumnNotFoundException { + ArrayList<String> workingColumnNames = new ArrayList<String>(); + + for (int ii = 0; ii < schema.getColumnCount(); ii++) { + if (objectClass.isAssignableFrom(schema.getColumnType(ii))) + workingColumnNames.add(schema.getColumnName(ii)); + } - return filterSchemaColumnNamesByClasses(table.getSchema(), - possibleDateClasses); - } - - public static String[] getValidIntegerColumnNamesInTable(Table table) - throws ColumnNotFoundException - { - Class[] possibleIntegerClasses = { - int.class, - Integer.class, - int[].class, - Integer[].class - }; - - return filterSchemaColumnNamesByClasses(table.getSchema(), - possibleIntegerClasses); - } + if (workingColumnNames.size() == 0) { + throw new ColumnNotFoundException( + "No column of type " + objectClass.getName() + " was found."); + } + + String[] finalColumnNames = new String [workingColumnNames.size()]; + + return (String[])workingColumnNames.toArray(finalColumnNames); + } - public static String[] getValidNumberColumnNamesInTable(Table table) + public static String formNonConflictingNewColumnName(Schema schema, String suggestedColumnName) throws ColumnNotFoundException { - Class[] possibleNumberClasses = { - byte.class, - byte[].class, - Byte.class, - Byte[].class, - short.class, - short[].class, - Short.class, - Short[].class, - int.class, - int[].class, - Integer.class, - Integer[].class, - long.class, - long[].class, - Long.class, - Long[].class, - float.class, - float[].class, - Float.class, - Float[].class, - double.class, - double[].class, - Double.class, - Double[].class - }; + List<String> workingColumnNames = getAllColumnNames(schema); + + if (!workingColumnNames.contains(suggestedColumnName)) { + return suggestedColumnName; + } else { + int columnNameSuffix = 1; + + while(true) { + String newColumnName = suggestedColumnName.concat("_" + columnNameSuffix); + + if (!workingColumnNames.contains(newColumnName)) { + return newColumnName; + } + + columnNameSuffix++; + } + } + } + + public static String formNonConflictingNewColumnName( + Schema schema, String[] suggestedColumnNames) throws ColumnNotFoundException { + List<String> workingColumnNames = getAllColumnNames(schema); + boolean suggestedNameFound = false; + + for (String suggestedName : suggestedColumnNames) { + for (String workingColumnName : workingColumnNames) { + if (workingColumnName.equalsIgnoreCase(suggestedName)) { + suggestedNameFound = true; + + break; + } + } + + /* + * To ensure that whenever a suggested name is found in the original column schema, + * create a name. + */ + if (suggestedNameFound) { + break; + } + } - return filterSchemaColumnNamesByClasses(table.getSchema(), - possibleNumberClasses); + /* + * If none of the suggested names are conflicting then return the first suggested name. + */ + if(!suggestedNameFound) { + return suggestedColumnNames[0]; + } + + /* + * This part of code will be executed only if the suggested names are already present in + * the column schema. + */ + boolean newColumnNameFound = false; + int columnNameSuffix = 2; + + while(true) { + /* + * The pattern for new names will be taken from the first suggested column name. + */ + String newColumnName = suggestedColumnNames[0].concat("_" + columnNameSuffix); + + for (String workingColumnName : workingColumnNames) { + if (workingColumnName.equalsIgnoreCase(newColumnName)) { + newColumnNameFound = true; + + break; + } + } + + if (!newColumnNameFound) { + return newColumnName; + } + + columnNameSuffix++; + } } /** @@ -241,73 +289,16 @@ Table table = new Table(); for (int ii = 0; ii < numTableColumns; ii++) { - table.addColumn(tableSchema.getColumnName(ii), - tableSchema.getColumnType(ii)); + table.addColumn(tableSchema.getColumnName(ii), tableSchema.getColumnType(ii)); } return table; } - - public static void copyTableRow(int newTableRow, - int originalTableRow, - Table newTable, - Table originalTable) - { - final int numTableColumns = originalTable.getColumnCount(); - - for (int ii = 0; ii < numTableColumns; ii++) - newTable.set(newTableRow, ii, originalTable.get(originalTableRow, ii)); - } - - public static Table - copyNRowsFromTableUsingIntIterator(Table originalTable, - IntIterator iterator, - int topN, - boolean isDescending) - { - // TODO: Add a couple comments in this method - - Schema tableSchema = originalTable.getSchema(); - final int numTableRows = originalTable.getRowCount(); - Table newTable = createTableUsingSchema(tableSchema); - final int numRowsToCopy = Math.min(numTableRows, topN); - int[] originalTableRowsToCopy = new int [numTableRows]; - - newTable.addRows(numRowsToCopy); - - for (int ii = 0; ii < numTableRows; ii++) - originalTableRowsToCopy[ii] = iterator.nextInt(); - // TODO: Comment the side-effects here - - if (!isDescending) { - for (int ii = 0; ii < numRowsToCopy; ii++) { - copyTableRow - (ii, originalTableRowsToCopy[ii], newTable, originalTable); - } - } - else { - for (int ii = 0; ii < numRowsToCopy; ii++) - { - copyTableRow(ii, - originalTableRowsToCopy[numTableRows - ii - 1], - newTable, - originalTable); - } - } + public static double extractDoubleFromCell(Tuple row, String columnName) + throws NumberFormatException { + double value = NumberUtilities.interpretObjectAsDouble(row.get(columnName)).doubleValue(); - return newTable; + return value; } - - public static Table copyTable(Table oldTable) { - Schema oldSchema = oldTable.getSchema(); - Table newTable = oldSchema.instantiate(); - - for (Iterator rowIt = oldTable.tuples(); rowIt.hasNext();) { - Tuple row = (Tuple) rowIt.next(); - newTable.addTuple(row); - } - - return newTable; - } } \ No newline at end of file Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/osgi/logging/LogMessageHandler.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/osgi/logging/LogMessageHandler.java 2010-02-23 18:33:04 UTC (rev 1040) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/osgi/logging/LogMessageHandler.java 2010-03-03 21:47:35 UTC (rev 1041) @@ -5,12 +5,10 @@ import org.osgi.service.log.LogService; -// TODO: Get reviewed. -// TODO: Make 1.4 compatible and move to cishell utilities? public class LogMessageHandler { private LogService logger; - private Map<MessageTypeIndicator, MessageType> messageTypes = - new HashMap<MessageTypeIndicator, MessageType>(); + private Map<MessageTypeDescriptor, MessageType> messageTypes = + new HashMap<MessageTypeDescriptor, MessageType>(); public LogMessageHandler(LogService logger) { this.logger = logger; @@ -20,82 +18,65 @@ * If typeIndicator is already an added message type, its count will be * reset and maximum count overridden. */ - public MessageTypeIndicator addMessageType( - String description, int maximumCount) { - MessageTypeIndicator typeIndicator = new MessageTypeIndicator(); - this.messageTypes.put( - typeIndicator, new MessageType(description, maximumCount)); + public MessageTypeDescriptor addMessageType(String description, int maximumCount) { + MessageTypeDescriptor typeIndicator = new MessageTypeDescriptor(); + this.messageTypes.put(typeIndicator, new MessageType(description, maximumCount)); return typeIndicator; } - /** - * logMessage will always be logged if typeIndicator has not been added - * prior to calling this. - */ - public void logMessage( - MessageTypeIndicator typeIndicator, - int logLevel, - String logMessage) { + /// message will always be logged if typeIndicator has not been added prior to calling this. + public void handleMessage(MessageTypeDescriptor typeIndicator, int logLevel, String message) { MessageType messageType = this.messageTypes.get(typeIndicator); if (messageType != null) { - if (messageType.messageLogged()) { - this.logger.log(logLevel, logMessage); - } + messageType.logMessage(logLevel, message, this.logger); } else { - this.logger.log(logLevel, logMessage); + this.logger.log(logLevel, message); } } public void printOverloadedMessageTypes(int logLevel) { for (MessageType messageType : this.messageTypes.values()) { - if (messageType.wasOverloaded()) { - this.logger.log(logLevel, messageType.toString()); + if (messageType.isOverloaded()) { + this.logger.log(logLevel, messageType.reportOverloads()); } } } - public class MessageTypeIndicator {} + // TODO: Javadoc what this is all about. (I will later.) + public class MessageTypeDescriptor {} - private class MessageType { + private static class MessageType { private String description; private int maximumCount; private int foundCount = 0; - private int overLoadedCount = 0; + private int overloadedCount = 0; public MessageType(String description, int maximumCount) { this.description = description; this.maximumCount = maximumCount; } - public boolean hasAnyLeft() { - return this.foundCount != this.maximumCount; + public void logMessage(int logLevel, String message, LogService logger) { + if (shouldStillLog()) { + logger.log(logLevel, message); + this.foundCount++; + } else { + this.overloadedCount++; + } } - public boolean wasOverloaded() { - return this.overLoadedCount > 0; + public String reportOverloads() { + return "Found " + this.overloadedCount + " more " + this.description + "."; } - public boolean messageLogged() { - if (hasAnyLeft()) { - this.foundCount++; - - return true; - } else { - this.overLoadedCount++; - - return false; - } + private boolean shouldStillLog() { + return this.foundCount < this.maximumCount; } - public String toString() { - return - "Found " + - this.overLoadedCount + - " more " + - this.description + - "."; + private boolean isOverloaded() { + return this.overloadedCount > 0; } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-02-23 18:33:31
|
Revision: 1040 http://cishell.svn.sourceforge.net/cishell/?rev=1040&view=rev Author: mwlinnem Date: 2010-02-23 18:33:04 +0000 (Tue, 23 Feb 2010) Log Message: ----------- Added Paths: ----------- branches/textrend_cishell/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-02-18 23:22:08
|
Revision: 1039 http://cishell.svn.sourceforge.net/cishell/?rev=1039&view=rev Author: pataphil Date: 2010-02-18 23:22:01 +0000 (Thu, 18 Feb 2010) Log Message: ----------- * Added StringUtilities.getNthToken(). * Reviewed by Micah. Modified Paths: -------------- trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java 2010-02-18 00:09:49 UTC (rev 1038) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java 2010-02-18 23:22:01 UTC (rev 1039) @@ -281,7 +281,8 @@ return string1; } - + + //TODO: Make this not exist (a check for 'Null Empty or Whitespace' can stay. Use ! for negated cases) public static Object alternativeIfNotNull_Empty_OrWhitespace( String string, Object alternative) { if (!isNull_Empty_OrWhitespace(string)) { @@ -299,4 +300,19 @@ return alternative; } } + + public static String getNthToken( + String originalString, + String separator, + int index, + boolean trim) { + + String[] tokens = originalString.split(separator); + + if (trim) { + return tokens[index].trim(); + } else { + return tokens[index]; + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fu...@us...> - 2010-02-18 00:09:55
|
Revision: 1038 http://cishell.svn.sourceforge.net/cishell/?rev=1038&view=rev Author: fugu13 Date: 2010-02-18 00:09:49 +0000 (Thu, 18 Feb 2010) Log Message: ----------- Made merging faster. Made merging progresstrackable. Reviewed by Joseph. Modified Paths: -------------- trunk/core/org.cishell.utilities/META-INF/MANIFEST.MF trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ColumnPair.java trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/DatabaseTable.java trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ForeignKey.java Added Paths: ----------- trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/Remover.java trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/Repointer.java Modified: trunk/core/org.cishell.utilities/META-INF/MANIFEST.MF =================================================================== --- trunk/core/org.cishell.utilities/META-INF/MANIFEST.MF 2010-02-17 23:25:26 UTC (rev 1037) +++ trunk/core/org.cishell.utilities/META-INF/MANIFEST.MF 2010-02-18 00:09:49 UTC (rev 1038) @@ -4,7 +4,10 @@ Bundle-SymbolicName: org.cishell.utilities Bundle-Version: 1.0.0 Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.cishell.framework;version="1.0.0", +Import-Package: com.google.common.annotations, + com.google.common.base, + com.google.common.collect, + org.cishell.framework;version="1.0.0", org.cishell.framework.algorithm;version="1.0.0", org.cishell.framework.data, org.cishell.reference.service.metatype, Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ColumnPair.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ColumnPair.java 2010-02-17 23:25:26 UTC (rev 1037) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ColumnPair.java 2010-02-18 00:09:49 UTC (rev 1038) @@ -20,4 +20,5 @@ public int hashCode() { return local.hashCode() * 31 + foreign.hashCode(); } + } Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/DatabaseTable.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/DatabaseTable.java 2010-02-17 23:25:26 UTC (rev 1037) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/DatabaseTable.java 2010-02-18 00:09:49 UTC (rev 1038) @@ -1,6 +1,7 @@ package org.cishell.utilities.database; import java.sql.Connection; +import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; @@ -10,9 +11,15 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.SortedSet; import org.cishell.utilities.DatabaseUtilities; +import org.cishell.utilities.StringUtilities; +import com.google.common.collect.ImmutableSortedMap; +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; + public final class DatabaseTable { public final String catalog; public final String schema; @@ -147,4 +154,37 @@ List<Map<String, Object>> otherEntities) { return "DELETE FROM " + this.toString() + " WHERE " + DatabaseUtilities.createSQLInExpression(columns, otherEntities); } + + private String formatDeleteEquals(Connection connection, String separator) throws SQLException { + //sorting is necessary to ensure keys and values match up + SortedSet<String> keys = Sets.newTreeSet(); + String[] primaryKeys = getPrimaryKeyColumns(connection); + for(String key : primaryKeys) { + keys.add(key + " = ?"); + } + return StringUtilities.implodeList(Lists.newArrayList(keys), separator); + } + + public Remover constructRemover(Connection connection) throws SQLException { + String deleteSql = "DELETE FROM " + this.toString() + " WHERE " + formatDeleteEquals(connection, " AND "); + final PreparedStatement statement = connection.prepareStatement(deleteSql); + return new Remover() { + public void remove(Map<String, Object> values) throws SQLException { + int index = 1; + for(Object value : ImmutableSortedMap.copyOf(values).values()) { + statement.setObject(index, value); + index++; + } + statement.addBatch(); + } + public int apply() throws SQLException { + int removed = 0; + int[] updates = statement.executeBatch(); + for(int ii = 0; ii < updates.length; ii++) { + removed += updates[ii]; + } + return removed; + } + }; + } } Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ForeignKey.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ForeignKey.java 2010-02-17 23:25:26 UTC (rev 1037) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ForeignKey.java 2010-02-18 00:09:49 UTC (rev 1038) @@ -1,17 +1,22 @@ package org.cishell.utilities.database; +import java.sql.Connection; +import java.sql.PreparedStatement; import java.sql.SQLException; -import java.sql.Statement; import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.SortedMap; +import java.util.SortedSet; -import org.cishell.utilities.DatabaseUtilities; import org.cishell.utilities.StringUtilities; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + public final class ForeignKey { final public DatabaseTable localTable; @@ -21,38 +26,20 @@ public ForeignKey(DatabaseTable localTable, DatabaseTable otherTable, Set<ColumnPair> pairs) { this.localTable = localTable; this.otherTable = otherTable; - this.pairs = Collections.unmodifiableSet(pairs); + this.pairs = ImmutableSet.copyOf(pairs); } - public void repoint(List<Map<String, Object>> from, - Map<String, Object> to, Statement statement) throws SQLException { - - String updateQuery = constructUpdateQuery(from, to); - statement.addBatch(updateQuery); - - } - - private String constructUpdateQuery(List<Map<String, Object>> from, - Map<String, Object> to) { - return "UPDATE " + otherTable.toString() + " SET "+ formatUpdates(to) + " WHERE " - + DatabaseUtilities.createSQLInExpression(getForeignColumnNames(), translateToForeignNames(from)); - } - - private List<Map<String, Object>> translateToForeignNames( - List<Map<String, Object>> from) { - List<Map<String, Object>> output = new ArrayList<Map<String, Object>>(); - for(Map<String, Object> fromValues : from) { - Map<String, Object> toValues = new HashMap<String, Object>(); - for(ColumnPair pair : pairs) { - toValues.put(pair.foreign, fromValues.get(pair.local)); - } - output.add(toValues); - } + private Map<String, Object> translateToForeignNames( + Map<String, Object> from) { + //sorting is necessary to ensure keys and values match up + SortedMap<String, Object> to = Maps.newTreeMap(); + for(ColumnPair pair : pairs) { + to.put(pair.foreign, from.get(pair.local)); + } - - return output; + return to; } private List<String> getForeignColumnNames() { @@ -65,15 +52,38 @@ - private String formatUpdates(Map<String, Object> to) { - List<String> updateStatements = new ArrayList<String>(); + private String formatUpdateEquals(String separator) { + //sorting is necessary to ensure keys and values match up + SortedSet<String> updateStatements = Sets.newTreeSet(); for(ColumnPair pair : pairs) { String foreignColumn = pair.foreign; - Object newValue = to.get(pair.local); - updateStatements.add(foreignColumn + " = " + DatabaseUtilities.formatValue(newValue)); + updateStatements.add(foreignColumn + " = ?"); } - return StringUtilities.implodeList(updateStatements, ", "); + return StringUtilities.implodeList(Lists.newArrayList(updateStatements), separator); } + + public Repointer constructRepointer(Connection connection) throws SQLException { + final PreparedStatement statement = connection.prepareStatement("UPDATE " + otherTable.toString() + " SET " + formatUpdateEquals(", ") + " WHERE " + formatUpdateEquals(" AND ")); + return new Repointer() { + + public void repoint(Map<String, Object> primary, Map<String, Object> secondary) throws SQLException { + int index = 1; + for(Object primaryValue : primary.values()) { + statement.setObject(index, primaryValue); + index++; + } + for(Object secondaryValue : secondary.values()) { + statement.setObject(index, secondaryValue); + index++; + } + statement.addBatch(); + } + + public void apply() throws SQLException { + statement.executeBatch(); + } + }; + } Added: trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/Remover.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/Remover.java (rev 0) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/Remover.java 2010-02-18 00:09:49 UTC (rev 1038) @@ -0,0 +1,9 @@ +package org.cishell.utilities.database; + +import java.sql.SQLException; +import java.util.Map; + +public interface Remover { + public void remove(Map<String, Object> values) throws SQLException; + public int apply() throws SQLException; +} Added: trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/Repointer.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/Repointer.java (rev 0) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/Repointer.java 2010-02-18 00:09:49 UTC (rev 1038) @@ -0,0 +1,10 @@ +package org.cishell.utilities.database; + +import java.sql.SQLException; +import java.util.Map; + +public interface Repointer { + public void repoint(Map<String, Object> primary, Map<String, Object> secondary) throws SQLException; + + public void apply() throws SQLException; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fu...@us...> - 2010-02-17 23:25:32
|
Revision: 1037 http://cishell.svn.sourceforge.net/cishell/?rev=1037&view=rev Author: fugu13 Date: 2010-02-17 23:25:26 +0000 (Wed, 17 Feb 2010) Log Message: ----------- Correct javadoc for ProgressMonitor.worked(). Modified Paths: -------------- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java 2010-02-17 20:50:41 UTC (rev 1036) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java 2010-02-17 23:25:26 UTC (rev 1037) @@ -73,8 +73,8 @@ /** * Notifies that a certain number of units of work has been completed * - * @param work The number of units of work completed - * since last notification + * @param work The number of units of work completed, total. + * */ public void worked(int work); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-02-17 20:50:49
|
Revision: 1036 http://cishell.svn.sourceforge.net/cishell/?rev=1036&view=rev Author: pataphil Date: 2010-02-17 20:50:41 +0000 (Wed, 17 Feb 2010) Log Message: ----------- * Added AlgorithCanceledException for when algorithms want to communicate to themselves internally when they've been canceled (relating to monitoring progress). * Reviewed by Chintan. Added Paths: ----------- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmCanceledException.java Added: trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmCanceledException.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmCanceledException.java (rev 0) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmCanceledException.java 2010-02-17 20:50:41 UTC (rev 1036) @@ -0,0 +1,21 @@ +package org.cishell.framework.algorithm; + +public class AlgorithmCanceledException extends Exception { + private static final long serialVersionUID = 9017277008277139930L; + + public AlgorithmCanceledException(String message, Throwable exception) { + super(message, exception); + } + + public AlgorithmCanceledException(Throwable exception) { + super(exception); + } + + public AlgorithmCanceledException(String message) { + super(message); + } + + public AlgorithmCanceledException() { + this("Algorithm canceled by user."); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-02-11 21:07:25
|
Revision: 1035 http://cishell.svn.sourceforge.net/cishell/?rev=1035&view=rev Author: pataphil Date: 2010-02-11 21:07:18 +0000 (Thu, 11 Feb 2010) Log Message: ----------- * Added StringUtilities.alternativeIfNotNull_Empty_OrWhitespace_IgnoreCase(). Modified Paths: -------------- trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java 2010-02-11 16:56:06 UTC (rev 1034) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java 2010-02-11 21:07:18 UTC (rev 1035) @@ -281,4 +281,22 @@ return string1; } + + public static Object alternativeIfNotNull_Empty_OrWhitespace( + String string, Object alternative) { + if (!isNull_Empty_OrWhitespace(string)) { + return string; + } else { + return alternative; + } + } + + public static Object alternativeIfNotNull_Empty_OrWhitespace_IgnoreCase( + String string, Object alternative) { + if (!isNull_Empty_OrWhitespace(string)) { + return string.toLowerCase(); + } else { + return alternative; + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fu...@us...> - 2010-02-11 16:56:42
|
Revision: 1034 http://cishell.svn.sourceforge.net/cishell/?rev=1034&view=rev Author: fugu13 Date: 2010-02-11 16:56:06 +0000 (Thu, 11 Feb 2010) Log Message: ----------- Updates to database utilities to support batch merges. Modified Paths: -------------- trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/DatabaseTable.java trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ForeignKey.java Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/DatabaseTable.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/DatabaseTable.java 2010-02-10 21:31:42 UTC (rev 1033) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/DatabaseTable.java 2010-02-11 16:56:06 UTC (rev 1034) @@ -2,8 +2,8 @@ import java.sql.Connection; import java.sql.ResultSet; -import java.sql.ResultSetMetaData; import java.sql.SQLException; +import java.sql.Statement; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -134,60 +134,17 @@ return columnNames.toArray(new String[]{}); } - public void deleteRowsByColumns(List<Map<String, Object>> otherEntities, Connection connection) throws SQLException { + public void deleteRowsByColumns(List<Map<String, Object>> otherEntities, Statement statement) throws SQLException { if(otherEntities.size() == 0) { return; } List<String> columns = new ArrayList<String>(otherEntities.get(0).keySet()); String deleteStatement = constructDeleteStatement(columns, otherEntities); - connection.createStatement().executeUpdate(deleteStatement); + statement.addBatch(deleteStatement); } private String constructDeleteStatement(List<String> columns, List<Map<String, Object>> otherEntities) { return "DELETE FROM " + this.toString() + " WHERE " + DatabaseUtilities.createSQLInExpression(columns, otherEntities); } - - public void duplicateTable(Connection originalConnection, - Connection newConnection) throws SQLException { - this.duplicateTableStructure(originalConnection, newConnection); - //TODO: finish - - } - - public void duplicateTableStructure(Connection originalConnection, - Connection newConnection) throws SQLException { - Column[] columns = getColumns(originalConnection); - String createStatement = createCreateStatement(columns); - newConnection.createStatement().executeUpdate(createStatement); - } - - private String createCreateStatement(Column[] columns) { - List<String> definitions = new ArrayList<String>(); - for(int ii = 0; ii < columns.length; ii++) { - definitions.add(columns[ii].getDefinition()); - } - return "CREATE TABLE " + this.toString() + DatabaseUtilities.implodeAndWrap(definitions); - } - - private Column[] getColumns(Connection connection) throws SQLException { - ResultSet results = connection.getMetaData().getColumns(this.catalog, this.schema, this.name, null); - List<Column> columns = new ArrayList<Column>(); - while(results.next()) { - columns.add(new Column(results.getString(4), results.getInt(5), results.getInt(7))); - } - return columns.toArray(new Column[]{}); - } - - public void transferPrimaryKey(Connection originalConnection, - Connection newConnection) { - // TODO Auto-generated method stub - - } - - public void pointForeignKeys(Connection originalConnection, - Connection newConnection) { - // TODO Auto-generated method stub - - } } Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ForeignKey.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ForeignKey.java 2010-02-10 21:31:42 UTC (rev 1033) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/database/ForeignKey.java 2010-02-11 16:56:06 UTC (rev 1034) @@ -1,7 +1,7 @@ package org.cishell.utilities.database; -import java.sql.Connection; import java.sql.SQLException; +import java.sql.Statement; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -25,12 +25,10 @@ } public void repoint(List<Map<String, Object>> from, - Map<String, Object> to, Connection connection) throws SQLException { + Map<String, Object> to, Statement statement) throws SQLException { String updateQuery = constructUpdateQuery(from, to); - //TODO: remove - System.err.println("Issuing update: " + updateQuery); - connection.createStatement().executeUpdate(updateQuery); + statement.addBatch(updateQuery); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-02-10 21:31:50
|
Revision: 1033 http://cishell.svn.sourceforge.net/cishell/?rev=1033&view=rev Author: mwlinnem Date: 2010-02-10 21:31:42 +0000 (Wed, 10 Feb 2010) Log Message: ----------- Updated to use latest version of derby. Seemed to give a performance boost compared to the old version (will need to test though). This also gives us the option using in-memory databases. Modified Paths: -------------- trunk/core/org.cishell.reference.service.database/.settings/org.eclipse.jdt.core.prefs trunk/core/org.cishell.reference.service.database/META-INF/MANIFEST.MF trunk/core/org.cishell.service.database/.settings/org.eclipse.jdt.core.prefs trunk/libs/derbylib/.classpath trunk/libs/derbylib/META-INF/MANIFEST.MF trunk/libs/derbylib/derby.jar trunk/libs/derbylib/derbyLocale_cs.jar trunk/libs/derbylib/derbyLocale_de_DE.jar trunk/libs/derbylib/derbyLocale_es.jar trunk/libs/derbylib/derbyLocale_fr.jar trunk/libs/derbylib/derbyLocale_hu.jar trunk/libs/derbylib/derbyLocale_it.jar trunk/libs/derbylib/derbyLocale_ja_JP.jar trunk/libs/derbylib/derbyLocale_ko_KR.jar trunk/libs/derbylib/derbyLocale_pl.jar trunk/libs/derbylib/derbyLocale_pt_BR.jar trunk/libs/derbylib/derbyLocale_ru.jar trunk/libs/derbylib/derbyLocale_zh_CN.jar trunk/libs/derbylib/derbyLocale_zh_TW.jar trunk/libs/derbylib/derbyclient.jar trunk/libs/derbylib/derbynet.jar trunk/libs/derbylib/derbyrun.jar trunk/libs/derbylib/derbytools.jar Added Paths: ----------- trunk/core/org.cishell.service.database/.settings/org.eclipse.pde.core.prefs Modified: trunk/core/org.cishell.reference.service.database/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/core/org.cishell.reference.service.database/.settings/org.eclipse.jdt.core.prefs 2010-02-04 22:49:51 UTC (rev 1032) +++ trunk/core/org.cishell.reference.service.database/.settings/org.eclipse.jdt.core.prefs 2010-02-10 21:31:42 UTC (rev 1033) @@ -1,8 +1,12 @@ -#Mon Jan 04 15:00:54 EST 2010 +#Wed Dec 23 12:43:04 EST 2009 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.source=1.5 Modified: trunk/core/org.cishell.reference.service.database/META-INF/MANIFEST.MF =================================================================== --- trunk/core/org.cishell.reference.service.database/META-INF/MANIFEST.MF 2010-02-04 22:49:51 UTC (rev 1032) +++ trunk/core/org.cishell.reference.service.database/META-INF/MANIFEST.MF 2010-02-10 21:31:42 UTC (rev 1033) @@ -8,7 +8,6 @@ Import-Package: org.apache.commons.dbcp, org.apache.commons.pool, org.apache.commons.pool.impl, - org.apache.derby, org.apache.derby.jdbc, org.cishell.framework.algorithm;version="1.0.0", org.cishell.service.database, Modified: trunk/core/org.cishell.service.database/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/core/org.cishell.service.database/.settings/org.eclipse.jdt.core.prefs 2010-02-04 22:49:51 UTC (rev 1032) +++ trunk/core/org.cishell.service.database/.settings/org.eclipse.jdt.core.prefs 2010-02-10 21:31:42 UTC (rev 1033) @@ -1,12 +1,12 @@ -#Wed Jan 21 13:34:47 EST 2009 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.4 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning -org.eclipse.jdt.core.compiler.source=1.3 +#Wed Dec 30 17:15:09 EST 2009 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 Added: trunk/core/org.cishell.service.database/.settings/org.eclipse.pde.core.prefs =================================================================== --- trunk/core/org.cishell.service.database/.settings/org.eclipse.pde.core.prefs (rev 0) +++ trunk/core/org.cishell.service.database/.settings/org.eclipse.pde.core.prefs 2010-02-10 21:31:42 UTC (rev 1033) @@ -0,0 +1,4 @@ +#Thu Jan 15 16:13:04 EST 2009 +eclipse.preferences.version=1 +pluginProject.extensions=false +resolve.requirebundle=false Modified: trunk/libs/derbylib/.classpath =================================================================== --- trunk/libs/derbylib/.classpath 2010-02-04 22:49:51 UTC (rev 1032) +++ trunk/libs/derbylib/.classpath 2010-02-10 21:31:42 UTC (rev 1033) @@ -1,24 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry exported="true" kind="lib" path="derbyLocale_fr.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_zh_CN.jar"/> - <classpathentry exported="true" kind="lib" path="derby.jar"/> - <classpathentry exported="true" kind="lib" path="derbytools.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_it.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_ko_KR.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_es.jar"/> - <classpathentry exported="true" kind="lib" path="derbyrun.jar"/> - <classpathentry exported="true" kind="lib" path="derbynet.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_ru.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_pt_BR.jar"/> - <classpathentry exported="true" kind="lib" path="derbyclient.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_pl.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_ja_JP.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_zh_TW.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_de_DE.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_cs.jar"/> - <classpathentry exported="true" kind="lib" path="derbyLocale_hu.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="lib" path="derby.jar"/> + <classpathentry kind="lib" path="derbyclient.jar"/> + <classpathentry kind="lib" path="derbyLocale_cs.jar"/> + <classpathentry kind="lib" path="derbyLocale_de_DE.jar"/> + <classpathentry kind="lib" path="derbyLocale_es.jar"/> + <classpathentry kind="lib" path="derbyLocale_fr.jar"/> + <classpathentry kind="lib" path="derbyLocale_hu.jar"/> + <classpathentry kind="lib" path="derbyLocale_it.jar"/> + <classpathentry kind="lib" path="derbyLocale_ja_JP.jar"/> + <classpathentry kind="lib" path="derbyLocale_ko_KR.jar"/> + <classpathentry kind="lib" path="derbyLocale_pl.jar"/> + <classpathentry kind="lib" path="derbyLocale_pt_BR.jar"/> + <classpathentry kind="lib" path="derbyLocale_ru.jar"/> + <classpathentry kind="lib" path="derbyLocale_zh_CN.jar"/> + <classpathentry kind="lib" path="derbyLocale_zh_TW.jar"/> + <classpathentry kind="lib" path="derbynet.jar"/> + <classpathentry kind="lib" path="derbyrun.jar"/> + <classpathentry kind="lib" path="derbytools.jar"/> <classpathentry kind="output" path="bin"/> </classpath> Modified: trunk/libs/derbylib/META-INF/MANIFEST.MF =================================================================== --- trunk/libs/derbylib/META-INF/MANIFEST.MF 2010-02-04 22:49:51 UTC (rev 1032) +++ trunk/libs/derbylib/META-INF/MANIFEST.MF 2010-02-10 21:31:42 UTC (rev 1033) @@ -4,12 +4,12 @@ Bundle-SymbolicName: Apache_Derby Bundle-Version: 1.0.0 Bundle-ClassPath: derbyLocale_fr.jar,derbyLocale_zh_CN.jar,derby.jar,derbytools.jar,derbyLocale_it.jar,derbyLocale_ko_KR.jar,derbyLocale_es.jar,derbyrun.jar,derbynet.jar,derbyLocale_ru.jar,derbyLocale_pt_BR.jar,derbyclient.jar,derbyLocale_pl.jar,derbyLocale_ja_JP.jar,derbyLocale_zh_TW.jar,derbyLocale_de_DE.jar,derbyLocale_cs.jar,derbyLocale_hu.jar -Export-Package: org.apache.derby, - org.apache.derby.authentication, +Export-Package: org.apache.derby.authentication, org.apache.derby.catalog, org.apache.derby.catalog.types, org.apache.derby.client, org.apache.derby.client.am, + org.apache.derby.client.am.stmtcache, org.apache.derby.client.net, org.apache.derby.database, org.apache.derby.diag, @@ -18,6 +18,7 @@ org.apache.derby.iapi.error, org.apache.derby.iapi.jdbc, org.apache.derby.iapi.reference, + org.apache.derby.iapi.security, org.apache.derby.iapi.services.cache, org.apache.derby.iapi.services.classfile, org.apache.derby.iapi.services.compiler, @@ -28,6 +29,7 @@ org.apache.derby.iapi.services.i18n, org.apache.derby.iapi.services.info, org.apache.derby.iapi.services.io, + org.apache.derby.iapi.services.jmx, org.apache.derby.iapi.services.loader, org.apache.derby.iapi.services.locks, org.apache.derby.iapi.services.memory, @@ -49,6 +51,8 @@ org.apache.derby.iapi.store.raw.data, org.apache.derby.iapi.store.raw.log, org.apache.derby.iapi.store.raw.xact, + org.apache.derby.iapi.store.replication.master, + org.apache.derby.iapi.store.replication.slave, org.apache.derby.iapi.tools, org.apache.derby.iapi.tools.i18n, org.apache.derby.iapi.types, @@ -56,6 +60,7 @@ org.apache.derby.impl.db, org.apache.derby.impl.drda, org.apache.derby.impl.io, + org.apache.derby.impl.io.vfmem, org.apache.derby.impl.jdbc, org.apache.derby.impl.jdbc.authentication, org.apache.derby.impl.load, @@ -63,6 +68,8 @@ org.apache.derby.impl.services.cache, org.apache.derby.impl.services.daemon, org.apache.derby.impl.services.jce, + org.apache.derby.impl.services.jmx, + org.apache.derby.impl.services.jmxnone, org.apache.derby.impl.services.locks, org.apache.derby.impl.services.monitor, org.apache.derby.impl.services.reflect, @@ -86,16 +93,22 @@ org.apache.derby.impl.store.raw.data, org.apache.derby.impl.store.raw.log, org.apache.derby.impl.store.raw.xact, + org.apache.derby.impl.store.replication, + org.apache.derby.impl.store.replication.buffer, + org.apache.derby.impl.store.replication.master, + org.apache.derby.impl.store.replication.net, + org.apache.derby.impl.store.replication.slave, org.apache.derby.impl.tools.dblook, org.apache.derby.impl.tools.ij, org.apache.derby.impl.tools.sysinfo, - org.apache.derby.info, org.apache.derby.io, org.apache.derby.jdbc, - org.apache.derby.loc, - org.apache.derby.loc.drda, + org.apache.derby.mbeans, + org.apache.derby.mbeans.drda, org.apache.derby.osgi, + org.apache.derby.security, org.apache.derby.shared.common.error, org.apache.derby.shared.common.i18n, + org.apache.derby.shared.common.sanity, org.apache.derby.tools, org.apache.derby.vti Modified: trunk/libs/derbylib/derby.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_cs.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_de_DE.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_es.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_fr.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_hu.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_it.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_ja_JP.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_ko_KR.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_pl.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_pt_BR.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_ru.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_zh_CN.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyLocale_zh_TW.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyclient.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbynet.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbyrun.jar =================================================================== (Binary files differ) Modified: trunk/libs/derbylib/derbytools.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fu...@us...> - 2010-02-04 22:49:58
|
Revision: 1032 http://cishell.svn.sourceforge.net/cishell/?rev=1032&view=rev Author: fugu13 Date: 2010-02-04 22:49:51 +0000 (Thu, 04 Feb 2010) Log Message: ----------- Add text area support. Increase maximum initial dialogue height somewhat, because the text areas were just large enough to push the "directed" checkbox on the graph extractor below the visible area (there was a scrollbar, but this is an easy tweak for a common algorithm, with no drawbacks, since the height is pretty arbitrary anyways, beyond being less than typical screen heights). Modified Paths: -------------- trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/builder/ComponentProvider.java trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/builder/components/StringComponent.java Modified: trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java 2010-01-28 20:18:19 UTC (rev 1031) +++ trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/SWTGui.java 2010-02-04 22:49:51 UTC (rev 1032) @@ -42,7 +42,7 @@ * @author Bruce Herr (bh...@bh...) */ public class SWTGui implements GUI, UpdateListener { - private static final int MAXIMUM_INITIAL_DIALOGUE_HEIGHT = 400; + private static final int MAXIMUM_INITIAL_DIALOGUE_HEIGHT = 500; public static final int TEXT_WRAP_LENGTH = 350; Modified: trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/builder/ComponentProvider.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/builder/ComponentProvider.java 2010-01-28 20:18:19 UTC (rev 1031) +++ trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/builder/ComponentProvider.java 2010-02-04 22:49:51 UTC (rev 1032) @@ -56,6 +56,9 @@ } else if (defaultValue[0].startsWith("directory:")) { component = new DirectoryComponent(); break; + } else if(defaultValue[0].startsWith("textarea:")) { + component = new StringComponent(true); + break; } } case (AttributeDefinition.BYTE): Modified: trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/builder/components/StringComponent.java =================================================================== --- trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/builder/components/StringComponent.java 2010-01-28 20:18:19 UTC (rev 1031) +++ trunk/clients/gui/org.cishell.reference.gui.guibuilder.swt/src/org/cishell/reference/gui/guibuilder/swt/builder/components/StringComponent.java 2010-02-04 22:49:51 UTC (rev 1032) @@ -31,107 +31,124 @@ * @author Bruce Herr (bh...@bh...) */ public class StringComponent extends AbstractComponent { - protected Text textField; - protected Combo combo; - protected String[] optionValues; - - public StringComponent() { - this(false, 1); - } - - public StringComponent(boolean drawLabel, int numColumns) { - super(drawLabel, numColumns); - } - - public Control createGUI(Composite parent, int style) { - - GridData gd = new GridData(SWT.FILL,SWT.CENTER,true,false); + protected Text textField; + protected Combo combo; + protected String[] optionValues; + private boolean multiline; + + public StringComponent() { + this(false, 1); + } + + public StringComponent(boolean multiline) { + this(false, 1); + this.multiline = multiline; + } + + public StringComponent(boolean drawLabel, int numColumns) { + super(drawLabel, numColumns); + } + + public Control createGUI(Composite parent, int style) { + + GridData gd = new GridData(SWT.FILL,SWT.CENTER,true,true); gd.horizontalSpan = MAX_SPAN-1; gd.minimumWidth = 100; - optionValues = attr.getOptionValues(); + optionValues = attr.getOptionValues(); if(optionValues != null) { - combo = new Combo(parent, style | SWT.DROP_DOWN | SWT.READ_ONLY); - - String[] optionLabels = attr.getOptionLabels(); - if(optionLabels == null) { - combo.setItems(optionValues); - } else { - combo.setItems(optionLabels); - } - - combo.select(0); - - combo.setLayoutData(gd); - - combo.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - update(); - } - }); - - return combo; - } else { - textField = new Text(parent, style | SWT.BORDER); - textField.setLayoutData(gd); - - textField.addModifyListener(new ModifyListener() { - public void modifyText(ModifyEvent e) { - update(); - } - }); - - return textField; - } - } + combo = new Combo(parent, style | SWT.DROP_DOWN | SWT.READ_ONLY); - public Object getValue() { - Object value; - if(combo == null) { - value = StringConverter.getInstance().stringToObject(attr, textField.getText()); - } else { - value = StringConverter.getInstance().stringToObject(attr, getListValue()); - } - - return value; - } + String[] optionLabels = attr.getOptionLabels(); + if(optionLabels == null) { + combo.setItems(optionValues); + } else { + combo.setItems(optionLabels); + } - private String getListValue() { - if (optionValues != null) { - return optionValues[combo.getSelectionIndex()]; - } else { - return "You are not specifying option values, fool!"; - } + combo.select(0); + + combo.setLayoutData(gd); + + combo.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent event) { + update(); + } + }); + + return combo; + } else { + int flags; + if(multiline) { + flags = style | SWT.BORDER | SWT.MULTI | SWT.V_SCROLL; + gd.minimumHeight = 100; + gd.minimumWidth = 250; + } else { + flags = style | SWT.BORDER; + } + textField = new Text(parent, flags); + textField.setLayoutData(gd); + + textField.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { + update(); + } + }); + + return textField; + } } + public Object getValue() { + Object value; + if(combo == null) { + value = StringConverter.getInstance().stringToObject(attr, textField.getText()); + } else { + value = StringConverter.getInstance().stringToObject(attr, getListValue()); + } + + return value; + } + + private String getListValue() { + if (optionValues != null) { + return optionValues[combo.getSelectionIndex()]; + } else { + return "You are not specifying option values, fool!"; + } + } + public String validate() { - if (getValue() == null) { - return "Invalid basic value"; - } - if(combo == null) { - return attr.validate(textField.getText()); - } else { - return attr.validate(getListValue()); - } - } + if (getValue() == null) { + return "Invalid basic value"; + } + if(combo == null) { + return attr.validate(textField.getText()); + } else { + return attr.validate(getListValue()); + } + } - public void setValue(Object value) { - if (textField != null) { - textField.setText(value == null ? "" : value.toString()); - } else if (combo != null) { - - int setComboToIndex = -1; - for (int i = 0; i < optionValues.length; i++) { - if (value.equals(optionValues[i])) { - setComboToIndex = i; - } - } - - if (setComboToIndex != -1) { - combo.select(setComboToIndex); - } else { - System.err.println("Attempted to set combo box to a value " + - "that didn't exist inside the combo box."); - } - } - } + public void setValue(Object value) { + if(value.toString().startsWith("textarea:")) { + value = value.toString().substring("textarea:".length()); + } + if (textField != null) { + textField.setText(value == null ? "" : value.toString()); + } else if (combo != null) { + + int setComboToIndex = -1; + for (int i = 0; i < optionValues.length; i++) { + if (value.equals(optionValues[i])) { + setComboToIndex = i; + } + } + + if (setComboToIndex != -1) { + combo.select(setComboToIndex); + } else { + System.err.println("Attempted to set combo box to a value " + + "that didn't exist inside the combo box."); + } + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-01-28 20:18:25
|
Revision: 1031 http://cishell.svn.sourceforge.net/cishell/?rev=1031&view=rev Author: pataphil Date: 2010-01-28 20:18:19 +0000 (Thu, 28 Jan 2010) Log Message: ----------- * Added StringUtilities.bothAreEqualOrNull(). Modified Paths: -------------- trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java 2010-01-27 22:42:02 UTC (rev 1030) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/StringUtilities.java 2010-01-28 20:18:19 UTC (rev 1031) @@ -247,6 +247,14 @@ (string1.equals(string2))); } + public static boolean bothAreEqualOrNull(String string1, String string2) { + if (string1 != null) { + return string1.equals(string2); + } else { + return (string2 == null); + } + } + public static boolean areValidAndEqualIgnoreCase(String string1, String string2) { return ( !isNull_Empty_OrWhitespace(string1) && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2010-01-27 22:42:10
|
Revision: 1030 http://cishell.svn.sourceforge.net/cishell/?rev=1030&view=rev Author: pataphil Date: 2010-01-27 22:42:02 +0000 (Wed, 27 Jan 2010) Log Message: ----------- * Added the createStatement() DatabaseUtilities. Modified Paths: -------------- trunk/core/org.cishell.utilities/src/org/cishell/utilities/DatabaseUtilities.java Modified: trunk/core/org.cishell.utilities/src/org/cishell/utilities/DatabaseUtilities.java =================================================================== --- trunk/core/org.cishell.utilities/src/org/cishell/utilities/DatabaseUtilities.java 2010-01-26 18:31:17 UTC (rev 1029) +++ trunk/core/org.cishell.utilities/src/org/cishell/utilities/DatabaseUtilities.java 2010-01-27 22:42:02 UTC (rev 1030) @@ -2,6 +2,7 @@ import java.sql.Connection; import java.sql.SQLException; +import java.sql.Statement; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -31,7 +32,44 @@ } return connection; } - // TODO: I'd prefer something like createSQLInExpression + + public static Statement createStatement(Connection connection, String messageIfError) + throws AlgorithmExecutionException { + try { + return connection.createStatement(); + } catch (SQLException e) { + throw new AlgorithmExecutionException(messageIfError, e); + } + } + + public static Statement createStatement( + Connection connection, + int resultSetType, + int resultSetConcurrency, + String messageIfError) + throws AlgorithmExecutionException { + try { + return connection.createStatement(resultSetType, resultSetConcurrency); + } catch (SQLException e) { + throw new AlgorithmExecutionException(messageIfError, e); + } + } + + public static Statement createStatement( + Connection connection, + int resultSetType, + int resultSetConcurrency, + int resultSetHoldability, + String messageIfError) + throws AlgorithmExecutionException { + try { + return connection.createStatement( + resultSetType, resultSetConcurrency, resultSetHoldability); + } catch (SQLException e) { + throw new AlgorithmExecutionException(messageIfError, e); + } + } + public static String createSQLInExpression(List<String> columns, List<Map<String, Object>> valueMaps) { String columnNames = implodeAndWrap(columns); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-01-26 18:31:25
|
Revision: 1029 http://cishell.svn.sourceforge.net/cishell/?rev=1029&view=rev Author: mwlinnem Date: 2010-01-26 18:31:17 +0000 (Tue, 26 Jan 2010) Log Message: ----------- Added org.cishell.service.reference (might resolve build issue). Modified Paths: -------------- trunk/deployment/org.cishell.reference.feature/feature.xml Modified: trunk/deployment/org.cishell.reference.feature/feature.xml =================================================================== --- trunk/deployment/org.cishell.reference.feature/feature.xml 2010-01-26 18:10:57 UTC (rev 1028) +++ trunk/deployment/org.cishell.reference.feature/feature.xml 2010-01-26 18:31:17 UTC (rev 1029) @@ -121,4 +121,11 @@ version="0.0.0" unpack="false"/> + <plugin + id="org.cishell.service.database" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + </feature> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mwl...@us...> - 2010-01-26 18:11:06
|
Revision: 1028 http://cishell.svn.sourceforge.net/cishell/?rev=1028&view=rev Author: mwlinnem Date: 2010-01-26 18:10:57 +0000 (Tue, 26 Jan 2010) Log Message: ----------- Now using Java 1.5 (this may resolve a build issue, but I doubt it). Modified Paths: -------------- trunk/core/org.cishell.service.database/.classpath Modified: trunk/core/org.cishell.service.database/.classpath =================================================================== --- trunk/core/org.cishell.service.database/.classpath 2010-01-26 17:53:43 UTC (rev 1027) +++ trunk/core/org.cishell.service.database/.classpath 2010-01-26 18:10:57 UTC (rev 1028) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src"/> <classpathentry kind="output" path="bin"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |