You can subscribe to this list here.
2005 |
Jan
(318) |
Feb
(382) |
Mar
(403) |
Apr
(576) |
May
(78) |
Jun
|
Jul
|
Aug
(154) |
Sep
(496) |
Oct
(277) |
Nov
(137) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(18) |
Feb
(1) |
Mar
|
Apr
(15) |
May
(5) |
Jun
(15) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bh...@us...> - 2006-06-30 19:08:09
|
Revision: 81 Author: bh2 Date: 2006-06-30 12:08:02 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=81&view=rev Log Message: ----------- updated source to comply with the updated API Modified Paths: -------------- trunk/core/org.cishell.reference/src/org/cishell/reference/client/service/modelmanager/ModelManagerServiceImpl.java Modified: trunk/core/org.cishell.reference/src/org/cishell/reference/client/service/modelmanager/ModelManagerServiceImpl.java =================================================================== --- trunk/core/org.cishell.reference/src/org/cishell/reference/client/service/modelmanager/ModelManagerServiceImpl.java 2006-06-30 19:05:13 UTC (rev 80) +++ trunk/core/org.cishell.reference/src/org/cishell/reference/client/service/modelmanager/ModelManagerServiceImpl.java 2006-06-30 19:08:02 UTC (rev 81) @@ -52,7 +52,7 @@ */ public void addModel(DataModel model) { String label = (String)model.getProperties().get(DataModelProperty.LABEL); - DataModelType type = (DataModelType)model.getProperties().get(DataModelProperty.TYPE); + String type = (String)model.getProperties().get(DataModelProperty.TYPE); if(type == null){ type = DataModelType.OTHER; @@ -84,7 +84,7 @@ label = "Unknown"; } - label = label + "." + type.getName(); + label = label + "." + type; } addModel(model, label); @@ -180,7 +180,7 @@ return (String)modelToLabelMap.get(model); } - public DataModel[] getModels() { + public DataModel[] getAllModels() { return (DataModel[]) models.toArray(new DataModel[]{}); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-30 19:05:32
|
Revision: 80 Author: bh2 Date: 2006-06-30 12:05:13 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=80&view=rev Log Message: ----------- javadocced and updated the cishell api Modified Paths: -------------- trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerAdapter.java trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerListener.java trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerService.java trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerAdapter.java trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerListener.java trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerService.java trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/Algorithm.java trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/package.html trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/BasicDataModel.java trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModel.java trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModelProperty.java trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModelType.java trunk/core/org.cishell.framework/src/org/cishell/service/conversion/DataConversionService.java trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/GUI.java trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/GUIBuilderService.java trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/SelectionListener.java Added Paths: ----------- trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/package.html trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/package.html trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/package.html trunk/core/org.cishell.framework/src/org/cishell/framework/doc-files/ trunk/core/org.cishell.framework/src/org/cishell/framework/doc-files/cishell-logo-400.png trunk/core/org.cishell.framework/src/org/cishell/framework/package.html trunk/core/org.cishell.framework/src/org/cishell/overview.html trunk/core/org.cishell.framework/src/org/cishell/service/conversion/package.html trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/package.html Modified: trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerAdapter.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerAdapter.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerAdapter.java 2006-06-30 19:05:13 UTC (rev 80) @@ -16,10 +16,13 @@ import org.cishell.framework.datamodel.DataModel; /** + * An abstract adapter class for notification of changes in the + * {@link ModelManagerService}. The methods in this class are empty. This class + * exists as a convenience for creating listener objects. * - * @author + * @author Bruce Herr (bh...@bh...) */ -public class ModelManagerAdapter implements ModelManagerListener { +public abstract class ModelManagerAdapter implements ModelManagerListener { /** * @see org.cishell.client.service.modelmanager.ModelManagerListener#modelAdded(org.cishell.framework.datamodel.DataModel) */ Modified: trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerListener.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerListener.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerListener.java 2006-06-30 19:05:13 UTC (rev 80) @@ -16,8 +16,34 @@ import org.cishell.framework.datamodel.DataModel; +/** + * A listener that is notified of changes in the {@link ModelManagerService}. + * + * @author Bruce Herr (bh...@bh...) + */ public interface ModelManagerListener { + + /** + * Notifies that a model has been added to the associated + * {@link ModelManagerService} + * + * @param dm The added {@link DataModel} + */ public void modelAdded(DataModel dm); + + /** + * Notifies that a model has been removed from the associated + * {@link ModelManagerService} + * + * @param dm The removed {@link DataModel} + */ public void modelRemoved(DataModel dm); + + /** + * Notifies that a set of models have been selected in the associated + * {@link ModelManagerService} + * + * @param dm The selected {@link DataModel}s + */ public void modelsSelected(DataModel[] dm); } Modified: trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerService.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerService.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/ModelManagerService.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,20 +9,75 @@ * Created on Jun 14, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.client.service.modelmanager; import org.cishell.framework.datamodel.DataModel; +/** + * A service for managing loaded {@link DataModel}s. + * {@link ModelManagerListener}s may be registered to be notified of changes + * in the model manager. + * + * Clients are encouraged to use this service for managing the models they have + * loaded into memory. Algorithm writers are encouraged not to use this service + * as it is not guaranteed to be available like the standard CIShell services + * are. + * + * @author Bruce Herr (bh...@bh...) + */ public interface ModelManagerService { + /** + * Adds a DataModel to the manager + * + * @param model The data model + */ public void addModel(DataModel model); + + /** + * Removes a DataModel from the manager + * + * @param model The data model + */ public void removeModel(DataModel model); + + /** + * Sets which data models are selected in the manager. If a given DataModel + * in the array of DataModels is not in the model manager, then it will be + * automatically added before selection. + * + * @param models The data models to select + */ public void setSelectedModels(DataModel[] models); + /** + * Returns the models that have been selected in the manager + * + * @return An array of DataModels, length may be zero + */ public DataModel[] getSelectedModels(); - public DataModel[] getModels(); + /** + * Returns all of the DataModels loaded into the manager + * + * @return An array of DataModels, length may be zero + */ + public DataModel[] getAllModels(); + + /** + * Adds a {@link ModelManagerListener} that will be notified as DataModels + * are added, removed, and selected + * + * @param listener The listener to be notified of events + */ public void addModelManagerListener(ModelManagerListener listener); + + /** + * Removes the {@link ModelManagerListener} from the listener group and will + * no longer notify it of events + * + * @param listener The listener to be removed + */ public void removeModelManagerListener(ModelManagerListener listener); } Added: trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/package.html =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/package.html (rev 0) +++ trunk/core/org.cishell.framework/src/org/cishell/client/service/modelmanager/package.html 2006-06-30 19:05:13 UTC (rev 80) @@ -0,0 +1,27 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>org.cishell.framework.datamodel Package-level Javadoc</title> +<!-- +/* **************************************************************************** + * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Apache License v2.0 which accompanies + * this distribution, and is available at: + * http://www.apache.org/licenses/LICENSE-2.0.html + * + * Created on Jun 30, 2006 at Indiana University. + * + * Contributors: + * Indiana University - Initial API Documentation + * ***************************************************************************/ +--> +</head> +<body>Provides the specification for the CIShell model manager service +<h2>Package Specification</h2> +This package specifies the API related to the model manager service. + +</body> +</html> \ No newline at end of file Modified: trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerAdapter.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerAdapter.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerAdapter.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,7 +9,7 @@ * Created on Jun 14, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.client.service.scheduler; @@ -18,6 +18,13 @@ import org.cishell.framework.algorithm.Algorithm; import org.cishell.framework.datamodel.DataModel; +/** + * An abstract adapter class for notification of events happening in a + * {@link SchedulerService}. The methods in this class are empty. This class + * exists as a convenience for creating listener objects. + * + * @author Bruce Herr (bh...@bh...) + */ public class SchedulerAdapter implements SchedulerListener { public void algorithmError(Algorithm algorithm, Exception error) { } Modified: trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerListener.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerListener.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerListener.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,7 +9,7 @@ * Created on Jun 14, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.client.service.scheduler; @@ -19,13 +19,66 @@ import org.cishell.framework.datamodel.DataModel; +/** + * A listener that is notified of events happening in a {@link SchedulerService} + * + * @author Bruce Herr (bh...@bh...) + */ public interface SchedulerListener { + /** + * Notification that an Algorithm has been scheduled to be run at a certain + * time + * + * @param algorithm The scheduled Algorithm + * @param time The time is scheduled to be run + */ public void algorithmScheduled(Algorithm algorithm, Calendar time); + + /** + * Notification that an already scheduled Algorithm has been rescheduled + * to be run at a different time + * + * @param algorithm The scheduled Algorithm + * @param time The new time the Algorithm is scheduled to be run + */ public void algorithmRescheduled(Algorithm algorithm, Calendar time); + + /** + * Notification that an Algorithm has started execution + * + * @param algorithm The scheduled algorithm + */ public void algorithmStarted(Algorithm algorithm); + + /** + * Notification that an Algorithm has finished executing + * + * @param algorithm The scheduled Algorithm + * @param createdDM The DataModel(s) it returned, or <code>null</code> if + * it returned <code>null</code> + */ public void algorithmFinished(Algorithm algorithm, DataModel[] createdDM); + + /** + * Notification that an Algorithm had an error while being executed + * + * @param algorithm The scheduled Algorithm + * @param error The error it threw while executing + */ public void algorithmError(Algorithm algorithm, Exception error); + /** + * Notification that the scheduler's run state (paused or unpaused) has + * changed + * + * @param isRunning <code>true</code> if it is now running, + * <code>false</code> if it is no longer running (paused) + */ public void schedulerRunStateChanged(boolean isRunning); + + /** + * Notification that the scheduler's schedule of Algorithms to be run has + * been cleared. + */ public void schedulerCleared(); } Modified: trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerService.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerService.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/SchedulerService.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,28 +9,141 @@ * Created on Jun 14, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.client.service.scheduler; import java.util.Calendar; -import java.util.Map; import org.cishell.framework.algorithm.Algorithm; + +/** + * A service for scheduling {@link Algorithm}s to be run. + * {@link SchedulerListener}s may be registered to be notified of events. + * + * Clients are encouraged to use this service for scheduling Algorithms to be + * run. Algorithm writers are encouraged not to use this service as it is not + * guaranteed to be available like the standard CIShell services are. + * + * @author Bruce Herr (bh...@bh...) + */ public interface SchedulerService { + /** + * Schedules an Algorithm to be run immediately. If there are simply not + * enough resources to run it, it will still have to wait until there are + * enough resources to fulfill the request. + * + * @param algorithm The algorithm to be run + */ public void runNow(Algorithm algorithm); + + /** + * Schedules an Algorithm to be run when convenient. This schedules an + * Algorithm to be run now, but gives no urgent priority to it. Most + * Algorithms will be scheduled in this way. + * + * @param algorithm The Algorithm to be scheduled + */ public void schedule(Algorithm algorithm); + + /** + * Schedules an Algorithm to be run at a specific time. The Algorithm will + * be run at the given time unless there is simply not enough resources + * at that time. In which case it would wait until there are enough + * resources to fulfill the request. + * + * @param algorithm The Algorithm to be scheduled + * @param time What time this Algorithm should be run + */ public void schedule(Algorithm algorithm, Calendar time); + + /** + * Reschedules an already scheduled Algorithm to be run at a different time. + * If the Algorithm is not scheduled already, then this method will have no + * effect and will return <code>false</code>. + * + * @param algorithm The Algorithm already scheduled + * @param newTime The revised time in which to run the Algorithm + * @return If the Algorithm was successfully rescheduled + */ public boolean reschedule(Algorithm algorithm, Calendar newTime); + + /** + * Unschedules an already scheduled, but not running Algorithm from the + * scheduler. Tries to unschedule an Algorithm from the scheduler. If the + * Algorithm isn't in the scheduler or if the Algorithm is already running + * then this method returns <code>false</code>. + * + * @param algorithm The Algorithm to remove from the scheduler + * @return If the Algorithm was successfully unscheduled + */ public boolean unschedule(Algorithm algorithm); + /** + * Adds a listener to be notified of events happening in the scheduler. + * + * @param listener The listener to be added + */ public void addSchedulerListener(SchedulerListener listener); + + /** + * Removes a {@link SchedulerListener} from the group of listeners listening + * for scheduler events. This method has no effect if the listener isn't + * in the group of listeners. + * + * @param listener The listener to be removed + */ public void removeSchedulerListener(SchedulerListener listener); + + /** + * Returns whether the scheduler is running + * + * @return if the scheduler is running + */ + public boolean isRunning(); - public boolean isRunning(); - public void setRunning(boolean running); - public Map getSchedule(); + /** + * Pauses or unpauses the running of new {@link Algorithm}s in the + * scheduler + * + * @param isRunning <code>true</code> to pause, + * <code>false</code> to unpause + */ + public void setRunning(boolean isRunning); + + /** + * Returns an array of {@link Algorithm}s that the scheduler has scheduled. + * This includes the Algorithms that are currently running and the ones + * queued to be run. This also just gives a snapshot of the current set of + * scheduled Algorithms, so it is not guaranteed to be accurate even + * directly after the method returns. + * + * @return The set of Algorithms currently scheduled in the scheduler + */ + public Algorithm[] getScheduledAlgorithms(); + + /** + * Returns the time in which a scheduled Algorithm is scheduled to be run. + * The time may be in the past if the Algorithm is already running or + * <code>null</code> if the Algorithm is not scheduled. + * + * @param algorithm The Algorithm + * @return The scheduled time for the Algorithm to run or <code>null</code> + * if the Algorithm is not scheduled or has completed execution. + */ + public Calendar getScheduledTime(Algorithm algorithm); + + /** + * Clears all currently scheduled Algorithms to be run. If an Algorithm is + * already running, then it will continue to run until finished. + */ public void clearSchedule(); + + /** + * Returns if there are any Algorithms scheduled + * + * @return Whether there are any Algorithms scheduled + */ public boolean isEmpty(); } Added: trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/package.html =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/package.html (rev 0) +++ trunk/core/org.cishell.framework/src/org/cishell/client/service/scheduler/package.html 2006-06-30 19:05:13 UTC (rev 80) @@ -0,0 +1,27 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>org.cishell.framework.datamodel Package-level Javadoc</title> +<!-- +/* **************************************************************************** + * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Apache License v2.0 which accompanies + * this distribution, and is available at: + * http://www.apache.org/licenses/LICENSE-2.0.html + * + * Created on Jun 30, 2006 at Indiana University. + * + * Contributors: + * Indiana University - Initial API Documentation + * ***************************************************************************/ +--> +</head> +<body>Provides the specification for the CIShell scheduler service +<h2>Package Specification</h2> +This package specifies the API related to the scheduler service. + +</body> +</html> \ No newline at end of file Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/Algorithm.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/Algorithm.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/Algorithm.java 2006-06-30 19:05:13 UTC (rev 80) @@ -16,7 +16,7 @@ import org.cishell.framework.datamodel.DataModel; /** - * An algorithm. In CIShell an algorithm can be basically any arbitrary code + * In CIShell, an algorithm can be basically any arbitrary code * execution cycle. What happens when the execute method is run is entirely * up to the Algorithm writer. Some algorithms may be primed with a data model * that it analyzes and returns a derivitive data model or it may convert from 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 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java 2006-06-30 19:05:13 UTC (rev 80) @@ -15,21 +15,60 @@ /** * A class to monitor the progress of an algorithm. It allows for notification - * of progress, notification of cancellation, and description of current work - * during execution. These methods are generally only called by the algorithm - * with the CIShell client providing the progress monitor implementation. + * of progress, notification of cancellation, notification of pausing, and + * description of current work during execution. These methods are generally + * only called by the algorithm with the CIShell client providing the progress + * monitor implementation. * * @author Bruce Herr (bh...@bh...) */ public interface ProgressMonitor { + /** + * A monitor with empty methods for use by algorithms when no + * ProgressMonitor has been given to it. This helps to eliminate spurious + * <code>null</code> checks to ensure the progress monitor is not + * <code>null</code>. + */ + public static final ProgressMonitor NULL_MONITOR = new ProgressMonitor() { + public void describeWork(String currentWork) {} + public void done() {} + public boolean isCanceled() {return false;} + public boolean isPaused() {return false;} + public void setCanceled(boolean value) {} + public void setPaused(boolean value) {} + public void start(int capabilities, int totalWorkUnits) {} + public void worked(int work) {}}; + + /** + * Capability constant specifying that this algorithm can + * update its work progress (value is 1<<1) + */ + public static final int WORK_TRACKABLE = 1 << 1; + + /** + * Capability constant specifying that this algorithm can + * be cancelled (value is 1<<2) + */ + public static final int CANCELLABLE = 1 << 2; + + /** + * Capability constant specifying that this algorithm can + * be paused (value is 1<<3) + */ + public static final int PAUSEABLE = 1 << 3; + /** * Notifies the start of execution of the algorithm in addition to * revealing how many work units will be used. * + * @param capabilities An ORed int that tells the monitor what the + * algorithm is capable of with respect to the + * monitor. The ORed values are taken from the int + * constants specified in this interface. * @param totalWorkUnits The number of work units, may be -1 if the * algorithm does not provide progress information. */ - public void start(int totalWorkUnits); + public void start(int capabilities, int totalWorkUnits); /** * Notifies that a certain number of units of work has been completed @@ -47,10 +86,10 @@ /** * Sets or clears a flag for cancellation of this algorithm's execution. * An algorithm writer can ignore or clear this flag if it cannot stop - * midstream. This is the only method that can be called by someone other - * than the algorithm. + * midstream. This is one of the methods that can be called by someone + * other than the algorithm. * - * @param value Set or clear the cancellation of algorithm execution + * @param value Set or clear the cancellation request */ public void setCanceled(boolean value); @@ -64,6 +103,25 @@ public boolean isCanceled(); /** + * Sets or clears a flag for pausing of this algorithm's execution. An + * algorithm writer can ignore or clear this flag if it cannot pause + * midstream. This is one of the methods that can be called by someone + * other than the algorithm. + * + * @param value Set or clear the pause request + */ + public void setPaused(boolean value); + + /** + * Returns whether pausing of algorithm execution is requested. An + * algorithm that can be paused should poll this method when convenient + * to see if it should pause. + * + * @return Whether pausing of algorithm execution is requested + */ + public boolean isPaused(); + + /** * Method to describe what the algorithm is currently doing for the benefit * of the users of the algorithm as it progresses during execution. * Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java 2006-06-30 19:05:13 UTC (rev 80) @@ -35,4 +35,13 @@ * @param monitor The monitor the algorithm is to use */ public void setProgressMonitor(ProgressMonitor monitor); + + /** + * Returns the progress monitor currently in use, or <code>null</code> if + * no monitor has been set. + * + * @return The current progress monitor, or <code>null</code> if there + * isn't one set. + */ + public ProgressMonitor getProgressMonitor(); } Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/package.html =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/package.html 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/package.html 2006-06-30 19:05:13 UTC (rev 80) @@ -19,8 +19,7 @@ * ***************************************************************************/ --> </head> -<body> -Provides interfaces required for creating CIShell compatible algorithms +<body>Provides interfaces required for creating CIShell compatible algorithms <h2>Package Specification</h2> This package specifies the API related to creation of CIShell compatible algorithms. Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/BasicDataModel.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/BasicDataModel.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/BasicDataModel.java 2006-06-30 19:05:13 UTC (rev 80) @@ -16,15 +16,33 @@ import java.util.Dictionary; import java.util.Hashtable; - +/** + * A basic implementation of {@link DataModel}. This class was included since + * a simple implementation of DataModel will be used quite often in both client + * and algorithm code. + * + * @author Bruce Herr (bh...@bh...) + */ public class BasicDataModel implements DataModel { private Dictionary properties; private Object data; + /** + * Creates a DataModel with the given data and an empty meta-data + * {@link Dictionary} + * + * @param data The data being wrapped + */ public BasicDataModel(Object data) { this(new Hashtable(), data); } + /** + * Creates a DataModel with the given data and meta-data {@link Dictionary} + * + * @param properties The meta-data about the data + * @param data The data being wrapped + */ public BasicDataModel(Dictionary properties, Object data) { this.properties = properties; this.data = data; Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModel.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModel.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModel.java 2006-06-30 19:05:13 UTC (rev 80) @@ -15,7 +15,31 @@ import java.util.Dictionary; +/** + * A class that encapsulates data and its meta-data. This class is used to pass + * data between algorithms and what algorithms optionally create when executed. + * + * @author Bruce Herr (bh...@bh...) + */ public interface DataModel { + /** + * Returns the meta-data associated with the data stored in this DataModel. + * Some standard keys are in {@link DataModelProperty}. + * + * @return The data's meta-data + */ public Dictionary getProperties(); + + /** + * Returns the data stored in this DataModel. + * + * @return The data (a java object) + */ public Object getData(); + + //TODO: Consider these methods for inclusion in DataModel + //public String getType(); + + //public String getUID(); //may be better for specifying parent datamodels + //public Object getDataAsType(String type); } Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModelProperty.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModelProperty.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModelProperty.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,36 +9,48 @@ * Created on Jun 15, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.framework.datamodel; - +/** + * Standard property keys to use when creating meta-data for a + * {@link DataModel}. + * + * @author Bruce Herr (bh...@bh...) + */ public interface DataModelProperty { - /** The Label of the DataModel */ + /** + * The label to give the DataModel if displayed. The type associated with + * this property is of type {@link String}. + */ public static final String LABEL = "Label"; /** - * The Parent DataModel of the DataModel. This is used when a model - * is derived from another DataModel, to show the hierarchical relationship - * between them. This Property can be null, signifying that the DataModel + * The parent DataModel of the DataModel. This is used when a DataModel + * is derived from another DataModel to show the hierarchical relationship + * between them. This property can be null, signifying that the DataModel * was not derived from any DataModel, such as when loading a new DataModel - * from a file. - * */ + * from a file. The type associated with this property is of type + * {@link DataModel} + */ public static final String PARENT = "Parent"; + //TODO: should we consider removing this/changing it? /** - * The type of this DataModel. Various standard types are created as - * constants in the DataModelType class. These can be used, or new - * types can be introduced as needed by creating new DataModelTypes. + * The type of the DataModel. Various standard types are created as + * constants in the {@link DataModelType} class. These can be used, or new + * types can be introduced as needed. The type associated with this + * property is of type {@link String}. */ public static final String TYPE = "Type"; /** - * Flag to determined if this DataModel has been modified and not saved since - * the modification. This is used to do things like notify the user before they - * exit that a modified DataModel exists and see if they want to save it. + * Flag to determine if this DataModel has been modified and not saved since + * the modification. This is used to do things like notify the user before + * they exit that a modified DataModel exists and see if they want to save + * it. The type associated with this property is of type {@link Boolean}. */ public static final String MODIFIED = "Modified"; } Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModelType.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModelType.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/DataModelType.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,51 +9,31 @@ * Created on Jun 15, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.framework.datamodel; - /** - * Defines some standard DataModelTypes to be used in DataModel PropertyMaps - * to declare the type of a DataModel, as well as allows for creation of - * new types when needed. + * Defines some standard data model types to be used in a DataModel's meta-data + * to declare the type of a {@link DataModel}. These are the values associated + * with the {@link DataModelProperty}, DataModelProperty.TYPE. These 'types' are + * more general and are used to help a user to figure out in a broad sense what + * type of data he or she is looking at. * - * @author Team IVC + * @author Bruce Herr (bh...@bh...) */ -public class DataModelType { +public interface DataModelType { - /** Matrix data model */ - public static DataModelType MATRIX = new DataModelType("Matrix"); + /** Says this data model is abstractly a matrix */ + public static String MATRIX = "Matrix"; - /** Network data model */ - public static DataModelType NETWORK = new DataModelType("Network"); + /** Says this data model is abstractly a network */ + public static String NETWORK = "Network"; - /** Tree data model */ - public static DataModelType TREE = new DataModelType("Tree"); + /** Says this data model is abstractly a tree */ + public static String TREE = "Tree"; - /** Unknown data model */ - public static DataModelType OTHER = new DataModelType("Unknown"); - - private String name; - - /** - * Creates a new DataModelType object. - * - * @param name the name of this DataModelType - */ - public DataModelType(String name) { - this.name = name; - } - - /** - * Returns the name of this DataModelType. - * - * @return the name of this DataModelType - */ - public String getName() { - return name; - } - + /** Says this data model is abstractly an unknown type */ + public static String OTHER = "Unknown"; } Added: trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/package.html =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/package.html (rev 0) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/datamodel/package.html 2006-06-30 19:05:13 UTC (rev 80) @@ -0,0 +1,29 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>org.cishell.framework.datamodel Package-level Javadoc</title> +<!-- +/* **************************************************************************** + * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Apache License v2.0 which accompanies + * this distribution, and is available at: + * http://www.apache.org/licenses/LICENSE-2.0.html + * + * Created on Jun 30, 2006 at Indiana University. + * + * Contributors: + * Indiana University - Initial API Documentation + * ***************************************************************************/ +--> +</head> +<body>Provides interfaces required for creating DataModels +<h2>Package Specification</h2> +This package specifies the API related to creation of DataModels. + +TODO: Describe here what a DataModel is, how it is used, and why it is used. + +</body> +</html> \ No newline at end of file Added: trunk/core/org.cishell.framework/src/org/cishell/framework/doc-files/cishell-logo-400.png =================================================================== (Binary files differ) Property changes on: trunk/core/org.cishell.framework/src/org/cishell/framework/doc-files/cishell-logo-400.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/core/org.cishell.framework/src/org/cishell/framework/package.html =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/package.html (rev 0) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/package.html 2006-06-30 19:05:13 UTC (rev 80) @@ -0,0 +1,29 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>org.cishell.framework.algorithm Package-level Javadoc</title> +<!-- +/* **************************************************************************** + * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Apache License v2.0 which accompanies + * this distribution, and is available at: + * http://www.apache.org/licenses/LICENSE-2.0.html + * + * Created on Jun 29, 2006 at Indiana University. + * + * Contributors: + * Indiana University - Initial API Documentation + * ***************************************************************************/ +--> +</head> +<body>The base package of the CIShell framework specification +<h2>Package Specification</h2> +This package is the root package for the CIShell framework specification + +TODO: Talk about the framework and give links. + +</body> +</html> \ No newline at end of file Added: trunk/core/org.cishell.framework/src/org/cishell/overview.html =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/overview.html (rev 0) +++ trunk/core/org.cishell.framework/src/org/cishell/overview.html 2006-06-30 19:05:13 UTC (rev 80) @@ -0,0 +1,32 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>org.cishell.framework.algorithm Package-level Javadoc</title> +<!-- +/* **************************************************************************** + * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Apache License v2.0 which accompanies + * this distribution, and is available at: + * http://www.apache.org/licenses/LICENSE-2.0.html + * + * Created on Jun 29, 2006 at Indiana University. + * + * Contributors: + * Indiana University - Initial API Documentation + * ***************************************************************************/ +--> +</head> +<body> +This document is the API specification for the CIShell specification. + +@see <a href="http://www.osgi.org/osgi_technology/download_specs.asp">OSGi +Service Platform Specification, Release 4</a> +@see <a href="http://bundles.osgi.org/javadoc/r4/">OSGi Service Platform, +Release 4 API</a> +@see "The CIShell Specification Paper" + +</body> +</html> \ No newline at end of file Modified: trunk/core/org.cishell.framework/src/org/cishell/service/conversion/DataConversionService.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/service/conversion/DataConversionService.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/service/conversion/DataConversionService.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,14 +9,77 @@ * Created on Jun 14, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.service.conversion; import org.cishell.framework.algorithm.AlgorithmFactory; +import org.cishell.framework.datamodel.DataModel; +/** + * A service for converting data to different formats. This service should + * utilize the pool of {@link AlgorithmFactory} services which have registered + * with the OSGi service registry and specified in its service dictionary that + * they are a converter. A converter will specify what data format it takes in + * ('in_data'), what it converts it to ('out_data'), and whether any information + * will be lost in the conversion ('consersion'='lossless'|'lossy'). Using this + * and other standard algorithm properties, a DataConversionService will try and + * find the fastest, most efficient way to convert from a one format to another. + * + * @author Bruce Herr (bh...@bh...) + */ public interface DataConversionService { + + /** + * Finds a converter from one format to another if at all possible. The + * returned {@link AlgorithmFactory}, which may be a composite of multiple + * algorithms, will take a {@link DataModel} of the specified + * <code>inFormat</code> and convert it to a DataModel of type + * <code>outFormat</code>. If there is no way to convert the data model, + * <code>null</code> will be returned. + * + * @param inFormat The type of data model to be converted. This String + * should be formatted in the same way as an algorithm's + * {@link AlgorithmProperty#IN_DATA 'in_data'}. + * @param outFormat The type of data model that should be produced. This + * String should be formatted in the same way as an + * algorithm's + * {@link AlgorithmProperty#OUT_DATA 'out_data'}. + * @return An AlgorithmFactory that will convert a data model of the given + * inFormat to the given outFormat, or <code>null</code> if there is + * no way to convert. + */ public AlgorithmFactory converterFor(String inFormat, String outFormat); + + /** + * Finds a converter from one format to another falling within the given + * parameters. The max number of converters to use (maxHops) and the + * maximum allowed complexity for the converters to limit the impact a + * conversion will make. The returned {@link AlgorithmFactory}, which may + * be a composite of multiple algorithms, will take a {@link DataModel} of + * the specified <code>inFormat</code> and convert it to a DataModel of type + * <code>outFormat</code>. If there is no way to convert the data model + * within the given parameters, <code>null</code> will be returned. + * + * @param inFormat The type of data model to be converted. This String + * should be formatted in the same way as an algorithm's + * {@link AlgorithmProperty#IN_DATA 'in_data'}. + * @param outFormat The type of data model that should be produced. This + * String should be formatted in the same way as an + * algorithm's + * {@link AlgorithmProperty#OUT_DATA 'out_data'}. + * @param maxHops The maximum number of converters to use for the + * conversion. + * @param maxComplexity The maximum complexity the conversion algorithm can + * have in order to be considered for use in the + * conversion. The format of the String is in big-O + * notation. Examples are 'O(n)', 'O(n^2)', 'O(log(n))'. + * @return An AlgorithmFactory that will convert a data model of the given + * inFormat to the given outFormat, or <code>null</code> if there is + * no way to convert within the given parameters. + */ public AlgorithmFactory converterFor(String inFormat, String outFormat, int maxHops, String maxComplexity); + + //TODO: More methods of conversion here? } Added: trunk/core/org.cishell.framework/src/org/cishell/service/conversion/package.html =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/service/conversion/package.html (rev 0) +++ trunk/core/org.cishell.framework/src/org/cishell/service/conversion/package.html 2006-06-30 19:05:13 UTC (rev 80) @@ -0,0 +1,27 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>org.cishell.framework.datamodel Package-level Javadoc</title> +<!-- +/* **************************************************************************** + * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Apache License v2.0 which accompanies + * this distribution, and is available at: + * http://www.apache.org/licenses/LICENSE-2.0.html + * + * Created on Jun 30, 2006 at Indiana University. + * + * Contributors: + * Indiana University - Initial API Documentation + * ***************************************************************************/ +--> +</head> +<body>Provides the specification for the CIShell data conversion service +<h2>Package Specification</h2> +This package specifies the API related to the data conversion service. + +</body> +</html> \ No newline at end of file Modified: trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/GUI.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/GUI.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/GUI.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,16 +9,52 @@ * Created on Jun 14, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.service.guibuilder; import java.util.Dictionary; +/** + * A simple GUI for user interaction. A single {@link SelectionListener} can be + * set to be informed when the user enters information and hits Ok. + * + * @author Bruce Herr (bh...@bh...) + */ public interface GUI { + /** + * Pops up this GUI, gets data from the user, and returns what they entered. + * This is a convenience method that first opens the GUI, then pops the GUI + * up to the user, who then enters in the needed information, which is then + * taken and put into a {@link Dictionary}, and is given to this method's + * caller. + * + * @return The data the user entered or <code>null</code> if they cancelled + * the operation. + */ public Dictionary openAndWait(); + /** + * Opens the GUI and shows it to the user + */ public void open(); + + /** + * Closes the GUI + */ public void close(); + + /** + * Returns if the GUI is closed + * @return If the GUI has been closed or not + */ + public boolean isClosed(); + + /** + * Sets the selection listener to be informed when the user finishes + * entering information and hits 'Ok' or cancels. + * + * @param listener The listener to notify + */ public void setSelectionListener(SelectionListener listener); } Modified: trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/GUIBuilderService.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/GUIBuilderService.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/GUIBuilderService.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,18 +9,128 @@ * Created on Jun 14, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.service.guibuilder; import java.util.Dictionary; +import org.osgi.service.log.LogService; import org.osgi.service.metatype.MetaTypeProvider; +import org.osgi.service.metatype.MetaTypeService; +import org.osgi.service.metatype.ObjectClassDefinition; +/** + * A service for creating simple GUIs for user interaction. This service + * provides several methods for popping up dialog boxes to get or give very + * simple information and a more flexible way to create {@link GUI}s using a + * standard OSGi {@link MetaTypeProvider}. The MetaTypeProvider basically lists + * what input is needed (String, Integer, Float, etc...), a description of the + * input, and a way to validate input. There is also an XML format that OSGi + * provides a service ({@link MetaTypeService}) for that will parse the XML into + * a MetaTypeProvider instance. More information about MetaTypeProvider and + * MetaTypeService is available in the OSGi Service Platform Specification, + * Release 4 Service Compendium, Section 105 (pg 129). You can download it at + * <a href="http://www.osgi.org/osgi_technology/download_specs.asp"> + * http://www.osgi.org/osgi_technology/download_specs.asp</a>. + * + * Algorithm writers are encouraged to use this service if they need to get + * additional input from the user rather than creating their own GUI. This is + * to ensure a consistant user input method and so that the GUI can easily be + * routed to the user when running remotely. + * + * @author Bruce Herr (bh...@bh...) + */ public interface GUIBuilderService { + + /** + * Creates a GUI for user interaction + * + * @param id The id to use to get the correct + * {@link ObjectClassDefinition} from the provided + * MetaTypeProvider + * @param parameters Provides the parameters needed to get information from + * the user + * @return The created GUI + */ public GUI createGUI(String id, MetaTypeProvider parameters); - public GUI createPopup(String popupType); + /** + * Creates a GUI, gets data from the user, and returns what they entered. + * This is a convenience method that first creates a GUI from the provided + * {@link MetaTypeProvider}, then pops the GUI up to the user, who then + * enters in the needed information, which is then taken and put into a + * {@link Dictionary}, and is given to this method's caller. + * + * @param id The id to use to get the correct + * {@link ObjectClassDefinition} from the provided + * MetaTypeProvider + * @param parameters Provides the parameters needed to get information from + * the user + * @return The data the user entered or <code>null</code> if they cancelled + * the operation. + */ public Dictionary createGUIandWait(String id, MetaTypeProvider parameters); - public Dictionary createPopupAndWait(String popupType); + + /** + * Pops up a confirmation box to the user with an 'Ok' and 'Cancel' button + * + * @param title The title of the pop-up + * @param message The message to display + * @param detail Additional details + * @return If they clicked "Ok", <code>true</code>, otherwise + * <code>false</code> + */ + public boolean showConfirm(String title, String message, String detail); + + /** + * Pops up a question box to the user with a 'Yes' and 'No' button + * + * @param title The title of the pop-up + * @param message The question to display + * @param detail Additional details + * @return If they clicked "Yes", <code>true</code>, otherwise + * <code>false</code> + */ + public boolean showQuestion(String title, String message, String detail); + + /** + * Pops up an information box to the user. This should only be used + * sparingly. Algorithms should try to use the {@link LogService} instead. + * + * @param title The title of the pop-up + * @param message The message to display + * @param detail Additional details + */ + public void showInformation(String title, String message, String detail); + + /** + * Pops up a warning box to the user. This should only be used + * sparingly. Algorithms should try to use the {@link LogService} instead. + * + * @param title The title of the pop-up + * @param message The message to display + * @param detail Additional details + */ + public void showWarning(String title, String message, String detail); + + /** + * Pops up an error box to the user. This should only be used + * sparingly. Algorithms should try to use the {@link LogService} instead. + * + * @param title The title of the pop-up + * @param message The message to display + * @param detail Additional details + */ + public void showError(String title, String message, String detail); + + /** + * Pops up an error box to the user. This should only be used + * sparingly. Algorithms should try to use the {@link LogService} instead. + * + * @param title The title of the pop-up + * @param message The message to display + * @param error The actual exception that was thrown + */ + public void showError(String title, String message, Throwable error); } Modified: trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/SelectionListener.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/SelectionListener.java 2006-06-29 20:56:29 UTC (rev 79) +++ trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/SelectionListener.java 2006-06-30 19:05:13 UTC (rev 80) @@ -9,12 +9,29 @@ * Created on Jun 14, 2006 at Indiana University. * * Contributors: - * Indiana University - + * Indiana University - Initial API * ***************************************************************************/ package org.cishell.service.guibuilder; import java.util.Dictionary; +/** + * A listener that is notified when all values entered by a {@link GUI} user + * have been validated and they have clicked 'Ok' to proceed or if they + * cancelled the operation + * + * @author Bruce Herr (bh...@bh...) + */ public interface SelectionListener { - public boolean hitOk(Dictionary valuesEntered); + /** + * Notification that the user hit 'Ok' along with the data they entered + * + * @param valuesEntered The data the user entered + */ + public void hitOk(Dictionary valuesEntered); + + /** + * Notification that the user cancelled the operation + */ + public void cancelled(); } Added: trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/package.html =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/package.html (rev 0) +++ trunk/core/org.cishell.framework/src/org/cishell/service/guibuilder/package.html 2006-06-30 19:05:13 UTC (rev 80) @@ -0,0 +1,27 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>org.cishell.framework.datamodel Package-level Javadoc</title> +<!-- +/* **************************************************************************** + * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Apache License v2.0 which accompanies + * this distribution, and is available at: + * http://www.apache.org/licenses/LICENSE-2.0.html + * + * Created on Jun 30, 2006 at Indiana University. + * + * Contributors: + * Indiana University - Initial API Documentation + * ***************************************************************************/ +--> +</head> +<body>Provides the specification for the CIShell GUI builder service +<h2>Package Specification</h2> +This package specifies the API related to the GUI builder service. + +</body> +</html> \ 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: <bh...@us...> - 2006-06-29 20:09:41
|
Revision: 77 Author: bh2 Date: 2006-06-29 13:09:35 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=77&view=rev Log Message: ----------- initial commit of the new cishell Removed Paths: ------------- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java Deleted: trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java 2006-06-29 14:39:45 UTC (rev 76) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java 2006-06-29 20:09:35 UTC (rev 77) @@ -1,18 +0,0 @@ -/* **************************************************************************** - * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Apache License v2.0 which accompanies - * this distribution, and is available at: - * http://www.apache.org/licenses/LICENSE-2.0.html - * - * Created on Jun 13, 2006 at Indiana University. - * - * Contributors: - * Indiana University - Initial API - * ***************************************************************************/ -package org.cishell.framework.algorithm; - -public interface ProgressTrackable { - public int getPercentageDone(); -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 14:39:53
|
Revision: 76 Author: bh2 Date: 2006-06-29 07:39:45 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=76&view=rev Log Message: ----------- initial commit of the new cishell Added Paths: ----------- trunk/libs/jythonlib/.classpath trunk/libs/jythonlib/.project trunk/libs/jythonlib/.settings/ trunk/libs/jythonlib/.settings/org.eclipse.pde.core.prefs trunk/libs/jythonlib/META-INF/ trunk/libs/jythonlib/META-INF/MANIFEST.MF trunk/libs/jythonlib/build.properties trunk/libs/jythonlib/jython.jar Added: trunk/libs/jythonlib/.classpath =================================================================== --- trunk/libs/jythonlib/.classpath (rev 0) +++ trunk/libs/jythonlib/.classpath 2006-06-29 14:39:45 UTC (rev 76) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry exported="true" kind="lib" path="jython.jar"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: trunk/libs/jythonlib/.project =================================================================== --- trunk/libs/jythonlib/.project (rev 0) +++ trunk/libs/jythonlib/.project 2006-06-29 14:39:45 UTC (rev 76) @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>jythonlib</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/jythonlib/.settings/org.eclipse.pde.core.prefs =================================================================== --- trunk/libs/jythonlib/.settings/org.eclipse.pde.core.prefs (rev 0) +++ trunk/libs/jythonlib/.settings/org.eclipse.pde.core.prefs 2006-06-29 14:39:45 UTC (rev 76) @@ -0,0 +1,4 @@ +#Mon Jun 26 13:04:22 EST 2006 +eclipse.preferences.version=1 +pluginProject.equinox=false +pluginProject.extensions=false Added: trunk/libs/jythonlib/META-INF/MANIFEST.MF =================================================================== --- trunk/libs/jythonlib/META-INF/MANIFEST.MF (rev 0) +++ trunk/libs/jythonlib/META-INF/MANIFEST.MF 2006-06-29 14:39:45 UTC (rev 76) @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Jython Library +Bundle-SymbolicName: jythonlib +Bundle-Version: 2.2.1 +Bundle-ClassPath: jython.jar +Bundle-Vendor: jython.org +Bundle-Localization: plugin +Export-Package: com.ziclix.python.sql,com.ziclix.python.sql.connect,com.ziclix.python.sql.handler,com.ziclix.python.sql.pipe,com.ziclix.python.sql.pipe.csv,com.ziclix.python.sql.pipe.db,com.ziclix.python.sql.procedure,com.ziclix.python.sql.resource,com.ziclix.python.sql.util,javatests,jxxload_help,org.apache.oro.text.regex,org.python.compiler,org.python.core,org.python.modules,org.python.modules.sets,org.python.modules.sre,org.python.parser,org.python.parser.ast,org.python.rmi,org.python.util Added: trunk/libs/jythonlib/build.properties =================================================================== --- trunk/libs/jythonlib/build.properties (rev 0) +++ trunk/libs/jythonlib/build.properties 2006-06-29 14:39:45 UTC (rev 76) @@ -0,0 +1,2 @@ +bin.includes = META-INF/,\ + jython.jar Added: trunk/libs/jythonlib/jython.jar =================================================================== (Binary files differ) Property changes on: trunk/libs/jythonlib/jython.jar ___________________________________________________________________ Name: 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: <bh...@us...> - 2006-06-29 14:39:24
|
Revision: 74 Author: bh2 Date: 2006-06-29 07:39:22 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=74&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/libs/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 14:38:23
|
Revision: 72 Author: bh2 Date: 2006-06-29 07:37:54 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=72&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/clients/scripting/org.cishell.reference.scripting/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 14:38:17
|
Revision: 73 Author: bh2 Date: 2006-06-29 07:38:11 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=73&view=rev Log Message: ----------- Added Paths: ----------- trunk/clients/scripting/org.cishell.reference.scripting/.classpath trunk/clients/scripting/org.cishell.reference.scripting/.project trunk/clients/scripting/org.cishell.reference.scripting/.settings/ trunk/clients/scripting/org.cishell.reference.scripting/.settings/org.eclipse.pde.core.prefs trunk/clients/scripting/org.cishell.reference.scripting/META-INF/ trunk/clients/scripting/org.cishell.reference.scripting/META-INF/MANIFEST.MF trunk/clients/scripting/org.cishell.reference.scripting/build.properties trunk/clients/scripting/org.cishell.reference.scripting/src/ trunk/clients/scripting/org.cishell.reference.scripting/src/org/ trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/ trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/ trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/scripting/ trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/scripting/Activator.java trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/scripting/test.py Added: trunk/clients/scripting/org.cishell.reference.scripting/.classpath =================================================================== --- trunk/clients/scripting/org.cishell.reference.scripting/.classpath (rev 0) +++ trunk/clients/scripting/org.cishell.reference.scripting/.classpath 2006-06-29 14:38:11 UTC (rev 73) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: trunk/clients/scripting/org.cishell.reference.scripting/.project =================================================================== --- trunk/clients/scripting/org.cishell.reference.scripting/.project (rev 0) +++ trunk/clients/scripting/org.cishell.reference.scripting/.project 2006-06-29 14:38:11 UTC (rev 73) @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.cishell.reference.scripting</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.python.pydev.PyDevBuilder</name> + <arguments> + </arguments> + </buildCommand> + <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> + <nature>org.python.pydev.pythonNature</nature> + </natures> +</projectDescription> Added: trunk/clients/scripting/org.cishell.reference.scripting/.settings/org.eclipse.pde.core.prefs =================================================================== --- trunk/clients/scripting/org.cishell.reference.scripting/.settings/org.eclipse.pde.core.prefs (rev 0) +++ trunk/clients/scripting/org.cishell.reference.scripting/.settings/org.eclipse.pde.core.prefs 2006-06-29 14:38:11 UTC (rev 73) @@ -0,0 +1,4 @@ +#Mon Jun 26 12:56:43 EST 2006 +eclipse.preferences.version=1 +pluginProject.equinox=false +pluginProject.extensions=false Added: trunk/clients/scripting/org.cishell.reference.scripting/META-INF/MANIFEST.MF =================================================================== --- trunk/clients/scripting/org.cishell.reference.scripting/META-INF/MANIFEST.MF (rev 0) +++ trunk/clients/scripting/org.cishell.reference.scripting/META-INF/MANIFEST.MF 2006-06-29 14:38:11 UTC (rev 73) @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Reference Scripting Client +Bundle-SymbolicName: org.cishell.reference.scripting +Bundle-Version: 0.0.1 +Bundle-Activator: org.cishell.reference.scripting.Activator +Bundle-Localization: plugin +Import-Package: org.cishell.framework, + org.cishell.framework.algorithm, + org.cishell.framework.datamodel, + org.osgi.framework;version="1.3.0", + org.osgi.service.log;version="1.3.0", + org.python.core, + org.python.util Added: trunk/clients/scripting/org.cishell.reference.scripting/build.properties =================================================================== --- trunk/clients/scripting/org.cishell.reference.scripting/build.properties (rev 0) +++ trunk/clients/scripting/org.cishell.reference.scripting/build.properties 2006-06-29 14:38:11 UTC (rev 73) @@ -0,0 +1,4 @@ +output.. = bin/ +bin.includes = META-INF/,\ + . +source.. = src/ Added: trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/scripting/Activator.java =================================================================== --- trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/scripting/Activator.java (rev 0) +++ trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/scripting/Activator.java 2006-06-29 14:38:11 UTC (rev 73) @@ -0,0 +1,96 @@ +package org.cishell.reference.scripting; + +import java.util.Dictionary; + +import org.cishell.framework.CIShellContext; +import org.cishell.framework.LocalCIShellContext; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.osgi.service.log.LogEntry; +import org.osgi.service.log.LogListener; +import org.osgi.service.log.LogReaderService; +import org.python.core.Py; +import org.python.core.PyException; +import org.python.core.PySystemState; +import org.python.util.InteractiveConsole; + +public class Activator implements BundleActivator { + + /** + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(final BundleContext context) throws Exception { + CIShellContext ciContext = new LocalCIShellContext(context); + + LogListener listener = new LogListener() { + public void logged(LogEntry e) { + if (goodMessage(e.getMessage())) { + System.out.println(e.getMessage()); + } + } + + public boolean goodMessage(String msg) { + if (msg == null || + msg.startsWith("ServiceEvent ") || + msg.startsWith("BundleEvent ") || + msg.startsWith("FrameworkEvent ")) { + return false; + } else { + return true; + } + } + }; + + ServiceReference ref = context.getServiceReference(LogReaderService.class.getName()); + LogReaderService reader = (LogReaderService) context.getService(ref); + if (reader != null) { + reader.addLogListener(listener); + } + + Py.initPython(); + PySystemState sys = Py.getSystemState(); + sys.setClassLoader(this.getClass().getClassLoader()); + + Dictionary headers = context.getBundle().getHeaders(); + String importPackages = (String)headers.get("Import-Package"); + if(importPackages!=null) { + String[] result = importPackages.split(","); + for(int i=0; i<result.length; i++) { + String[] extra = result[i].split(";"); + + //if there are extra ;version="blah" options + //then get rid of them + if (extra != null && extra.length > 1) { + result[i] = extra[0]; + } + + PySystemState.add_package(result[i].trim()); + } + } + + InteractiveConsole interp = new InteractiveConsole(); + //ReadlineConsole interp = new ReadlineConsole(); + + interp.exec("import sys"); + interp.exec("def exit(): sys.exit()"); + interp.set("bContext", context); + interp.set("ciContext", ciContext); + + try { + String version = headers.get("Bundle-Version").toString(); + interp.interact("CIShell Console v" + version + "\n"); + } catch (PyException e) {} + + ref = context.getServiceReference(LogReaderService.class.getName()); + reader = (LogReaderService) context.getService(ref); + if (reader != null) { + reader.removeLogListener(listener); + } + } + + /** + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { } +} Added: trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/scripting/test.py =================================================================== --- trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/scripting/test.py (rev 0) +++ trunk/clients/scripting/org.cishell.reference.scripting/src/org/cishell/reference/scripting/test.py 2006-06-29 14:38:11 UTC (rev 73) @@ -0,0 +1,47 @@ +from java.util import Hashtable +from org.cishell.framework.algorithm import AlgorithmFactory + +def findAlgorithms(filter=None): + if not filter: + filter = "(objectClass=%s)" % AlgorithmFactory + + refs = bContext.getServiceReferences(str(AlgorithmFactory), filter) + return refs + +def getAlgorithm(ref): + if ref: + return bContext.getService(ref) + +def getService(service): + return bContext.getService(bContext.getServiceReference(str(service))) + +from org.cishell.framework.datamodel import BasicDataModel + +refs = findAlgorithms() +factory = getAlgorithm(refs[2]) +alg = factory.newInstance([BasicDataModel(None)],Hashtable(),ciContext) +dm1 = alg.execute() + +dm2 = [BasicDataModel("100"),] +factory = getAlgorithm(refs[0]) +alg = factory.newInstance(dm2,Hashtable(),ciContext) +dm3 = alg.execute() + +factory = getAlgorithm(refs[1]) +alg = factory.newInstance(dm3,Hashtable(),ciContext) +dm4 = alg.execute() + + +# possible other commands +from org.osgi.service.log import LogService +log = getService(LogService) + + +#other commands +for k in refs[0].getPropertyKeys(): print k, "=", refs[0].getProperty(k) + +for i in refs: + for k in i.getPropertyKeys(): + print k, "=", i.getProperty(k) + print + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 14:37:57
|
Revision: 71 Author: bh2 Date: 2006-06-29 07:37:51 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=71&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/clients/scripting/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 14:34:09
|
Revision: 66 Author: bh2 Date: 2006-06-29 07:34:04 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=66&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/client/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 14:25:25
|
Revision: 64 Author: bh2 Date: 2006-06-29 07:25:04 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=64&view=rev Log Message: ----------- initial commit of the new cishell Added Paths: ----------- trunk/core/org.cishell.docs/.project trunk/core/org.cishell.docs/.texlipse trunk/core/org.cishell.docs/src/ trunk/core/org.cishell.docs/src/draft-specification/ trunk/core/org.cishell.docs/src/draft-specification/draft-spec.tex trunk/core/org.cishell.docs/src/draft-specification/graphics/ trunk/core/org.cishell.docs/src/draft-specification/graphics/algorithmViewWorkflow.dia trunk/core/org.cishell.docs/src/draft-specification/graphics/algorithmViewWorkflow.png trunk/core/org.cishell.docs/src/draft-specification/graphics/classDiagram.dia trunk/core/org.cishell.docs/src/draft-specification/graphics/classDiagram.png trunk/core/org.cishell.docs/src/draft-specification/graphics/clientViewWorkflow.png trunk/core/org.cishell.docs/src/draft-specification/graphics/guiApplication.png trunk/core/org.cishell.docs/src/draft-specification/graphics/serviceDiagram.dia trunk/core/org.cishell.docs/src/draft-specification/graphics/serviceDiagram.png Added: trunk/core/org.cishell.docs/.project =================================================================== --- trunk/core/org.cishell.docs/.project (rev 0) +++ trunk/core/org.cishell.docs/.project 2006-06-29 14:25:04 UTC (rev 64) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.cishell.docs</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>net.sourceforge.texlipse.builder.TexlipseBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>net.sourceforge.texlipse.builder.TexlipseNature</nature> + </natures> +</projectDescription> Added: trunk/core/org.cishell.docs/.texlipse =================================================================== --- trunk/core/org.cishell.docs/.texlipse (rev 0) +++ trunk/core/org.cishell.docs/.texlipse 2006-06-29 14:25:04 UTC (rev 64) @@ -0,0 +1,12 @@ +#TeXlipse project settings +#Wed Jun 14 10:31:12 EST 2006 +builderNum=2 +outputDir=bin/ +makeIndSty= +outputFormat=pdf +tempDir=.tmp +mainTexFile=draft-spec.tex +outputFile=cishell-draft-spec.pdf +langSpell=en +markDer=true +srcDir=src/draft-specification/ Added: trunk/core/org.cishell.docs/src/draft-specification/draft-spec.tex =================================================================== --- trunk/core/org.cishell.docs/src/draft-specification/draft-spec.tex (rev 0) +++ trunk/core/org.cishell.docs/src/draft-specification/draft-spec.tex 2006-06-29 14:25:04 UTC (rev 64) @@ -0,0 +1,481 @@ +%%CIShell: Cyberinfrastructure Shell (http://www.cishell.org) +%% +%%Draft Specification +%%Creation Date: June 12, 2006 + +\documentclass[a4]{article} +\usepackage{graphicx} + +\title{CIShell: Cyberinfrastructure Shell\\A Novel Algorithm Integration +Framework\thanks{Developed at Indiana University's Cyberinfrastructure for +Network Science Center}\\ +\textbf{DRAFT} +} +\author{Bruce Herr (bh...@bh...) +\and Weixia (Bonnie) Huang (hu...@in...) +\and Shashikant Penumarthy (sp...@in...) +\and Katy B\"{o}rner (ka...@in...) +} + +\begin{document} + +\maketitle{} +\tableofcontents{} + +\newpage{} + +\section{Introduction} + +\subsection{The Problem} + +In the scientific world, we have a problem: We are duplicating our efforts. +Toolkits with much the same functionality are worked on for years and force +algorithm developers to write just for their framework to work. Many algorithms +are implemented multiple times due to not knowing about each other, idealogical +reasons, or incompatible toolkits. Algorithms are accessed and run in many, +many ways. Some are stuffed in a directory on a remote machine and must be +run manually on the command line and require varying file formats for +input/output. Some are only available in certain toolkits, and others require +programming to their api just to run them. + +So, what is wrong with having multiple implementations of algorithms and +incompatible toolkits? Its a waste of time, of which we have little of. If +there were an open framework for integrating algorithms, we could save much +time and effort. This framework would not be a one stop shop for all your +toolkit and algorithm needs though. We need competition, but on a more level +(and sane) playing field that encourages innovation and cooperation. If we were +to define how to integrate algorithms, then toolkit developers would be +encouraged to make novel clients on top of the integration framework. Algorithm +developers would vie with one another solely on the merit of their +implementation and not have to worry about any other issues such as +distribution, user interfaces, or toolkits. We could now have algorithm +developers concentrating on algorithms, toolkit developers concentrating on +toolkits, and scientists finally concentrating on doing science. In the end, +this will speed scientific progress and best use humanity's global brain. + +\subsection{A Solution} + +CIShell: Cyberinfrastructure Shell is an open source, community-driven +framework for integration of diverse algorithms, data, and computing power. It +provides a standard framework for algorithm developers to quickly get their +algorithm into the system and a base upon which novel clients to the algorithms +can be built on. + +\footnotetext[1]{http://www.osgi.org} + +In the spirit of not duplicating effort, CIShell is built upon the +OSGi\footnotemark[1] (Open Services Gateway Initiative) Framework. OSGi is a +standardized, component oriented, computing environment for networked services. +Founded in 1999, it has had much success in the commercial business world from +high-end servers to embedded mobile devices. In the open source realm, it is +finding more adoption, especially since Eclipse has moved its plugin model to +OSGi R4 starting with version 3.0 of eclipse. OSGi is a powerful framework that +will enable us to have a truly capable system. + +CIShell is all about integrating algorithms. The base framework defines a +standard for creating, accessing and running algorithms, services that the +algorithms can use, and separate services that toolkit developers can use to +create clients on top of the framework. + +For the purposes of this framework, we have made some assumptions. First, we +consider algorithms to be black boxes. We don't know what goes on when we call +on the algorithm to execute, we only assume that it takes in some data and +spits out some data. What happens in between, we stay out of. Second, we have +not addressed doing coupled displays with brushing and linking, though we are +confident that the CIShell Framework should be able to accomodate it in the +future. Finally, for the purposes of remote execution we do not address +visualizations in this context. For our purposes we have assumed that remote +execution will not be used for visualization, though ways to do this will be +explored in the future. + +\section{The Framework} +\label{TheFramework} + +The CIShell Framework defines an algorithm service, the standard services that +algorithms can use, and separate services that client applications can use. In +this section we will define these services and explain how they will be used +together in the framework. In section \ref{TheClients}, we will take you +through how several prototypical clients would work. + +A basic understanding of OSGi and Java is assumed here. If you are not familiar +with its terminology, please go to http://www.osgi.org/osgi\_technology/ for a +brief introduction to the technology. + +\subsection{Algorithm Definition} + +Algorithms in this system are packaged as standard OSGi bundles and integrated +into the system as services. There can be multiple algorithm services +registered from one bundle, but for each algorithm there will be only one +associated OSGi service. To be a service in the OSGi framework, a bundle must +provide three things: a Dictionary of key/value pairs (properties of the +service), one or more interfaces, and an instantiated implementation of the +interface(s). In the following sections we will describe what properties are +needed and define the service interfaces that must be implemented. + +\subsubsection{Standard Algorithm Properties} + +To have an algorithm integrated into the system, algorithm developers must +provide the proper meta-data to describe it. These properties are very +important, because based on the properties, we can query the ServiceRegistry +and do things like finding algorithms we need, finding where we need to put the +algorithms in a menu, and figuring out what meta-data should be shown to the +user. Below we will define an initial list of possible properties and how they +would be used in the system. + +\begin{itemize} +\item {\bf menu\_location=``menu/location/path/additions''} -- Where an algorithm +should go in the menu +\item {\bf label=``My Algorithm Label''} -- The label to use +\item {\bf in\_data=``java.class.name or file:type or Null or file-ext:ext, +\ldots''} -- What type of data it will take in +\item {\bf out\_data=``java.class.name or file:type or Null or file-ext:ext, +\ldots''} -- What type of data it will create when run +\item {\bf remoteable=``true or false''} -- if the algorithm can be run on a +remote server +\item {\bf remote=``http://remoteserver.com:1000''} -- if an algorithm is a remote algorithm, +where it is being hosted at +\item {\bf conversion=``lossy or lossless''} -- if an algorithm is a converter, +then whether the conversion is lossless or lossy. Otherwise it should not be set. +\item {\bf complexity=``O(complexity)''} -- An estimate of the big-O complexity +of the algorithm +\item {\bf description=``Algorithm Description''} -- A short description of the +algorithm +\item {\bf citation=``citation text for citing''} -- A citation to use when +citing this algorithm +\item {\bf citation\_url=``http://scholar.com/a.pdf''} -- A URL to the cited paper +\item {\bf implementor=``Implementor's Name, \ldots''} -- The name(s) of the implementor(s) +of the algorithm\item +\item {\bf documentation\_url=``http://my\_documentation.com''} -- An URL where +the documentation for the algorithm is +\end{itemize} + +\subsubsection{Algorithm Interfaces} + +An algorithm service consists of two main classes: the AlgorithmFactory and the +Algorithm. An AlgorithmFactory has two main tasks. First, an AlgorithmFactory +provides the parameters that are needed to create an Algorithm. Second, when +the client gives it a data model, a dictionary with the parameter values, and a +CIShellContext, the AlgorithmFactory will use this data to create an Algorithm. + +\begin{verbatim} +public interface AlgorithmFactory { + public MetaTypeProvider createParameters(); + public Algorithm newInstance(DataModel[] dm, + MetaTypeProvider parameters, + CIShellContext context); +} +\end{verbatim} + +The basic Algorithm interface is very simple. It only has an execute method. +This is because the algorithm factory already gave it all the information it +needs to run (data, parameters, and context). Now all that needs to be done is +crank the execute method and the algorithm will run and return a set of zero or +more DataModels representing the data it created. + +\begin{verbatim} +public interface Algorithm { + public DataModel[] execute(); +} +\end{verbatim} + +The AlgorithmFactory and the Algorithm can extend more interfaces if it wishes +to provide more service. An AlgorithmFactory can implement DataModelValidator +if it wishes to validate the DataModel more than what is provided in the +algorithm properties file. An example would be, if an algorithm worked on a +Matrix, but required it to be a symetric matrix. If an Algorithm can be stopped +midstream, it can implement the Stoppable interface to allow this. +Finally, if an Algorithm can report on the progress of its algorithm, it can +implement ProgressTrackable. + +\begin{verbatim} +public interface DataModelValidator { + public boolean supports(DataModel[] dm); + public String unsupportedReason(DataModel[] dm); +} + +public interface Stoppable { + public void stop(); + public boolean isStopped(); +} + +public interface ProgressTrackable { + public int getProgress(); +} +\end{verbatim} + +There are three more interfaces that an algorithm service writer must consider: +DataModel, CIShellContext, and MetaTypeProvider. The DataModel holds both the actual data +(represented as a Java Object) and its meta-data. The CIShellContext is used by +algorithms to gain access to standard services provided by the CIShell Framework +such as logging, preferences, and data conversion services. These standard +services will be described in section \ref{AlgorithmServices}. Finally, +MetaTypeProvider is documented in the OSGi standard as part of the metatype +service\footnotemark[2]. It is basically a way to describe what parameters will be needed. + +\footnotetext[2]{This is well documented in section 105 of the OSGi R4 Reference +Compendium located in the technology section of osgi.org} + +\begin{verbatim} +public interface DataModel { + public Object getProperty(String key); + public String[] getPropertyKeys(); + public void setProperty(String key, Object value); + + public Dictionary getProperties(); + public Object getData(); +} + +public interface CIShellContext { + public Object getService(String service); +} +\end{verbatim} + +\subsection{Algorithm Services} +\label{AlgorithmServices} + +The CIShell Framework provides several standard services that an algorithm can +gain access to. The four first standard services are the PreferencesService, +LogService, ConversionService, and GUIBuilderService. An algorithm gains access +to these services through the CIShellContext. One should note here, that you +could actually get these services through the ServiceRegistry, but by getting +them through the CIShellContext, it allows clients to return proxied services +that could pipe output to remote clients (this will be explained more in section +\ref{RemoteServer}). + +The PreferencesService allows an algorithm to save configuration information +between sessions. This service is provided by the standard OSGi +framework\footnotemark[3]. +\footnotetext[3]{section 106 of the OSGi R4 Reference +Compendium} + +\begin{verbatim} +public interface PreferencesService { + public Preferences getSystemPreferences(); + public Preferences getUserPreferences(String name); + public String[] getUsers(); +} +\end{verbatim} + +The LogService provides a standard logging mechanism for algorithms to use. This +service is also provided by the standard OSGi framework\footnotemark[4] +\footnotetext[4]{section 101 of the OSGi R4 Reference +Compendium} + +\begin{verbatim} +public interface LogService { + public void log(int level, String message); + public void log(int level, String message, Throwable exception); + public void log(ServiceReference reference, int level, String message); + public void log(ServiceReference reference, int level, String message, + Throwable exception); +} +\end{verbatim} + +The ConversionService is a CIShell defined service that is actually a thin +client to the algorithm services. It searches for AlgorithmFactory services +that have the conversion property set and creates a graph so that when an +algorithm (or whoever accesses the service) asks for a way to convert from +DataModel A to DataModel C, it will search its service graph for the optimal +sequence of converters to use to convert from A to C. For clients, this +conversion service can be used to do automatic conversions so a user will never +have to convert data types again. \textit{Note that the interface for this +service is not finalized.} + +\begin{verbatim} +public interface ConversionService { + public AlgorithmFactory converterFor(int max_hops, String max_complexity, + String in_format, String out_format); +} +\end{verbatim} + +Finally, the GUIBuilderService is a CIShell defined service that allows +algorithms to display simple GUIs and pop-ups to the user when needed. The GUI +is built from a given MetaTypeProvider as defined in the OSGi specification. +This GUI Builder simplifies the GUI creation process for algorithms. An +algorithm need only describe what values are needed and in what range and the +GUI builder will take care of translating that into a GUI for data input. Also, +since the GUIBuilderService is a part of the standard CIShell services, it can +be used when running remotely to display GUIs on the connected machine. +\textit{Note that the interfaces for this service is not finalized.} + +\begin{verbatim} +public interface GUIBuilderService { + public GUI createGUI(MetaTypeProvider parameters); + public GUI createPopUp(String popupType); +} + +public interface GUI { + public void open(); + public void close(); + public void setSelectionListener(SelectionListener listener); +} + +public interface SelectionListener { + public boolean hitOk(Dictionary valuesEntered); +} +\end{verbatim} + +\subsection{Client Services} + +The CIShell Framework also defines several services that clients to the +algorithms can use in addition to the standard algorithm services. These +services could also be used by the algorithms, but it is strongly discouraged +to simplify both the algorithm and client writers' jobs. The two first standard +client services are the SchedulerService and the ModelManagementService. + +The SchedulerService allows the client to schedule algorithms to be run either +immediately or at a certain time. The service will allow a user-defined number +of algorithms to be run at the same time. \textit{Note that the interfaces for +this service is not finalized.} + +\begin{verbatim} +public interface Scheduler { + public void runNow(Algorithm algorithm); + public void schedule(Algorithm algorithm); + public void schedule(Algorithm algorithm, Calendar time); + public boolean unschedule(Algorithm algorithm); + public boolean reschedule(Algorithm algorithm, Calendar newTime); + public void addSchedulerListener(SchedulerListener listener); + public void removeSchedulerListener(SchedulerListener listener); + public boolean isRunning(); + public boolean isEmpty(); +} + +public interface SchedulerListener { + public void algorithmMovedToRunningQueue(Algorithm algorithm, int index); + public void algorithmScheduled(Algorithm algorithm, Calendar time, int index); + public void algorithmScheduled(Algorithm algorithm, Calendar time); + public void algorithmStarted(Algorithm algorithm); + public void algorithmFinished(Algorithm algorithm, DataModel[] createdDM); + public void algorithmError(Algorithm algorithm, Exception error); +} +\end{verbatim} + +The ModelManagerService allows the client to manage models that are loaded into +memory. \textit{Note that the interfaces for this service is not finalized.} + +\begin{verbatim} +public interface ModelManager { + public void addModel(DataModel model); + public void removeModel(DataModel model); + public Set getSelectedModels(); + public void setSelectedModels(Set models); + public Set getModels(); +} +\end{verbatim} + +\subsection{Putting it All Together} + +In this section we will try to give you several views to help see how the +CIShell Framework fits together. In Figure \ref{ClassInteractionDiagram}, you +can see how the different objects interact with one another. Figure +\ref{serviceDiagram} shows how the services interact in the system. Figure +\ref{algorithmViewWorkflow} shows the three workflow scenarios an algorithm +writer has to deal with. And finally, Figure \ref{clientViewWorkflow} shows +what a typical client's workflow would be like. + +\begin{figure} +\centering +\includegraphics[width=120mm]{graphics/classDiagram.png} +\caption{Class Interaction Diagram} +\label{ClassInteractionDiagram} +\end{figure} + +\begin{figure} +\centering +\includegraphics[width=120mm]{graphics/serviceDiagram.png} +\caption{Service Diagram} +\label{serviceDiagram} +\end{figure} + +\begin{figure} +\centering +\includegraphics[width=120mm]{graphics/algorithmViewWorkflow.png} +\caption{Workflows from an Algorithm's Perspective} +\label{algorithmViewWorkflow} +\end{figure} + +\begin{figure} +\centering +\includegraphics[width=120mm]{graphics/clientViewWorkflow.png} +\caption{Typical Workflow from a Client's Perspective} +\label{clientViewWorkflow} +\end{figure} + +\section{Some Prototypical Clients} +\label{TheClients} + +In section \ref{TheFramework} we defined the CIShell Framework. Now we will +explain how some typical clients could use the framework. There is power in +providing the algorithms uniformly in that now we can support any way that the +user wishes to work. For example, the framework can be used as a typical GUI +application, as a remote service, as a scripting engine, and most excitingly as +a peer-to-peer client for sharing data, algorithms, and computing power! + +\subsection{Standard GUI} + +\begin{figure} +\centering +\includegraphics[width=120mm]{graphics/guiApplication.png} +\caption{Typical GUI client application, IVC} +\label{guiApplication} +\end{figure} + +\footnotetext[5]{http://sourceforge.net/projects/ivc} +\footnotetext[6]{http://nwb.slis.indiana.edu} + +The CIShell Framework should work beautifully with a GUI client. The previous +iterations of this project were all GUI based, so by far this is the most +supported. For making a client like the Information Visualization +Cyberinfrastructure Tool\footnotemark[5] (shown in figure \ref{guiApplication}) +or the Network Workbench Tool\footnotemark[6], both developed at IU, there +would be several steps. First, after the system has been brought up, the GUI +client would query the service registry to find all of the AlgorithmFactory +services and based upon their meta-data, would create menu items that when +clicked would pull out the AlgorithmFactory and follow the workflow from figure +\ref{clientViewWorkflow}. + +\subsection{Web Front-End} + +A web front-end could be done exactly like the GUI client, only using web +technologies to produce the UI in a web-browser. + +\subsection{Remote Server} +\label{RemoteServer} + +A remote server could be created by setting up services on both ends (local and +remote) that would create proxies for the algorithms and services offered by +CIShell. The local client would then just see new algorithms and would +(basically) have to do nothing differently, since all of the complexity is +behind the proxies. When the local client asks for an Algorithm from the +AlgorithmFactory it returns a proxied Algorithm, and when executed, it runs on +the remote server. On the remote server, when the local client requests an +AlgorithmFactory to return an Algorithm, instead of giving the AlgorithmFactory +the CIShellContext for the remote server, it would pass it a context that held +proxied services corresponding to the standard CIShell services on the local +client. Many design decisions were made with this scenario in mind. + +\subsection{Peer-to-peer sharing} + +Peer-to-peer sharing would be similar to a remote server. The major difference +would be that the client machine would share its algorithms and services with +the server machine. Then each peer would allow other peers to connect to it in +the same way to build a peer-to-peer network. This is an exciting possibility +that we hope to look into further in the future. + +\subsection{Scripting Engine} + +A scripting engine would allow a script writer to go through much of the +workflow described in figure \ref{clientViewWorkflow} programmatically using the +host scripting language. Most commands provided would then just be analogs to +the workflow, with perhaps some changes to make it easier for script writing. A +GUI client could also output these scripts as logs of what a user did for +playback at a later time to confirm results with colleagues. + +\subsection{Workflow-Engine} + +A workflow engine would act mainly like a scripting engine in that it creates +its itenerary of things to do ahead of time and runs it later. However, it could +also use aspects of a GUI client and utilize remote servers. + +\end{document} Added: trunk/core/org.cishell.docs/src/draft-specification/graphics/algorithmViewWorkflow.dia =================================================================== (Binary files differ) Property changes on: trunk/core/org.cishell.docs/src/draft-specification/graphics/algorithmViewWorkflow.dia ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/core/org.cishell.docs/src/draft-specification/graphics/algorithmViewWorkflow.png =================================================================== (Binary files differ) Property changes on: trunk/core/org.cishell.docs/src/draft-specification/graphics/algorithmViewWorkflow.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/core/org.cishell.docs/src/draft-specification/graphics/classDiagram.dia =================================================================== (Binary files differ) Property changes on: trunk/core/org.cishell.docs/src/draft-specification/graphics/classDiagram.dia ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/core/org.cishell.docs/src/draft-specification/graphics/classDiagram.png =================================================================== (Binary files differ) Property changes on: trunk/core/org.cishell.docs/src/draft-specification/graphics/classDiagram.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/core/org.cishell.docs/src/draft-specification/graphics/clientViewWorkflow.png =================================================================== (Binary files differ) Property changes on: trunk/core/org.cishell.docs/src/draft-specification/graphics/clientViewWorkflow.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/core/org.cishell.docs/src/draft-specification/graphics/guiApplication.png =================================================================== (Binary files differ) Property changes on: trunk/core/org.cishell.docs/src/draft-specification/graphics/guiApplication.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/core/org.cishell.docs/src/draft-specification/graphics/serviceDiagram.dia =================================================================== (Binary files differ) Property changes on: trunk/core/org.cishell.docs/src/draft-specification/graphics/serviceDiagram.dia ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/core/org.cishell.docs/src/draft-specification/graphics/serviceDiagram.png =================================================================== (Binary files differ) Property changes on: trunk/core/org.cishell.docs/src/draft-specification/graphics/serviceDiagram.png ___________________________________________________________________ Name: 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: <bh...@us...> - 2006-06-29 14:23:46
|
Revision: 61 Author: bh2 Date: 2006-06-29 07:23:41 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=61&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/core/org.cishell.feature/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 14:22:25
|
Revision: 60 Author: bh2 Date: 2006-06-29 07:22:22 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=60&view=rev Log Message: ----------- renaming framework dir to core Added Paths: ----------- trunk/core/ Removed Paths: ------------- trunk/framework/ Copied: trunk/core (from rev 59, trunk/framework) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 14:17:59
|
Revision: 54 Author: bh2 Date: 2006-06-29 07:17:47 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=54&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/framework/org.cishell.framework/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 14:16:16
|
Revision: 52 Author: bh2 Date: 2006-06-29 07:16:10 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=52&view=rev Log Message: ----------- Moving the old cishell code out of the trunk Removed Paths: ------------- trunk/features/ trunk/plugins/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-06-29 13:54:23
|
Revision: 51 Author: bh2 Date: 2006-06-29 06:54:19 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=51&view=rev Log Message: ----------- Moving the old cishell code out of the trunk Added Paths: ----------- branches/old-cishell/ Copied: branches/old-cishell (from rev 50, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2006-05-30 15:38:25
|
Revision: 48 Author: vowitaf Date: 2006-05-30 08:38:07 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=48&view=rev Log Message: ----------- Modified for 1.4 source compatibility. Yuck! Modified Paths: -------------- trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java Modified: trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java =================================================================== --- trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java 2006-05-09 20:14:46 UTC (rev 47) +++ trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java 2006-05-30 15:38:07 UTC (rev 48) @@ -12,7 +12,6 @@ import java.util.NoSuchElementException; import java.util.Timer; import java.util.TimerTask; -import java.util.Map.Entry; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import edu.iu.iv.core.Scheduler; @@ -126,15 +125,21 @@ return _isShutDown; } - @Deprecated + /** + * @see edu.iu.iv.core.Scheduler#moveDown(edu.iu.iv.core.algorithm.Algorithm) + * @deprecated + */ public boolean moveDown(Algorithm algorithm) { throw new RuntimeException( "Scheduler doesn't care about such orderings." + " Re-schedule the specified algorithm to run before the desired" + "algorithm. Attempted to move: " + algorithm); } - - @Deprecated + + /** + * @see edu.iu.iv.core.Scheduler#moveUp(edu.iu.iv.core.algorithm.Algorithm) + * @deprecated + */ public boolean moveUp(Algorithm algorithm) { throw new RuntimeException( "Scheduler doesn't care about such orderings." @@ -149,20 +154,19 @@ try { STATE algState = _algSchedulerTask.getAlgorithmState(algorithm); // Cannot reschedule running algs - switch (algState) { - case RUNNING: + if (algState.equals(STATE.RUNNING)) { status = false; - break; - case STOPPED: + } + else if (algState.equals(STATE.STOPPED)) { _algSchedulerTask.purgeFinished(); _algSchedulerTask.schedule(algorithm, newTime); status = true; - break; - case NEW: + } + else if (algState.equals(STATE.NEW)) { _algSchedulerTask.cancel(algorithm); _algSchedulerTask.schedule(algorithm, newTime); - break; - default: + } + else { throw new IllegalStateException( "Encountered an invalid state: " + algState); } @@ -187,7 +191,10 @@ _algSchedulerTask.schedule(algorithm, time); } - @Deprecated + /** + * @see edu.iu.iv.core.Scheduler#unblock(edu.iu.iv.core.algorithm.Algorithm) + * @deprecated + */ public void unblock(final Algorithm algorithm) { NotImplementedException n = new NotImplementedException(); n.initCause(new RuntimeException( @@ -195,7 +202,10 @@ + "Attempted to schedule: " + algorithm)); } - @Deprecated + /** + * @see edu.iu.iv.core.Scheduler#block(edu.iu.iv.core.algorithm.Algorithm) + * @deprecated + */ public void block(final Algorithm algorithm) { NotImplementedException n = new NotImplementedException(); n.initCause(new RuntimeException( @@ -229,10 +239,10 @@ */ class SchedulerListenerInformer implements SchedulerListener { - private List<SchedulerListener> _schedulerListeners; + private List _schedulerListeners; public SchedulerListenerInformer() { - _schedulerListeners = new ArrayList<SchedulerListener>(); + _schedulerListeners = new ArrayList(); } public void addSchedulerListener(SchedulerListener listener) { @@ -248,49 +258,65 @@ } public void algorithmMovedToRunningQueue(Algorithm algorithm, int index) { - for (SchedulerListener sl : _schedulerListeners) + for (Iterator iter = _schedulerListeners.iterator() ; iter.hasNext() ; ) { + SchedulerListener sl = (SchedulerListener) iter.next() ; sl.algorithmMovedToRunningQueue(algorithm, index); + } } public void algorithmScheduled(Algorithm algorithm, Calendar time, int index) { - for (SchedulerListener sl : _schedulerListeners) + for (Iterator iter = _schedulerListeners.iterator() ; iter.hasNext() ; ) { + SchedulerListener sl = (SchedulerListener) iter.next() ; sl.algorithmScheduled(algorithm, time, index); + } } public void algorithmScheduled(Algorithm algorithm, Calendar time) { - for (SchedulerListener sl : _schedulerListeners) + for (Iterator iter = _schedulerListeners.iterator() ; iter.hasNext() ; ) { + SchedulerListener sl = (SchedulerListener) iter.next() ; sl.algorithmScheduled(algorithm, time); + } } public synchronized void algorithmStarted(Algorithm algorithm) { - for (SchedulerListener sl : _schedulerListeners) + for (Iterator iter = _schedulerListeners.iterator() ; iter.hasNext() ; ) { + SchedulerListener sl = (SchedulerListener) iter.next() ; sl.algorithmStarted(algorithm); + } } public synchronized void algorithmFinished(Algorithm algorithm) { - for (SchedulerListener sl : _schedulerListeners) + for (Iterator iter = _schedulerListeners.iterator() ; iter.hasNext() ; ) { + SchedulerListener sl = (SchedulerListener) iter.next() ; sl.algorithmFinished(algorithm); + } } public void algorithmError(Algorithm algorithm) { - for (SchedulerListener sl : _schedulerListeners) + for (Iterator iter = _schedulerListeners.iterator() ; iter.hasNext() ; ) { + SchedulerListener sl = (SchedulerListener) iter.next() ; sl.algorithmError(algorithm); + } } public void algorithmMovedUpInRunningQueue(Algorithm algorithm) { - for (SchedulerListener sl : _schedulerListeners) + for (Iterator iter = _schedulerListeners.iterator() ; iter.hasNext() ; ) { + SchedulerListener sl = (SchedulerListener) iter.next() ; sl.algorithmMovedUpInRunningQueue(algorithm); + } } public void algorithmMovedDownInRunningQueue(Algorithm algorithm) { - for (SchedulerListener sl : _schedulerListeners) + for (Iterator iter = _schedulerListeners.iterator() ; iter.hasNext() ; ) { + SchedulerListener sl = (SchedulerListener) iter.next() ; sl.algorithmMovedDownInRunningQueue(algorithm); + } } } class AlgSchedulerTask extends TimerTask implements SchedulerListener { - private Map<Algorithm, AlgorithmTask> _algMap; + private Map _algMap; // Default allow as many as needed private int _maxSimultaneousAlgs = -1; @@ -323,7 +349,7 @@ public AlgSchedulerTask(SchedulerListener listener) { _algMap = Collections - .synchronizedMap(new HashMap<Algorithm, AlgorithmTask>()); + .synchronizedMap(new HashMap()); setSchedulerListener(listener); } @@ -333,7 +359,7 @@ } public synchronized final boolean cancel(Algorithm alg) { - AlgorithmTask task = this._algMap.get(alg); + AlgorithmTask task = (AlgorithmTask) this._algMap.get(alg); if (task == null) return false; // The algorithm will run till the end and @@ -344,26 +370,27 @@ } public synchronized final void schedule(Algorithm alg, Calendar time) { - AlgorithmTask task = this._algMap.get(alg); + AlgorithmTask task = (AlgorithmTask) this._algMap.get(alg); // If alg already exists, do some checks... if (task != null) { STATE state = task.getState(); - switch (state) { // If its still running, we can't schedule it again. - case RUNNING: + if (state.equals(STATE.RUNNING)) { throw new RuntimeException( "Cannot schedule running algorithm. Check state of algorithm first."); + } // If its new or waiting to run, we refuse to schedule it to force // user to explicitly // cancel and reschedule. - case NEW: + else if (state.equals(STATE.NEW)) { throw new RuntimeException( "Algorithm is already scheduled to run. Cancel existing schedule first."); - case STOPPED: + } + else if (state.equals(STATE.STOPPED)) { // If it was stopped but not cleaned up yet, clean it up purgeFinished(); - break; - default: + } + else { throw new IllegalStateException( "State was not one of allowable states: " + state); } @@ -381,7 +408,7 @@ * @return State of the specified algorithm. */ public synchronized final STATE getAlgorithmState(Algorithm alg) { - AlgorithmTask task = this._algMap.get(alg); + AlgorithmTask task = (AlgorithmTask) this._algMap.get(alg); if (task == null) throw new NoSuchElementException("Algorithm doesn't exist."); return task.getState(); @@ -392,11 +419,11 @@ */ public synchronized final void purgeFinished() { synchronized (this) { - Iterator<Entry<Algorithm, AlgorithmTask>> iter = this._algMap + Iterator iter = this._algMap .entrySet().iterator(); while (iter.hasNext()) { - Entry<Algorithm, AlgorithmTask> entry = iter.next(); - AlgorithmTask task = entry.getValue(); + Map.Entry entry = (Map.Entry) iter.next(); + AlgorithmTask task = (AlgorithmTask) entry.getValue(); if (task.getState() == STATE.STOPPED) iter.remove(); } @@ -408,14 +435,14 @@ && (_numRunning >= _maxSimultaneousAlgs); } - @Override public void run() { synchronized (this) { // If we are runing the max allowable, wait until next turn. Date now = Calendar.getInstance().getTime(); // Iterate through algorithms. - Collection<AlgorithmTask> tasks = this._algMap.values(); - for (AlgorithmTask task : tasks) { + Collection tasks = this._algMap.values(); + for (Iterator iter = tasks.iterator() ; iter.hasNext() ;) { + AlgorithmTask task = (AlgorithmTask) iter.next() ; if (_limitReached()) return; if ((task.getState() == STATE.NEW) @@ -486,13 +513,23 @@ * * @author Team IVC */ - public static enum STATE { + static final class STATE { + private String _name ; + public STATE(String name) { + this._name = name ; + } + public final boolean equals(Object object) { + if (! (object instanceof STATE)) + return false ; + STATE state = (STATE) object ; + return state._name.compareTo(_name) == 0; + } /** New algorithms are in this state. */ - NEW, + public static final STATE NEW = new STATE("NEW") ; /** Running algorithms are in this state. */ - RUNNING, + public static final STATE RUNNING = new STATE("RUNNING") ; /** Algorithms either cancelled or finished are in this state. */ - STOPPED + public static final STATE STOPPED = new STATE("STOPPED") ; } private volatile boolean _noRun = false; @@ -500,7 +537,7 @@ public synchronized final boolean cancel() { if (_noRun) return true; - if (_state == STATE.RUNNING) + if (_state.equals(STATE.RUNNING)) return false; _state = STATE.STOPPED; _noRun = true; @@ -562,22 +599,21 @@ this._state = state; // Inform listeners if (_schedulerListener != null) { - switch (this._state) { - case NEW: + if (this._state.equals(STATE.NEW)) { _schedulerListener.algorithmScheduled(_alg, _scheduledTime); - break; - case RUNNING: + } + else if (this._state.equals(STATE.RUNNING)) { _schedulerListener.algorithmStarted(_alg); - break; - case STOPPED: + } + else if (this._state.equals(STATE.STOPPED)) { _noRun = true; boolean status = getStatus(); if (status) _schedulerListener.algorithmFinished(_alg); else _schedulerListener.algorithmError(_alg); - break; - default: + } + else { throw new IllegalStateException( "Encountered illegal algorithm state: " + _state); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2006-05-09 20:17:31
|
Revision: 47 Author: vowitaf Date: 2006-05-09 13:14:46 -0700 (Tue, 09 May 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=47&view=rev Log Message: ----------- Realized that there were a few bugs in the implementation: - Timer is sequential, not parallel so individual algorithms are run on a thread instead. - Synchronization wasn't correct leading to scheduler scheduling more algorithms than specified as the limit sometimes. - Cancellation wasn't done properly so that cancelled algorithms would end up running anyway! Modified Paths: -------------- trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java Modified: trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java =================================================================== --- trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java 2006-05-08 23:59:18 UTC (rev 46) +++ trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java 2006-05-09 20:14:46 UTC (rev 47) @@ -2,6 +2,7 @@ import java.util.ArrayList; import java.util.Calendar; +import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.HashMap; @@ -9,7 +10,6 @@ import java.util.List; import java.util.Map; import java.util.NoSuchElementException; -import java.util.Set; import java.util.Timer; import java.util.TimerTask; import java.util.Map.Entry; @@ -23,20 +23,44 @@ /** * A simple scheduler based on {@link java.util.Timer}. * - * The scheduler starts a timer which runs as long as the scheduler is running. - * New algorithms are scheduled by giving them to an algorithm scheduler task - * which is itself scheduled on a different timer and called periodically. The - * scheduler task scans its list of algorithms, checks their state and schedules - * them to run if their scheduled time is the current time or has already - * passed. The algorithms themselves are scheduled on a timer other than the one - * on which the scheduler task is running. The scheduler task also enforces a - * limit on the number of algorithms run if so desired. This limit overrides - * algorithm schedule so that setting a limit too low may cause the algorithm - * run queue to be full of waiting algorithms. + * <b>Implementation Notes:</b> + * <ul> + * <li> The scheduler starts a TimerTask which runs as long as the scheduler is + * running. This scheduler TimerTask checks its list of algorithms, removes + * algorithms that have finished running and sets new ones running if + * appropriate. It decides whether or not to run an algorithm by checking their + * state and schedules them to run if their scheduled time is the current time + * or has already passed. This TimerTask is scheduler on a Timer of its own and + * is set to run periodically. New algorithms are scheduled by giving them to + * the scheduler TimerTask task.</li> + * <li> Algorithms themselves inform the scheduler listener of events. However, + * only the scheduler TimerTask has access to these tasks and only one scheduler + * listener is allowed per algorithm. This listener happens to be the scheduler + * TimerTask, which informs the scheduler of events, which in turn informs all + * the other listeners. </li> + * <li>The scheduler task also enforces a limit on the number of algorithms run + * if so desired. This limit overrides algorithm schedule so that setting a + * limit too low may cause the algorithm run queue to be full of waiting + * algorithms. However, this limit can be safely changed at runtime.</li> + * <li>Running algorithms can neither be paused nor stopped reliably so such + * methods have either been deprecated and/or they will throw + * NotImplementedException.</li> + * <li> By default this, scheduler allows an unlimited number of algorithms to + * run. </li> + * <li> This scheduler TimerTask runs continuously even if the algorithm queue + * is empty. If that's not desired, modify the code such that an empty queue + * causes the scheduler thread to sleep and to be woken up in response to events + * such as a new algorithm being scheduled.</li> + * <li>If more control or more UI integration is required, consider + * implementing a scheduler based on the Eclipse Jobs API. </li> + * <li>If more reliability is required (such as making guarantees that an + * algorithm will absolutely run at the specified time), do not set limits on + * the number of algorithms to be run. Also if more features are needed in the + * future such as the ability to serialize schedules, or run algorithms based on + * combinations of conditions or provide the ability to veto the running of an + * algorithm, consider using Quartz http://www.opensymphony.com/quartz/ </li> + * </ul> * - * NOTE: By default this, scheduler allows an unlimited number of algorithms to - * run. - * * @author Team CIShell */ // May 8, 2006 7:05:32 PM Shashikant Penumarthy: Initial Implementation @@ -48,11 +72,6 @@ private Timer _schedulerTimer; /** - * The timer that actually runs the algorithms. - */ - private Timer _algRunningTimer; - - /** * The task which schedules algorithms to run on the _algRunningTimer. */ private AlgSchedulerTask _algSchedulerTask; @@ -69,32 +88,44 @@ public JavaTimerBasedScheduler(int maxSimultaneousAlgsLimit) { this(); _algSchedulerTask.setMaxSimultaneousAlgs(maxSimultaneousAlgsLimit); + _isShutDown = false; } + public synchronized final void setMaxSimultaneousAlgs(int max) { + _algSchedulerTask.setMaxSimultaneousAlgs(max); + } + private final void _initialize() { - _schedulerTimer = new Timer(); - _algRunningTimer = new Timer(); + _schedulerTimer = new Timer(true); _schedulerListenerInformer = new SchedulerListenerInformer(); - _algSchedulerTask = new AlgSchedulerTask(_algRunningTimer, - _schedulerListenerInformer); - _schedulerTimer.schedule(_algSchedulerTask, 0L, 1000L); + _algSchedulerTask = new AlgSchedulerTask(_schedulerListenerInformer); + _schedulerTimer.schedule(_algSchedulerTask, 0L, 500L); } public synchronized final void shutDown() { _algSchedulerTask.cancel(); - _algRunningTimer.cancel(); _schedulerTimer.cancel(); + _isShutDown = true; } - public boolean isEmpty() { - return (_algSchedulerTask.getNumAlgsInState(STATE.RUNNING) > 0) - || (_algSchedulerTask.getNumAlgsInState(STATE.NEW) > 0); + public final boolean isEmpty() { + return _algSchedulerTask.isEmpty(); } - public boolean isRunning() { - return _algSchedulerTask.getNumAlgsInState(STATE.RUNNING) > 0; + public final boolean isRunning() { + return numRunning() > 0; } + public final int numRunning() { + return _algSchedulerTask.numRunning(); + } + + private boolean _isShutDown = true; + + public final boolean isShutDown() { + return _isShutDown; + } + @Deprecated public boolean moveDown(Algorithm algorithm) { throw new RuntimeException( @@ -128,12 +159,12 @@ status = true; break; case NEW: - status = _algSchedulerTask.cancel(algorithm); - if (status) - _algSchedulerTask.schedule(algorithm, newTime); + _algSchedulerTask.cancel(algorithm); + _algSchedulerTask.schedule(algorithm, newTime); break; default: - throw new RuntimeException("WTF!!"); + throw new IllegalStateException( + "Encountered an invalid state: " + algState); } } catch (NoSuchElementException nsee) { _algSchedulerTask.schedule(algorithm, newTime); @@ -231,12 +262,12 @@ sl.algorithmScheduled(algorithm, time); } - public void algorithmStarted(Algorithm algorithm) { + public synchronized void algorithmStarted(Algorithm algorithm) { for (SchedulerListener sl : _schedulerListeners) sl.algorithmStarted(algorithm); } - public void algorithmFinished(Algorithm algorithm) { + public synchronized void algorithmFinished(Algorithm algorithm) { for (SchedulerListener sl : _schedulerListeners) sl.algorithmFinished(algorithm); } @@ -257,37 +288,40 @@ } } -class AlgSchedulerTask extends TimerTask { +class AlgSchedulerTask extends TimerTask implements SchedulerListener { private Map<Algorithm, AlgorithmTask> _algMap; // Default allow as many as needed private int _maxSimultaneousAlgs = -1; - private Timer _timer; - /** * Maximum number of algorithms allowed to run simultaneously. This value - * can be changed at runtime without any problems. Allowable values are -1 - * (for no limit) and values > 0. If unacceptable values are given, they are - * ignored. + * can be changed at runtime without any problems. Negative values are + * interpreted to mean 'no limit'. * * @param max * The maximum number of algorithms that can be simultaneously * run. */ public synchronized final void setMaxSimultaneousAlgs(final int max) { - if (max < -1 || max == 0) - return; - this._maxSimultaneousAlgs = max; + if (max < -1) + this._maxSimultaneousAlgs = -1; + else + this._maxSimultaneousAlgs = max; } + public synchronized final boolean isEmpty() { + return _algMap.size() == 0; + } + + public synchronized final int numRunning() { + return _numRunning; + } + private SchedulerListener _schedulerListener; - public AlgSchedulerTask(final Timer timer, SchedulerListener listener) { - // Timer must not be null. Miserably fail otherwise. - assert (timer != null) : "Set timer running first."; - _timer = timer; + public AlgSchedulerTask(SchedulerListener listener) { _algMap = Collections .synchronizedMap(new HashMap<Algorithm, AlgorithmTask>()); setSchedulerListener(listener); @@ -300,19 +334,9 @@ public synchronized final boolean cancel(Algorithm alg) { AlgorithmTask task = this._algMap.get(alg); - // If the task doesn't exist, it is equivalent to have been - // cancelled. if (task == null) - return true; - // If this is already stopped and is waiting to be cleaned up, clean it - // up first. - if (task.getState() == STATE.STOPPED) { - purgeFinished(); - return true; - } - // Note that getting a return value of true here does not mean the task - // is no longer running. It just means it has been scheduled for - // successful cancellation. The algorithm will run till the end and + return false; + // The algorithm will run till the end and // then stop so there's no real way to cancel running algorithms. // Clients should always check the state of an algorithm before trying // to reschedule an existing algorithm. @@ -329,7 +353,8 @@ case RUNNING: throw new RuntimeException( "Cannot schedule running algorithm. Check state of algorithm first."); - // If its new, we refuse to schedule it to force user to explicitly + // If its new or waiting to run, we refuse to schedule it to force + // user to explicitly // cancel and reschedule. case NEW: throw new RuntimeException( @@ -343,7 +368,7 @@ "State was not one of allowable states: " + state); } } - this._algMap.put(alg, new AlgorithmTask(alg, time, _schedulerListener)); + this._algMap.put(alg, new AlgorithmTask(alg, time, this)); } public synchronized final int getMaxSimultaneousAlgs() { @@ -355,43 +380,18 @@ * The algorithm whose state we want to query. * @return State of the specified algorithm. */ - public final STATE getAlgorithmState(Algorithm alg) { - synchronized (_algMap) { - AlgorithmTask task = this._algMap.get(alg); - if (task == null) - throw new NoSuchElementException("Algorithm doesn't exist."); - return task.getState(); - } + public synchronized final STATE getAlgorithmState(Algorithm alg) { + AlgorithmTask task = this._algMap.get(alg); + if (task == null) + throw new NoSuchElementException("Algorithm doesn't exist."); + return task.getState(); } /** - * @param state - * The state we are interested in. - * @return The number of algorithms in the specified state. - */ - public final int getNumAlgsInState(STATE state) { - int count = 0; - for (AlgorithmTask task : this._algMap.values()) - if (task != null && task.getState() == state) - count++; - return count; - } - - /** - * @return true if we have reached the limit of how many algs we can run, - * false otherwise. If limit is set to -1, always returns false, - * i.e. no limit. - */ - private final boolean _limitReached() { - int max = getMaxSimultaneousAlgs(); - return (max != -1) && (getNumAlgsInState(STATE.RUNNING) >= max); - } - - /** * Removes all finished algorithms from the queue. */ public synchronized final void purgeFinished() { - synchronized (this._algMap) { + synchronized (this) { Iterator<Entry<Algorithm, AlgorithmTask>> iter = this._algMap .entrySet().iterator(); while (iter.hasNext()) { @@ -403,31 +403,68 @@ } } + private synchronized final boolean _limitReached() { + return (_maxSimultaneousAlgs != -1) + && (_numRunning >= _maxSimultaneousAlgs); + } + @Override public void run() { - purgeFinished(); - synchronized (_algMap) { + synchronized (this) { // If we are runing the max allowable, wait until next turn. - if (_limitReached()) - return; + Date now = Calendar.getInstance().getTime(); // Iterate through algorithms. - Set<Entry<Algorithm, AlgorithmTask>> entrySet = this._algMap - .entrySet(); - for (Entry<Algorithm, AlgorithmTask> entry : entrySet) { - // Check this at every point. + Collection<AlgorithmTask> tasks = this._algMap.values(); + for (AlgorithmTask task : tasks) { if (_limitReached()) - break; - AlgorithmTask task = entry.getValue(); - Date now = Calendar.getInstance().getTime(); - // Only schedule algorithms that are fit to be scheduled. + return; if ((task.getState() == STATE.NEW) - && now.compareTo(task.getScheduledTime().getTime()) <= 0) { + && now.compareTo(task.getScheduledTime().getTime()) >= 0) { // Run immediately - _timer.schedule(task, 0L); + task.start(); } } } } + + public void algorithmMovedToRunningQueue(Algorithm algorithm, int index) { + _schedulerListener.algorithmMovedToRunningQueue(algorithm, index); + } + + public void algorithmScheduled(Algorithm algorithm, Calendar time, int index) { + _schedulerListener.algorithmScheduled(algorithm, time, index); + } + + public void algorithmScheduled(Algorithm algorithm, Calendar time) { + _schedulerListener.algorithmScheduled(algorithm, time); + } + + private volatile int _numRunning = 0; + + public synchronized void algorithmStarted(Algorithm algorithm) { + _numRunning++; + _schedulerListener.algorithmStarted(algorithm); + } + + public void algorithmFinished(Algorithm algorithm) { + purgeFinished(); + _numRunning--; + _schedulerListener.algorithmFinished(algorithm); + } + + public void algorithmError(Algorithm algorithm) { + purgeFinished(); + _numRunning--; + _schedulerListener.algorithmError(algorithm); + } + + public void algorithmMovedUpInRunningQueue(Algorithm algorithm) { + _schedulerListener.algorithmMovedUpInRunningQueue(algorithm); + } + + public void algorithmMovedDownInRunningQueue(Algorithm algorithm) { + _schedulerListener.algorithmMovedDownInRunningQueue(algorithm); + } } /** @@ -442,7 +479,7 @@ * @author Team CIShell */ // May 8, 2006 7:19:00 PM Shashikant Penumarthy: Initial implementation. -class AlgorithmTask extends TimerTask { +class AlgorithmTask implements Runnable { /** * The states in which algorithm tasks can exist. @@ -450,7 +487,7 @@ * @author Team IVC */ public static enum STATE { - /** Newly scheduled algorithms are in this state. */ + /** New algorithms are in this state. */ NEW, /** Running algorithms are in this state. */ RUNNING, @@ -458,13 +495,32 @@ STOPPED } + private volatile boolean _noRun = false; + + public synchronized final boolean cancel() { + if (_noRun) + return true; + if (_state == STATE.RUNNING) + return false; + _state = STATE.STOPPED; + _noRun = true; + return _noRun; + } + + public synchronized final void start() { + if (_noRun) + return; + _setState(STATE.RUNNING); + new Thread(this).start(); + } + private final Algorithm _alg; // NOTE: TimerTask keeps its own schedule variable which can be retrieved // using scheduledExecutionTime() method. We don't use that here. private final Calendar _scheduledTime; - private STATE _state; + private volatile STATE _state; /** * Execution status of the algorithm (i.e.) return value. @@ -504,7 +560,7 @@ private synchronized final void _setState(STATE state) { this._state = state; - // Inform listener appropriately + // Inform listeners if (_schedulerListener != null) { switch (this._state) { case NEW: @@ -514,11 +570,16 @@ _schedulerListener.algorithmStarted(_alg); break; case STOPPED: + _noRun = true; boolean status = getStatus(); if (status) _schedulerListener.algorithmFinished(_alg); else _schedulerListener.algorithmError(_alg); + break; + default: + throw new IllegalStateException( + "Encountered illegal algorithm state: " + _state); } } } @@ -527,10 +588,8 @@ return this._state; } - @Override public void run() { try { - _setState(STATE.RUNNING); _status = _alg.execute(); } catch (Exception e) { // TODO: This is a really bad idea. We should just This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bea...@us...> - 2006-05-09 01:08:55
|
Revision: 44 Author: bearsfan Date: 2006-05-08 12:02:57 -0700 (Mon, 08 May 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=44&view=rev Log Message: ----------- Added support to extract the name from an algorithm and then appending it to the files produced Modified Paths: -------------- trunk/plugins/core/edu.iu.iv.core.rcp/src/edu/iu/iv/core/util/staticexecutable/StaticExecutableRunner.java Modified: trunk/plugins/core/edu.iu.iv.core.rcp/src/edu/iu/iv/core/util/staticexecutable/StaticExecutableRunner.java =================================================================== --- trunk/plugins/core/edu.iu.iv.core.rcp/src/edu/iu/iv/core/util/staticexecutable/StaticExecutableRunner.java 2006-04-10 20:14:13 UTC (rev 43) +++ trunk/plugins/core/edu.iu.iv.core.rcp/src/edu/iu/iv/core/util/staticexecutable/StaticExecutableRunner.java 2006-05-08 19:02:57 UTC (rev 44) @@ -22,7 +22,6 @@ import org.eclipse.core.runtime.Platform; -import edu.iu.iv.common.property.PropertyMap; import edu.iu.iv.core.IVC; import edu.iu.iv.core.UnsupportedModelException; import edu.iu.iv.core.datamodels.BasicDataModel; @@ -30,23 +29,43 @@ import edu.iu.iv.core.datamodels.DataModelProperty; import edu.iu.iv.core.datamodels.DataModelType; import edu.iu.iv.core.persistence.BasicFileResourceDescriptor; -import edu.iu.iv.core.persistence.FileResourceDescriptor; import edu.iu.iv.core.persistence.PersistenceException; import edu.iu.iv.core.persistence.PersistenceRegistry; import edu.iu.iv.core.persistence.Persister; +/** + * Drops to the command line to execute a native program + * @author Team NWB + */ public class StaticExecutableRunner { - String arguments; - File[] extraFiles; - String tempDirectory; - Map fileToInfoMap; + private String arguments; + private File[] extraFiles; + private String tempDirectory; + private Map fileToInfoMap; + + //To set the hierarchy in the data model viewer + private DataModel parentDataModel; + private String parentFilename; + /** + * Initialize class level variables + * + */ public StaticExecutableRunner() { - tempDirectory = makeTempDirectory(); - fileToInfoMap = new HashMap(); + tempDirectory = makeTempDirectory(); + fileToInfoMap = new HashMap(); + parentDataModel = null; + parentFilename = null; } - + + + /** + * Execute the plugin by copying the application into a temporary directory + * and then executing it + * @param pluginID ID of the plugin to execute + */ public void execute(String pluginID) { + //Get the plugin ResourceBundle properties = getResourceBundle(pluginID); if (properties == null) { @@ -61,6 +80,7 @@ String baseexecutable = properties.getString(pluginID + ".baseexecutable"); + //Get the system's environment String os = Platform.getOS(); String arch = Platform.getOSArch(); @@ -70,6 +90,7 @@ baseexecutable += ".exe"; } + //Create the directory to execute String executableDir = properties.getString(pluginID + "." + platform); executableDir = pluginPath + subdirectory + File.separator + executableDir; @@ -95,25 +116,33 @@ } } + //execute the program getting all of the new files File[] outputs = execute(tempDirectory, baseexecutable); if (outputs.length > 0) { + //New files were created, get persisters for them + ArrayList arrayList = new ArrayList(); //OutputtedFilesDialog.showGUI(outputs); + + String pluginName = properties.getString(pluginID + ".name"); + for (int i = 0; i < outputs.length; i++) { - Object model = null; - String label = null; - DataModelType type = null; - + DataModel dataModel = null; if (fileToInfoMap.containsKey(outputs[i].getName())) { + //there was a specialized persister registered for this file FileInfo fileInfo = (FileInfo)fileToInfoMap.get(outputs[i].getName()); - fileInfo.setFileDesc(new BasicFileResourceDescriptor(outputs[i])); - Persister p = fileInfo.getPersister(); try { - model = p.restore(fileInfo.getFileDesc()); - label = fileInfo.getTitle(); - type = fileInfo.getType(); + dataModel = new BasicDataModel(p.restore(new BasicFileResourceDescriptor(outputs[i]))); + dataModel.getProperties().setPropertyValue(DataModelProperty.LABEL, + fileInfo.getTitle() + + " (" + + pluginName + + ")"); + dataModel.getProperties().setPropertyValue(DataModelProperty.TYPE, + fileInfo.getType()); + } catch (OutOfMemoryError e) { e.printStackTrace(); } catch (IOException e) { @@ -122,14 +151,15 @@ e.printStackTrace(); } } else { + //Use the general file persister for the file PersistenceRegistry perReg = IVC.getInstance() .getPersistenceRegistry(); try { - model = perReg.load(new BasicFileResourceDescriptor( - outputs[i])); - //label = outputs[i].toString(); - label = outputs[i].getName(); - type = DataModelType.OTHER; + dataModel = + new BasicDataModel(perReg.load(new BasicFileResourceDescriptor(outputs[i]))); + dataModel.getProperties().setPropertyValue(DataModelProperty.LABEL, + outputs[i].getName() + " (" + pluginName + ")"); + dataModel.getProperties().setPropertyValue(DataModelProperty.TYPE, DataModelType.OTHER); } catch (OutOfMemoryError e) { e.printStackTrace(); } catch (IOException e) { @@ -139,44 +169,56 @@ } } - if (model != null && label != null && type != null) { - DataModel dataModel = new BasicDataModel(model); - PropertyMap propMap = dataModel.getProperties(); - propMap.put(DataModelProperty.LABEL, label); - propMap.put(DataModelProperty.TYPE, type); - try { + if (outputs[i].getName().equals(this.parentFilename) && dataModel != null) { + //There exists a parent data model for all output of this plugin + this.parentDataModel = dataModel; + try { IVC.getInstance().addModel(dataModel); } catch (UnsupportedModelException e) { e.printStackTrace(); } + } + else { + //else just add the model to the list + arrayList.add(dataModel); + } + + } //end for + + //Add the datamodels to IVC + for (int i = 0; i < arrayList.size(); ++i) { + DataModel dm = (DataModel)arrayList.get(i); + if (this.parentDataModel != null) { + dm.getProperties().setPropertyValue(DataModelProperty.PARENT, + this.parentDataModel); + } + try { + IVC.getInstance().addModel(dm); + } catch (UnsupportedModelException e) { + e.printStackTrace(); } } + } else { IVC.getInstance().getConsole().print("No output detected."); } - - //remove(getTempDirectory()); } -/* - private void remove(File file) { - if (file.isDirectory()) { - File[] files = file.listFiles(); - - for (int i=0; i < files.length; i++) { - remove(files[i]); - } - } - - file.delete(); - } - */ - + /** + * Get the temporary directory this class is running in + * @return The temporary file + */ public File getTempDirectory() { return new File(tempDirectory); } - public File[] execute(String basedirectory, String executable) { + /** + * Drops to the command line and executes the program + * @param basedirectory The directory where the necessary files to execute reside + * @param executable The name of the program to execute + * @return List of generated files + */ + private File[] execute(String basedirectory, String executable) { String execFile = basedirectory + File.separator + executable; File dir = new File(basedirectory); @@ -185,6 +227,7 @@ if (arguments == null) arguments = ""; try { + //Drops to console to execute Runtime.getRuntime().exec(execFile + " " + arguments, null, new File(basedirectory)).waitFor(); IVC.getInstance().getConsole().print("Execution of " + executable + " complete.\n"); @@ -194,7 +237,7 @@ IVC.showError("Error Executing!",e.getMessage(),null);; } - + //get the outputted files String[] afterFiles = dir.list(); Arrays.sort(beforeFiles); @@ -226,9 +269,10 @@ } /** - * - * @param from - * @param to + * Copies files whether they are directories or regular files to the destination + * directory + * @param from File to copy from + * @param to File to copy to */ private void copy(File from, File to) { if (from.isDirectory()) { @@ -266,6 +310,10 @@ } } + /** + * Create a temporary directory for the executable runner + * @return The name of the temporary directory + */ private String makeTempDirectory() { String temp = IVC.getInstance().getTemporaryFilesFolder(); File dir = null; @@ -281,10 +329,19 @@ return dir.toString(); } + /** + * Prints an error message to IVC + * @param msg The error message + */ protected void errorLog(String msg) { IVC.getInstance().getErrorLogger().error(msg); } + /** + * Retrieve the properties of the plugin (file location, architecture, etc) + * @param pluginID The name of the plugin + * @return Properties of the plugin + */ private ResourceBundle getResourceBundle(String pluginID) { String pluginFSPath = IVC.getInstance().getPluginPath(pluginID); @@ -300,22 +357,64 @@ return null; } + /** + * Sets any arguments to pass through the command line + * @param args The argument to pass + */ public void setArguments(String args) { this.arguments = args; } + /** + * Get the current arguments + * @return The arguments + */ public String getArguments() { return arguments; } + /** + * Set the extra files needed + * @param files An array of files + */ public void setExtraFilesNeeded(File[] files) { extraFiles = files; } + /** + * Retrieve the extra files needed by the plugin + * @return Array of files + */ public File[] getExtraFilesNeeded() { return extraFiles; } + /** + * Set the datamodel's filename that will be the parent of all the + * output produced. The filename will be a product of the algorithm + * executed. + * @param filename Filename of parent + */ + public void setParentFilename(String filename) { + this.parentFilename = filename; + } + + /** + * Parent datamodel for all of the output produced. + * @param dm Parent datamodel + */ + public void setParentDataModel(DataModel dm) { + this.parentDataModel = dm; + } + + /** + * Register a file with a persister. + * + * @param filename Filename of the persister + * @param title Title of datamodel + * @param type Type of data (network, text file, etc) + * @param persister The persister of the file + */ public void registerFile(String filename, String title, DataModelType type, Persister persister) { @@ -326,46 +425,59 @@ } /** + * Holds the fileinfo for any registered files * * @author Team IVC - * */ private class FileInfo { - private FileResourceDescriptor fileDesc; private String filename; private String title; private DataModelType type; private Persister persister; + /** + * Populate the file data + * @param filename Name of the file + * @param title Title of the datamodel + * @param type Type of datamodel contained in the file + * @param persister Persister handling the file + */ public void setInfo(String filename, String title, DataModelType type, Persister persister) { this.filename = filename; this.title = title; this.type = type; this.persister = persister; - this.fileDesc = null; } - public void setFileDesc(FileResourceDescriptor frd) { - this.fileDesc = frd; - } - + /** + * The filename + * @return filename + */ public String getFilename() { return this.filename; } - - public FileResourceDescriptor getFileDesc() { - return this.fileDesc; - } - + + /** + * Title of the datamodel produced + * @return Title + */ public String getTitle() { return this.title; } + /** + * Type of datamodel produced + * @return Datamodel type + */ public DataModelType getType() { return this.type; } + /** + * The persister of the file + * @return Persister + */ public Persister getPersister() { return this.persister; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vo...@us...> - 2006-05-08 23:59:32
|
Revision: 46 Author: vowitaf Date: 2006-05-08 16:59:18 -0700 (Mon, 08 May 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=46&view=rev Log Message: ----------- - Fixed some small syntax things like extra semicolons, modified ivc.product to work for mac os x and created a new scheduler implementation based on java.util.Timer which needs error checking and testing. Modified Paths: -------------- trunk/features/core/edu.iu.iv.core-feature/feature.xml trunk/plugins/core/edu.iu.iv.core/java/test/edu/iu/iv/internal/BasicSchedulerTester.java trunk/plugins/ui/rcp/edu.iu.iv.gui/plugin.xml trunk/plugins/ui/rcp/edu.iu.iv.gui/src/edu/iu/iv/core/EclipseIVCConfiguration.java trunk/plugins/ui/rcp/edu.iu.iv.swtguibuilder/src/edu/iu/iv/gui/builder/builder/PallettedListBuilder.java Added Paths: ----------- trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java Modified: trunk/features/core/edu.iu.iv.core-feature/feature.xml =================================================================== --- trunk/features/core/edu.iu.iv.core-feature/feature.xml 2006-05-08 19:49:46 UTC (rev 45) +++ trunk/features/core/edu.iu.iv.core-feature/feature.xml 2006-05-08 23:59:18 UTC (rev 46) @@ -4,9 +4,9 @@ label="IVC Core" version="1.0.4" provider-name="Team IVC" - os="linux,win32" - ws="gtk,motif,win32" - arch="x86,x86_64"> + os="linux,macosx,win32" + ws="carbon,gtk,motif,win32" + arch="ppc,x86,x86_64"> <description url="http://ivc.sourceforge.net/"> The Information Visualization Software Framework Core. @@ -48,14 +48,14 @@ id="org.apache.lucene" download-size="0" install-size="0" - version="1.4.3" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.ui" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin @@ -65,7 +65,7 @@ arch="x86" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" fragment="true" unpack="false"/> @@ -76,7 +76,7 @@ arch="x86_64" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" fragment="true" unpack="false"/> @@ -87,7 +87,7 @@ arch="x86" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" fragment="true" unpack="false"/> @@ -95,126 +95,126 @@ id="org.eclipse.core.runtime" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.update.ui" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.core.expressions" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.help" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.jface" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.osgi" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.swt" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.ui.forms" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.ui.workbench" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.update.configurator" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="org.eclipse.update.core" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> <plugin id="edu.iu.iv.consoleview" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" unpack="false"/> <plugin id="edu.iu.iv.core" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" unpack="false"/> <plugin id="edu.iu.iv.datamodelview" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" unpack="false"/> <plugin id="edu.iu.iv.gui" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" unpack="false"/> <plugin id="edu.iu.iv.guimessagehandler" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" unpack="false"/> <plugin id="edu.iu.iv.persistence" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" unpack="false"/> <plugin id="edu.iu.iv.schedulerview" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" unpack="false"/> <plugin @@ -224,7 +224,7 @@ arch="x86" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" fragment="true" unpack="false"/> @@ -232,21 +232,21 @@ id="edu.iu.iv.swtguibuilder" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" unpack="false"/> <plugin id="edu.iu.iv.common" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" unpack="false"/> <plugin id="edu.iu.iv.core.rcp" download-size="0" install-size="0" - version="1.0.4" + version="0.0.0" fragment="true" unpack="false"/> @@ -254,7 +254,15 @@ id="org.eclipse.core.commands" download-size="0" install-size="0" - version="3.1.0" + version="0.0.0" unpack="false"/> + <plugin + id="org.eclipse.swt.carbon.macosx.ppc" + download-size="0" + install-size="0" + version="0.0.0" + fragment="true" + unpack="false"/> + </feature> Added: trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java =================================================================== --- trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java (rev 0) +++ trunk/plugins/core/edu.iu.iv.core/java/src/edu/iu/iv/internal/JavaTimerBasedScheduler.java 2006-05-08 23:59:18 UTC (rev 46) @@ -0,0 +1,544 @@ +package edu.iu.iv.internal; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import java.util.Timer; +import java.util.TimerTask; +import java.util.Map.Entry; + +import sun.reflect.generics.reflectiveObjects.NotImplementedException; +import edu.iu.iv.core.Scheduler; +import edu.iu.iv.core.SchedulerListener; +import edu.iu.iv.core.algorithm.Algorithm; +import edu.iu.iv.internal.AlgorithmTask.STATE; + +/** + * A simple scheduler based on {@link java.util.Timer}. + * + * The scheduler starts a timer which runs as long as the scheduler is running. + * New algorithms are scheduled by giving them to an algorithm scheduler task + * which is itself scheduled on a different timer and called periodically. The + * scheduler task scans its list of algorithms, checks their state and schedules + * them to run if their scheduled time is the current time or has already + * passed. The algorithms themselves are scheduled on a timer other than the one + * on which the scheduler task is running. The scheduler task also enforces a + * limit on the number of algorithms run if so desired. This limit overrides + * algorithm schedule so that setting a limit too low may cause the algorithm + * run queue to be full of waiting algorithms. + * + * NOTE: By default this, scheduler allows an unlimited number of algorithms to + * run. + * + * @author Team CIShell + */ +// May 8, 2006 7:05:32 PM Shashikant Penumarthy: Initial Implementation +public class JavaTimerBasedScheduler implements Scheduler { + + /** + * This timer runs the algorithm scheduling task. + */ + private Timer _schedulerTimer; + + /** + * The timer that actually runs the algorithms. + */ + private Timer _algRunningTimer; + + /** + * The task which schedules algorithms to run on the _algRunningTimer. + */ + private AlgSchedulerTask _algSchedulerTask; + + /** + * Convenience object for informing all the schedulers. + */ + private SchedulerListenerInformer _schedulerListenerInformer; + + public JavaTimerBasedScheduler() { + _initialize(); + } + + public JavaTimerBasedScheduler(int maxSimultaneousAlgsLimit) { + this(); + _algSchedulerTask.setMaxSimultaneousAlgs(maxSimultaneousAlgsLimit); + } + + private final void _initialize() { + _schedulerTimer = new Timer(); + _algRunningTimer = new Timer(); + _schedulerListenerInformer = new SchedulerListenerInformer(); + _algSchedulerTask = new AlgSchedulerTask(_algRunningTimer, + _schedulerListenerInformer); + _schedulerTimer.schedule(_algSchedulerTask, 0L, 1000L); + } + + public synchronized final void shutDown() { + _algSchedulerTask.cancel(); + _algRunningTimer.cancel(); + _schedulerTimer.cancel(); + } + + public boolean isEmpty() { + return (_algSchedulerTask.getNumAlgsInState(STATE.RUNNING) > 0) + || (_algSchedulerTask.getNumAlgsInState(STATE.NEW) > 0); + } + + public boolean isRunning() { + return _algSchedulerTask.getNumAlgsInState(STATE.RUNNING) > 0; + } + + @Deprecated + public boolean moveDown(Algorithm algorithm) { + throw new RuntimeException( + "Scheduler doesn't care about such orderings." + + " Re-schedule the specified algorithm to run before the desired" + + "algorithm. Attempted to move: " + algorithm); + } + + @Deprecated + public boolean moveUp(Algorithm algorithm) { + throw new RuntimeException( + "Scheduler doesn't care about such orderings." + + " Re-schedule the specified algorithm to run after the desired" + + "algorithm Attempted to move: " + algorithm); + } + + public boolean reschedule(Algorithm algorithm, Calendar newTime) { + // Shaky method. Ideally this is done at a higher level. But still, here + // goes... + boolean status = false; + try { + STATE algState = _algSchedulerTask.getAlgorithmState(algorithm); + // Cannot reschedule running algs + switch (algState) { + case RUNNING: + status = false; + break; + case STOPPED: + _algSchedulerTask.purgeFinished(); + _algSchedulerTask.schedule(algorithm, newTime); + status = true; + break; + case NEW: + status = _algSchedulerTask.cancel(algorithm); + if (status) + _algSchedulerTask.schedule(algorithm, newTime); + break; + default: + throw new RuntimeException("WTF!!"); + } + } catch (NoSuchElementException nsee) { + _algSchedulerTask.schedule(algorithm, newTime); + status = true; + } + return status; + } + + public void runNow(Algorithm algorithm) { + // There is currently no difference between this one and + // schedule(Algorithm). + schedule(algorithm); + } + + public void schedule(Algorithm algorithm) { + _algSchedulerTask.schedule(algorithm, Calendar.getInstance()); + } + + public void schedule(Algorithm algorithm, Calendar time) { + _algSchedulerTask.schedule(algorithm, time); + } + + @Deprecated + public void unblock(final Algorithm algorithm) { + NotImplementedException n = new NotImplementedException(); + n.initCause(new RuntimeException( + "Cannot block algs reliably so this feature will be removed. " + + "Attempted to schedule: " + algorithm)); + } + + @Deprecated + public void block(final Algorithm algorithm) { + NotImplementedException n = new NotImplementedException(); + n.initCause(new RuntimeException( + "Cannot block algs reliably so this feature will be removed. " + + "Attempted to schedule: " + algorithm)); + } + + public boolean unschedule(Algorithm algorithm) { + return _algSchedulerTask.cancel(algorithm); + } + + public void addSchedulerListener(SchedulerListener listener) { + _schedulerListenerInformer.addSchedulerListener(listener); + } + + public void removeSchedulerListener(SchedulerListener listener) { + _schedulerListenerInformer.removeSchedulerListener(listener); + } + +} + +/** + * Utility class to handle all the listener informing tasks. Strictly speaking, + * we don't want listener inform methods to hold up the rest of the system. In + * other words, its possible that a listener starts doing some big operation as + * a response to some state change of an algorithm, tying up the whole system. + * So to prevent this, a better solution would be for each listener informer + * sequence to be run in a separate thread. + * + * @author Team IVC + */ +class SchedulerListenerInformer implements SchedulerListener { + + private List<SchedulerListener> _schedulerListeners; + + public SchedulerListenerInformer() { + _schedulerListeners = new ArrayList<SchedulerListener>(); + } + + public void addSchedulerListener(SchedulerListener listener) { + if (listener == null) + throw new NullPointerException("Null listeners not allowed!"); + + if (!_schedulerListeners.contains(listener)) + _schedulerListeners.add(listener); + } + + public void removeSchedulerListener(SchedulerListener listener) { + _schedulerListeners.remove(listener); + } + + public void algorithmMovedToRunningQueue(Algorithm algorithm, int index) { + for (SchedulerListener sl : _schedulerListeners) + sl.algorithmMovedToRunningQueue(algorithm, index); + } + + public void algorithmScheduled(Algorithm algorithm, Calendar time, int index) { + for (SchedulerListener sl : _schedulerListeners) + sl.algorithmScheduled(algorithm, time, index); + } + + public void algorithmScheduled(Algorithm algorithm, Calendar time) { + for (SchedulerListener sl : _schedulerListeners) + sl.algorithmScheduled(algorithm, time); + } + + public void algorithmStarted(Algorithm algorithm) { + for (SchedulerListener sl : _schedulerListeners) + sl.algorithmStarted(algorithm); + } + + public void algorithmFinished(Algorithm algorithm) { + for (SchedulerListener sl : _schedulerListeners) + sl.algorithmFinished(algorithm); + } + + public void algorithmError(Algorithm algorithm) { + for (SchedulerListener sl : _schedulerListeners) + sl.algorithmError(algorithm); + } + + public void algorithmMovedUpInRunningQueue(Algorithm algorithm) { + for (SchedulerListener sl : _schedulerListeners) + sl.algorithmMovedUpInRunningQueue(algorithm); + } + + public void algorithmMovedDownInRunningQueue(Algorithm algorithm) { + for (SchedulerListener sl : _schedulerListeners) + sl.algorithmMovedDownInRunningQueue(algorithm); + } +} + +class AlgSchedulerTask extends TimerTask { + + private Map<Algorithm, AlgorithmTask> _algMap; + + // Default allow as many as needed + private int _maxSimultaneousAlgs = -1; + + private Timer _timer; + + /** + * Maximum number of algorithms allowed to run simultaneously. This value + * can be changed at runtime without any problems. Allowable values are -1 + * (for no limit) and values > 0. If unacceptable values are given, they are + * ignored. + * + * @param max + * The maximum number of algorithms that can be simultaneously + * run. + */ + public synchronized final void setMaxSimultaneousAlgs(final int max) { + if (max < -1 || max == 0) + return; + this._maxSimultaneousAlgs = max; + } + + private SchedulerListener _schedulerListener; + + public AlgSchedulerTask(final Timer timer, SchedulerListener listener) { + // Timer must not be null. Miserably fail otherwise. + assert (timer != null) : "Set timer running first."; + _timer = timer; + _algMap = Collections + .synchronizedMap(new HashMap<Algorithm, AlgorithmTask>()); + setSchedulerListener(listener); + } + + public synchronized final void setSchedulerListener( + SchedulerListener listener) { + _schedulerListener = listener; + } + + public synchronized final boolean cancel(Algorithm alg) { + AlgorithmTask task = this._algMap.get(alg); + // If the task doesn't exist, it is equivalent to have been + // cancelled. + if (task == null) + return true; + // If this is already stopped and is waiting to be cleaned up, clean it + // up first. + if (task.getState() == STATE.STOPPED) { + purgeFinished(); + return true; + } + // Note that getting a return value of true here does not mean the task + // is no longer running. It just means it has been scheduled for + // successful cancellation. The algorithm will run till the end and + // then stop so there's no real way to cancel running algorithms. + // Clients should always check the state of an algorithm before trying + // to reschedule an existing algorithm. + return task.cancel(); + } + + public synchronized final void schedule(Algorithm alg, Calendar time) { + AlgorithmTask task = this._algMap.get(alg); + // If alg already exists, do some checks... + if (task != null) { + STATE state = task.getState(); + switch (state) { + // If its still running, we can't schedule it again. + case RUNNING: + throw new RuntimeException( + "Cannot schedule running algorithm. Check state of algorithm first."); + // If its new, we refuse to schedule it to force user to explicitly + // cancel and reschedule. + case NEW: + throw new RuntimeException( + "Algorithm is already scheduled to run. Cancel existing schedule first."); + case STOPPED: + // If it was stopped but not cleaned up yet, clean it up + purgeFinished(); + break; + default: + throw new IllegalStateException( + "State was not one of allowable states: " + state); + } + } + this._algMap.put(alg, new AlgorithmTask(alg, time, _schedulerListener)); + } + + public synchronized final int getMaxSimultaneousAlgs() { + return this._maxSimultaneousAlgs; + } + + /** + * @param alg + * The algorithm whose state we want to query. + * @return State of the specified algorithm. + */ + public final STATE getAlgorithmState(Algorithm alg) { + synchronized (_algMap) { + AlgorithmTask task = this._algMap.get(alg); + if (task == null) + throw new NoSuchElementException("Algorithm doesn't exist."); + return task.getState(); + } + } + + /** + * @param state + * The state we are interested in. + * @return The number of algorithms in the specified state. + */ + public final int getNumAlgsInState(STATE state) { + int count = 0; + for (AlgorithmTask task : this._algMap.values()) + if (task != null && task.getState() == state) + count++; + return count; + } + + /** + * @return true if we have reached the limit of how many algs we can run, + * false otherwise. If limit is set to -1, always returns false, + * i.e. no limit. + */ + private final boolean _limitReached() { + int max = getMaxSimultaneousAlgs(); + return (max != -1) && (getNumAlgsInState(STATE.RUNNING) >= max); + } + + /** + * Removes all finished algorithms from the queue. + */ + public synchronized final void purgeFinished() { + synchronized (this._algMap) { + Iterator<Entry<Algorithm, AlgorithmTask>> iter = this._algMap + .entrySet().iterator(); + while (iter.hasNext()) { + Entry<Algorithm, AlgorithmTask> entry = iter.next(); + AlgorithmTask task = entry.getValue(); + if (task.getState() == STATE.STOPPED) + iter.remove(); + } + } + } + + @Override + public void run() { + purgeFinished(); + synchronized (_algMap) { + // If we are runing the max allowable, wait until next turn. + if (_limitReached()) + return; + // Iterate through algorithms. + Set<Entry<Algorithm, AlgorithmTask>> entrySet = this._algMap + .entrySet(); + for (Entry<Algorithm, AlgorithmTask> entry : entrySet) { + // Check this at every point. + if (_limitReached()) + break; + AlgorithmTask task = entry.getValue(); + Date now = Calendar.getInstance().getTime(); + // Only schedule algorithms that are fit to be scheduled. + if ((task.getState() == STATE.NEW) + && now.compareTo(task.getScheduledTime().getTime()) <= 0) { + // Run immediately + _timer.schedule(task, 0L); + } + } + } + } +} + +/** + * This task keeps all algorithm related state within itself, thus saving us + * from using a ton of different data structures to keep track of all state. + * + * It also assumes responsibility for informing scheduler listeners itself. + * + * Clients should never have access to this class directly. Of course, even if + * they do, there really isn't anyway they can change the state of this thing. + * + * @author Team CIShell + */ +// May 8, 2006 7:19:00 PM Shashikant Penumarthy: Initial implementation. +class AlgorithmTask extends TimerTask { + + /** + * The states in which algorithm tasks can exist. + * + * @author Team IVC + */ + public static enum STATE { + /** Newly scheduled algorithms are in this state. */ + NEW, + /** Running algorithms are in this state. */ + RUNNING, + /** Algorithms either cancelled or finished are in this state. */ + STOPPED + } + + private final Algorithm _alg; + + // NOTE: TimerTask keeps its own schedule variable which can be retrieved + // using scheduledExecutionTime() method. We don't use that here. + private final Calendar _scheduledTime; + + private STATE _state; + + /** + * Execution status of the algorithm (i.e.) return value. + */ + private boolean _status; + + /** + * Deliberately allow only one listener. Its not the algorithms job to do + * all the informing. + */ + private SchedulerListener _schedulerListener; + + public AlgorithmTask(Algorithm alg, Calendar scheduledTime, + SchedulerListener listener) { + _alg = alg; + _scheduledTime = scheduledTime; + _schedulerListener = listener; + _init(); + } + + public synchronized final Calendar getScheduledTime() { + // Do a defensive copy cuz we don't want clients changing + // the time using this reference! + Calendar calendar = Calendar.getInstance(); + calendar.setTime(this._scheduledTime.getTime()); + return calendar; + } + + private final void _init() { + _status = false; + _setState(STATE.NEW); + } + + public synchronized final boolean getStatus() { + return _status; + } + + private synchronized final void _setState(STATE state) { + this._state = state; + // Inform listener appropriately + if (_schedulerListener != null) { + switch (this._state) { + case NEW: + _schedulerListener.algorithmScheduled(_alg, _scheduledTime); + break; + case RUNNING: + _schedulerListener.algorithmStarted(_alg); + break; + case STOPPED: + boolean status = getStatus(); + if (status) + _schedulerListener.algorithmFinished(_alg); + else + _schedulerListener.algorithmError(_alg); + } + } + } + + public synchronized final STATE getState() { + return this._state; + } + + @Override + public void run() { + try { + _setState(STATE.RUNNING); + _status = _alg.execute(); + } catch (Exception e) { + // TODO: This is a really bad idea. We should just + // let this exception bubble up all the way to the top instead + // of casting a wide net like this. + _status = false; + } finally { + _setState(STATE.STOPPED); + } + } +} \ No newline at end of file Modified: trunk/plugins/core/edu.iu.iv.core/java/test/edu/iu/iv/internal/BasicSchedulerTester.java =================================================================== --- trunk/plugins/core/edu.iu.iv.core/java/test/edu/iu/iv/internal/BasicSchedulerTester.java 2006-05-08 19:49:46 UTC (rev 45) +++ trunk/plugins/core/edu.iu.iv.core/java/test/edu/iu/iv/internal/BasicSchedulerTester.java 2006-05-08 23:59:18 UTC (rev 46) @@ -202,7 +202,9 @@ private class DummyAlgorithm implements Algorithm { public boolean execute() { - while(blocked); + while(blocked) { + // busy wait? + } if(error) throw new RuntimeException("aaah"); else Modified: trunk/plugins/ui/rcp/edu.iu.iv.gui/plugin.xml =================================================================== --- trunk/plugins/ui/rcp/edu.iu.iv.gui/plugin.xml 2006-05-08 19:49:46 UTC (rev 45) +++ trunk/plugins/ui/rcp/edu.iu.iv.gui/plugin.xml 2006-05-08 23:59:18 UTC (rev 46) @@ -26,10 +26,19 @@ <extension point="org.eclipse.core.runtime.products" id="ivc"> <product application="edu.iu.iv.gui.IVCApplication" - name="NWB"> + name="IVC"> <property name="appName" value="IVCApplication"/> + <property + name="aboutImage" + value="icons/about.gif"/> + <property + name="aboutText" + value="%blurb"/> + <property + name="windowImages" + value="icons/ivc.gif,icons/ivc.gif"/> </product> </extension> </plugin> Modified: trunk/plugins/ui/rcp/edu.iu.iv.gui/src/edu/iu/iv/core/EclipseIVCConfiguration.java =================================================================== --- trunk/plugins/ui/rcp/edu.iu.iv.gui/src/edu/iu/iv/core/EclipseIVCConfiguration.java 2006-05-08 19:49:46 UTC (rev 45) +++ trunk/plugins/ui/rcp/edu.iu.iv.gui/src/edu/iu/iv/core/EclipseIVCConfiguration.java 2006-05-08 23:59:18 UTC (rev 46) @@ -23,7 +23,9 @@ * */ public EclipseIVCConfiguration() { - while (!Platform.isRunning()); + while (!Platform.isRunning()) { + // busy wait? + } if(Platform.isRunning()){ prefs = IVCCorePlugin.getDefault().getPreferenceStore(); Modified: trunk/plugins/ui/rcp/edu.iu.iv.swtguibuilder/src/edu/iu/iv/gui/builder/builder/PallettedListBuilder.java =================================================================== --- trunk/plugins/ui/rcp/edu.iu.iv.swtguibuilder/src/edu/iu/iv/gui/builder/builder/PallettedListBuilder.java 2006-05-08 19:49:46 UTC (rev 45) +++ trunk/plugins/ui/rcp/edu.iu.iv.swtguibuilder/src/edu/iu/iv/gui/builder/builder/PallettedListBuilder.java 2006-05-08 23:59:18 UTC (rev 46) @@ -189,7 +189,7 @@ TableItem[] items = table.getItems(); for (int i=destIndex; i < items.length; i++) { - String[] tmp = getText(items[i]);; + String[] tmp = getText(items[i]); items[i].setText(text); text = tmp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bea...@us...> - 2006-05-08 19:50:04
|
Revision: 45 Author: bearsfan Date: 2006-05-08 12:49:46 -0700 (Mon, 08 May 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=45&view=rev Log Message: ----------- Added name of datamodel label to the temporary file Modified Paths: -------------- trunk/plugins/ui/rcp/edu.iu.iv.persistence.gui/java/src/edu/iu/iv/persistence/view/ViewPlugin.java Modified: trunk/plugins/ui/rcp/edu.iu.iv.persistence.gui/java/src/edu/iu/iv/persistence/view/ViewPlugin.java =================================================================== --- trunk/plugins/ui/rcp/edu.iu.iv.persistence.gui/java/src/edu/iu/iv/persistence/view/ViewPlugin.java 2006-05-08 19:02:57 UTC (rev 44) +++ trunk/plugins/ui/rcp/edu.iu.iv.persistence.gui/java/src/edu/iu/iv/persistence/view/ViewPlugin.java 2006-05-08 19:49:46 UTC (rev 45) @@ -12,8 +12,10 @@ import org.eclipse.swt.program.Program; +import edu.iu.iv.common.property.PropertyMap; import edu.iu.iv.core.IVC; import edu.iu.iv.core.datamodels.DataModel; +import edu.iu.iv.core.datamodels.DataModelProperty; import edu.iu.iv.core.persistence.BasicFileResourceDescriptor; import edu.iu.iv.core.persistence.PersistenceException; import edu.iu.iv.core.persistence.Persister; @@ -77,7 +79,9 @@ try { //Create temporary file String temp = IVC.getInstance().getTemporaryFilesFolder(); - File tempFile = File.createTempFile("view", ".txt", new File(temp)); + PropertyMap propMap = model.getProperties(); + String dataModelLabel = (String)propMap.getPropertyValue(DataModelProperty.LABEL); + File tempFile = File.createTempFile(dataModelLabel, ".txt", new File(temp)); // if the list is empty, log the occurence. if (persisterList.isEmpty()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-04-10 20:14:16
|
Revision: 43 Author: bh2 Date: 2006-04-10 13:14:13 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=43&view=rev Log Message: ----------- initial import Added Paths: ----------- trunk/features/core/edu.iu.iv.core-feature/.project trunk/features/core/edu.iu.iv.core-feature/build.properties trunk/features/core/edu.iu.iv.core-feature/feature.xml Added: trunk/features/core/edu.iu.iv.core-feature/.project =================================================================== --- trunk/features/core/edu.iu.iv.core-feature/.project (rev 0) +++ trunk/features/core/edu.iu.iv.core-feature/.project 2006-04-10 20:14:13 UTC (rev 43) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>edu.iu.iv.core-feature</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.pde.FeatureBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.FeatureNature</nature> + </natures> +</projectDescription> Added: trunk/features/core/edu.iu.iv.core-feature/build.properties =================================================================== --- trunk/features/core/edu.iu.iv.core-feature/build.properties (rev 0) +++ trunk/features/core/edu.iu.iv.core-feature/build.properties 2006-04-10 20:14:13 UTC (rev 43) @@ -0,0 +1 @@ +bin.includes = feature.xml Added: trunk/features/core/edu.iu.iv.core-feature/feature.xml =================================================================== --- trunk/features/core/edu.iu.iv.core-feature/feature.xml (rev 0) +++ trunk/features/core/edu.iu.iv.core-feature/feature.xml 2006-04-10 20:14:13 UTC (rev 43) @@ -0,0 +1,260 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feature + id="edu.iu.iv.ivccore" + label="IVC Core" + version="1.0.4" + provider-name="Team IVC" + os="linux,win32" + ws="gtk,motif,win32" + arch="x86,x86_64"> + + <description url="http://ivc.sourceforge.net/"> + The Information Visualization Software Framework Core. +This feature is needed by all IVC-based plugins. + </description> + + <copyright url="http://www.copyright.iupui.edu/"> + Copyright 2005 The Trustees of Indiana University + </copyright> + + <license url="http://www.apache.org/licenses/LICENSE-2.0"> + InfoVis Cyberinfrastructure Software Framework +Copyright 2005 Indiana University + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the specific +language governing permissions and limitations under the License. + +Project Contacts: +Shashikant Penumarthy (sp...@in...) +Bruce Herr (bh...@bh...) +Dr. Katy Borner (ka...@in...) + </license> + + <url> + <update label="IVC Update Site" url="http://iv.slis.indiana.edu/ivc/update/"/> + <discovery label="IVC Update Site" url="http://iv.slis.indiana.edu/ivc/update/"/> + </url> + + <plugin + id="org.apache.lucene" + download-size="0" + install-size="0" + version="1.4.3" + unpack="false"/> + + <plugin + id="org.eclipse.ui" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.swt.motif.linux.x86" + os="linux" + ws="motif" + arch="x86" + download-size="0" + install-size="0" + version="3.1.0" + fragment="true" + unpack="false"/> + + <plugin + id="org.eclipse.swt.gtk.linux.x86_64" + os="linux" + ws="gtk" + arch="x86_64" + download-size="0" + install-size="0" + version="3.1.0" + fragment="true" + unpack="false"/> + + <plugin + id="org.eclipse.swt.win32.win32.x86" + os="win32" + ws="win32" + arch="x86" + download-size="0" + install-size="0" + version="3.1.0" + fragment="true" + unpack="false"/> + + <plugin + id="org.eclipse.core.runtime" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.update.ui" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.core.expressions" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.help" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.jface" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.osgi" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.swt" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.ui.forms" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.ui.workbench" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.update.configurator" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="org.eclipse.update.core" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + + <plugin + id="edu.iu.iv.consoleview" + download-size="0" + install-size="0" + version="1.0.4" + unpack="false"/> + + <plugin + id="edu.iu.iv.core" + download-size="0" + install-size="0" + version="1.0.4" + unpack="false"/> + + <plugin + id="edu.iu.iv.datamodelview" + download-size="0" + install-size="0" + version="1.0.4" + unpack="false"/> + + <plugin + id="edu.iu.iv.gui" + download-size="0" + install-size="0" + version="1.0.4" + unpack="false"/> + + <plugin + id="edu.iu.iv.guimessagehandler" + download-size="0" + install-size="0" + version="1.0.4" + unpack="false"/> + + <plugin + id="edu.iu.iv.persistence" + download-size="0" + install-size="0" + version="1.0.4" + unpack="false"/> + + <plugin + id="edu.iu.iv.schedulerview" + download-size="0" + install-size="0" + version="1.0.4" + unpack="false"/> + + <plugin + id="org.eclipse.swt.gtk.linux.x86" + os="linux" + ws="gtk" + arch="x86" + download-size="0" + install-size="0" + version="3.1.0" + fragment="true" + unpack="false"/> + + <plugin + id="edu.iu.iv.swtguibuilder" + download-size="0" + install-size="0" + version="1.0.4" + unpack="false"/> + + <plugin + id="edu.iu.iv.common" + download-size="0" + install-size="0" + version="1.0.4" + unpack="false"/> + + <plugin + id="edu.iu.iv.core.rcp" + download-size="0" + install-size="0" + version="1.0.4" + fragment="true" + unpack="false"/> + + <plugin + id="org.eclipse.core.commands" + download-size="0" + install-size="0" + version="3.1.0" + unpack="false"/> + +</feature> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-04-10 20:14:04
|
Revision: 42 Author: bh2 Date: 2006-04-10 13:13:59 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=42&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/features/core/edu.iu.iv.core-feature/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-04-10 20:13:59
|
Revision: 41 Author: bh2 Date: 2006-04-10 13:13:56 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=41&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/features/core/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bh...@us...> - 2006-04-10 20:13:11
|
Revision: 40 Author: bh2 Date: 2006-04-10 13:12:57 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=40&view=rev Log Message: ----------- initial import Added Paths: ----------- trunk/features/dev/edu.iu.iv.plugindev-feature/.project trunk/features/dev/edu.iu.iv.plugindev-feature/build.properties trunk/features/dev/edu.iu.iv.plugindev-feature/feature.xml Added: trunk/features/dev/edu.iu.iv.plugindev-feature/.project =================================================================== --- trunk/features/dev/edu.iu.iv.plugindev-feature/.project (rev 0) +++ trunk/features/dev/edu.iu.iv.plugindev-feature/.project 2006-04-10 20:12:57 UTC (rev 40) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>edu.iu.iv.plugindev-feature</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.pde.FeatureBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.FeatureNature</nature> + </natures> +</projectDescription> Added: trunk/features/dev/edu.iu.iv.plugindev-feature/build.properties =================================================================== --- trunk/features/dev/edu.iu.iv.plugindev-feature/build.properties (rev 0) +++ trunk/features/dev/edu.iu.iv.plugindev-feature/build.properties 2006-04-10 20:12:57 UTC (rev 40) @@ -0,0 +1 @@ +bin.includes = feature.xml Added: trunk/features/dev/edu.iu.iv.plugindev-feature/feature.xml =================================================================== --- trunk/features/dev/edu.iu.iv.plugindev-feature/feature.xml (rev 0) +++ trunk/features/dev/edu.iu.iv.plugindev-feature/feature.xml 2006-04-10 20:12:57 UTC (rev 40) @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feature + id="edu.iu.iv.plugindev" + label="IVC Plug-in Development" + version="1.0.5" + provider-name="Team IVC"> + <install-handler/> + + <description> + The IVCSF plugin development is a set of core plugins necessary in order to create new plugins using the IVCSF. + </description> + + <copyright> + InfoVis Cyberinfrastructure Software Framework +Copyright 2005 Indiana University + </copyright> + + <license url="http://www.apache.org/licenses/LICENSE-2.0"> + InfoVis Cyberinfrastructure Software Framework +Copyright 2005 Indiana University + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the specific +language governing permissions and limitations under the License. + +Project Contacts: +Shashikant Penumarthy (sp...@in...) +Bruce Herr (bh...@bh...) +Dr. Katy Borner (ka...@in...) + </license> + + <url> + <update label="IVC Update Site" url="http://iv.slis.indiana.edu/ivc/update/"/> + <discovery label="IVC Update Site" url="http://iv.slis.indiana.edu/ivc/update/"/> + </url> + + <requires> + <import plugin="org.eclipse.core.runtime"/> + <import plugin="org.eclipse.ui"/> + <import plugin="org.eclipse.pde.ui"/> + <import plugin="org.eclipse.jface"/> + <import plugin="org.eclipse.pde.core"/> + <import plugin="org.eclipse.update.ui"/> + </requires> + + <plugin + id="edu.iu.iv.core" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="edu.iu.iv.templates" + download-size="0" + install-size="0" + version="0.0.0"/> + + <plugin + id="edu.iu.iv.matrixmodel" + download-size="0" + install-size="0" + version="0.0.0"/> + + <plugin + id="edu.iu.iv.coltlib" + download-size="0" + install-size="0" + version="0.0.0"/> + + <plugin + id="edu.iu.iv.common" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="edu.iu.iv.core.rcp" + download-size="0" + install-size="0" + version="0.0.0" + fragment="true" + unpack="false"/> + + <plugin + id="edu.iu.iv.swtguibuilder" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="edu.iu.iv.junglib" + download-size="0" + install-size="0" + version="0.0.0"/> + + <plugin + id="edu.iu.iv.prefuselib" + download-size="0" + install-size="0" + version="0.0.0"/> + + <plugin + id="edu.iu.iv.commonscollectionslib" + download-size="0" + install-size="0" + version="0.0.0"/> + + <plugin + id="edu.iu.iv.help.developer" + 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: <bh...@us...> - 2006-04-10 20:12:50
|
Revision: 39 Author: bh2 Date: 2006-04-10 13:12:44 -0700 (Mon, 10 Apr 2006) ViewCVS: http://svn.sourceforge.net/cishell/?rev=39&view=rev Log Message: ----------- Initial import. Added Paths: ----------- trunk/features/dev/edu.iu.iv.plugindev-feature/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |