From: <mwl...@us...> - 2008-03-28 16:51:14
|
Revision: 740 http://cishell.svn.sourceforge.net/cishell/?rev=740&view=rev Author: mwlinnem Date: 2008-03-28 09:51:07 -0700 (Fri, 28 Mar 2008) Log Message: ----------- Result of merge between CIShell 1.0 updated org.cishell.framework and the preference changes. Modified Paths: -------------- branches/user_prefs/org.cishell.framework/META-INF/MANIFEST.MF branches/user_prefs/org.cishell.framework/javadoc.xml branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/DataManagerListener.java branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/DataManagerService.java branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/package.html branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/SchedulerListener.java branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/SchedulerService.java branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/package.html branches/user_prefs/org.cishell.framework/src/org/cishell/framework/CIShellContext.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/LocalCIShellContext.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/Algorithm.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmFactory.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmProperty.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/DataValidator.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/package.html branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/BasicData.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/Data.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/DataProperty.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/package.html branches/user_prefs/org.cishell.framework/src/org/cishell/framework/package.html branches/user_prefs/org.cishell.framework/src/org/cishell/overview.html branches/user_prefs/org.cishell.framework/src/org/cishell/service/conversion/Converter.java branches/user_prefs/org.cishell.framework/src/org/cishell/service/conversion/DataConversionService.java branches/user_prefs/org.cishell.framework/src/org/cishell/service/conversion/package.html branches/user_prefs/org.cishell.framework/src/org/cishell/service/guibuilder/GUI.java branches/user_prefs/org.cishell.framework/src/org/cishell/service/guibuilder/GUIBuilderService.java branches/user_prefs/org.cishell.framework/src/org/cishell/service/guibuilder/SelectionListener.java branches/user_prefs/org.cishell.framework/src/org/cishell/service/guibuilder/package.html Added Paths: ----------- branches/user_prefs/org.cishell.framework/.settings/org.eclipse.jdt.core.prefs branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmExecutionException.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ParameterMutator.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/UserPrefsProperty.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/package.html branches/user_prefs/org.cishell.framework/src/org/cishell/service/conversion/ConversionException.java Removed Paths: ------------- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/preference/ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/UserPrefsProperty.java branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/package.html Copied: branches/user_prefs/org.cishell.framework/.settings/org.eclipse.jdt.core.prefs (from rev 739, trunk/core/org.cishell.framework/.settings/org.eclipse.jdt.core.prefs) =================================================================== --- branches/user_prefs/org.cishell.framework/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ branches/user_prefs/org.cishell.framework/.settings/org.eclipse.jdt.core.prefs 2008-03-28 16:51:07 UTC (rev 740) @@ -0,0 +1,12 @@ +#Wed Feb 06 22:39:13 GMT 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.4 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning +org.eclipse.jdt.core.compiler.source=1.3 Modified: branches/user_prefs/org.cishell.framework/META-INF/MANIFEST.MF =================================================================== --- branches/user_prefs/org.cishell.framework/META-INF/MANIFEST.MF 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/META-INF/MANIFEST.MF 2008-03-28 16:51:07 UTC (rev 740) @@ -1,19 +1,19 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: CIShell Framework API +Bundle-Name: CIShell Platform API Bundle-SymbolicName: org.cishell.framework -Bundle-Version: 0.3.0 -Bundle-Vendor: Bruce Herr +Bundle-Version: 1.0.0 +Bundle-Vendor: Cyberinfrastructure for Network Science Center Import-Package: org.osgi.framework, org.osgi.service.log, org.osgi.service.metatype, org.osgi.service.prefs -Export-Package: org.cishell.app.service.datamanager, - org.cishell.app.service.scheduler, - org.cishell.framework, - org.cishell.framework.algorithm, - org.cishell.framework.data, - org.cishell.framework.preference, - org.cishell.service.conversion, - org.cishell.service.guibuilder -Eclipse-LazyStart: true +Export-Package: org.cishell.app.service.datamanager;version="1.0.0", + org.cishell.app.service.scheduler;version="1.0.0", + org.cishell.framework;version="1.0.0", + org.cishell.framework.algorithm;version="1.0.0", + org.cishell.framework.data;version="1.0.0", + org.cishell.framework.userprefs;version="1.0.0", + org.cishell.service.conversion;version="1.0.0", + org.cishell.service.guibuilder;version="1.0.0" +Bundle-ActivationPolicy: lazy Modified: branches/user_prefs/org.cishell.framework/javadoc.xml =================================================================== --- branches/user_prefs/org.cishell.framework/javadoc.xml 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/javadoc.xml 2008-03-28 16:51:07 UTC (rev 740) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project default="javadoc"> - <property name="version" value="0.5.0" /> + <property name="version" value="1.0" /> <target name="javadoc"> <javadoc destdir="bin/doc" access="public" @@ -14,7 +14,7 @@ version="true" nodeprecatedlist="false" nodeprecated="false" - packagenames="org.cishell.framework.data,org.cishell.service.guibuilder,org.cishell.app.service.scheduler,org.cishell.framework,org.cishell.app.service.datamanager,org.cishell.framework.algorithm,org.cishell.service.conversion" + packagenames="org.cishell.framework.data,org.cishell.framework.userprefs,org.cishell.service.guibuilder,org.cishell.app.service.scheduler,org.cishell.framework,org.cishell.app.service.datamanager,org.cishell.framework.algorithm,org.cishell.service.conversion" sourcepath="src" classpath="lib/osgi.core.jar:lib/osgi.compendium.jar" overview="src/org/cishell/overview.html" Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/DataManagerListener.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/DataManagerListener.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/DataManagerListener.java 2008-03-28 16:51:07 UTC (rev 740) @@ -17,7 +17,7 @@ /** - * A listener that is notified of changes in the {@link DataManagerService}. + * A listener that is notified of changes in the {@link DataManagerService} * * @author Bruce Herr (bh...@bh...) */ Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/DataManagerService.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/DataManagerService.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/DataManagerService.java 2008-03-28 16:51:07 UTC (rev 740) @@ -16,14 +16,14 @@ import org.cishell.framework.data.Data; /** - * A service for managing loaded {@link Data}s. + * A service for managing loaded {@link Data} objects. * {@link DataManagerListener}s may be registered to be notified of changes - * in the model manager. + * in the data 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. + * Application developers are encouraged to use this service for managing the + * models they have loaded into memory. Algorithm developers 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...) */ @@ -81,7 +81,6 @@ */ public void removeDataManagerListener(DataManagerListener listener); - /** * Returns the label for a stored Data object * @@ -95,7 +94,7 @@ * to change the label so that it is unique. * * @param data The Data - * @param label The new label for the data model. + * @param label The new label for the data model */ public void setLabel(Data data, String label); } Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/package.html =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/package.html 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/datamanager/package.html 2008-03-28 16:51:07 UTC (rev 740) @@ -2,7 +2,7 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <title>org.cishell.framework.datamodel Package-level Javadoc</title> + <title>org.cishell.app.service.datamanager Package-level Javadoc</title> <!-- /* **************************************************************************** * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. @@ -19,9 +19,12 @@ * ***************************************************************************/ --> </head> -<body>Provides the specification for the CIShell data manager service. +<body>Provides interfaces for the CIShell Data Manager Service. <h2>Package Specification</h2> -This package specifies the API related to the data manager service. +The API related to the Data Manager Service. +@see <a href="http://cishell.org/dev/docs/spec/cishell-spec-1.0.pdf"> +CIShell Specification 1.0</a> + </body> </html> \ No newline at end of file Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/SchedulerListener.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/SchedulerListener.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/SchedulerListener.java 2008-03-28 16:51:07 UTC (rev 740) @@ -45,7 +45,7 @@ /** * Notification that an already scheduled Algorithm has been unscheduled - * and will therefore not be run. + * and will therefore not be run * * @param algorithm The scheduled Algorithm that was unscheduled */ @@ -62,8 +62,8 @@ * Notification that an Algorithm has finished executing * * @param algorithm The scheduled Algorithm - * @param createdData The Data(s) it returned, or <code>null</code> if - * it returned <code>null</code> + * @param createdData The {@link Data} array it returned, or + * <code>null</code> if it returned <code>null</code> */ public void algorithmFinished(Algorithm algorithm, Data[] createdData); @@ -86,7 +86,7 @@ /** * Notification that the scheduler's schedule of Algorithms to be run has - * been cleared. + * been cleared */ public void schedulerCleared(); } Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/SchedulerService.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/SchedulerService.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/SchedulerService.java 2008-03-28 16:51:07 UTC (rev 740) @@ -23,9 +23,10 @@ * 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. + * Application Developers are encouraged to use this service for scheduling + * Algorithms to be run. Algorithm developers 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...) */ @@ -88,7 +89,7 @@ public boolean unschedule(Algorithm algorithm); /** - * Adds a listener to be notified of events happening in the scheduler. + * Adds a listener to be notified of events happening in the scheduler * * @param listener The listener to be added */ @@ -137,11 +138,10 @@ * * @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. + * if the Algorithm is not scheduled or has completed execution */ public Calendar getScheduledTime(Algorithm algorithm); - /** * Returns an Algorithm's associated ServiceReference if one was provided * when the Algorithm was scheduled Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/package.html =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/package.html 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/app/service/scheduler/package.html 2008-03-28 16:51:07 UTC (rev 740) @@ -2,7 +2,7 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <title>org.cishell.framework.datamodel Package-level Javadoc</title> + <title>org.cishell.app.service.scheduler Package-level Javadoc</title> <!-- /* **************************************************************************** * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. @@ -19,9 +19,12 @@ * ***************************************************************************/ --> </head> -<body>Provides the specification for the CIShell scheduler service. +<body>Provides interfaces for the CIShell Scheduler Service. <h2>Package Specification</h2> -This package specifies the API related to the scheduler service. +The API related to the Scheduler Service. +@see <a href="http://cishell.org/dev/docs/spec/cishell-spec-1.0.pdf"> +CIShell Specification 1.0</a> + </body> </html> \ No newline at end of file Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/CIShellContext.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/CIShellContext.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/CIShellContext.java 2008-03-28 16:51:07 UTC (rev 740) @@ -21,7 +21,7 @@ /** * The context by which algorithms in the framework can gain access to standard * CIShell services. An instantiated CIShellContext must provide access to at - * least the default services (as of this specification, the OSGi + * least the default services (as of the 1.0 specification, the OSGi * {@link LogService}, the OSGi {@link PreferencesService}, the * CIShell defined {@link DataConversionService}, and the CIShell defined * {@link GUIBuilderService}). Other services may be made available through @@ -32,7 +32,7 @@ public interface CIShellContext { /** - * Contains an array of the strings to access the default services + * Contains an array of the valid strings corresponding to the default services */ public static final String[] DEFAULT_SERVICES = new String[] { LogService.class.getName(), @@ -44,10 +44,10 @@ * Locates and returns a standard service given the service name. The * service name is generally the full class name of the service interface. * For example, <code>LogService</code>'s string is - * <code>org.osgi.service.log.LogService</code> + * <code>org.osgi.service.log.LogService</code>. * * @param service A string (usually the associated interface's full - * class name) that specifies the service to retrieve. + * class name) that specifies the service to retrieve * @return An instantiated version of the service requested */ public Object getService(String service); Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/LocalCIShellContext.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/LocalCIShellContext.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/LocalCIShellContext.java 2008-03-28 16:51:07 UTC (rev 740) @@ -20,7 +20,7 @@ * A simple implementation of {@link CIShellContext} that pulls the * CIShell services from the provided {@link BundleContext} that all OSGi * bundles receive on activation. This was included in the standard API since - * it will be used frequently by CIShell Client writers. + * it will be used frequently by CIShell application developers. * * This implementation only returns standard services or the service strings * given to it in its constructor. @@ -36,7 +36,7 @@ * <code>BundleContext</code> * * @param bContext The <code>BundleContext</code> to use to find - * the registered standard services. + * the registered standard services */ public LocalCIShellContext(BundleContext bContext) { this(bContext, DEFAULT_SERVICES); @@ -44,13 +44,13 @@ /** * Initializes the CIShell context with a custom set of standard services. - * Only the standard services provided will be allowed to be gotten from + * Only the service in the array will be allowed to be retrieved from * this <code>CIShellContext</code>. * * @param bContext The <code>BundleContext</code> to use to find - * registered standard services. + * registered standard services * @param standardServices An array of strings specifying the services that - * are allowed to be gotten from this class. + * are allowed to be retrieved from this class */ public LocalCIShellContext(BundleContext bContext, String[] standardServices) { this.bContext = bContext; Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/Algorithm.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/Algorithm.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/Algorithm.java 2008-03-28 16:51:07 UTC (rev 740) @@ -13,33 +13,28 @@ * ***************************************************************************/ package org.cishell.framework.algorithm; -import org.cishell.framework.CIShellContext; import org.cishell.framework.data.Data; /** - * 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 array - * that it analyzes and returns a derivitive Data array or it may convert from - * one Data array to another or not take in any Data array and based on some - * given parameters create an entirely new Data array. + * A class which executes some arbitrary code and optionally returns any data + * produced. What happens when the execute method is run is entirely + * up to the Algorithm developer. Algorithms should be primed with whatever data + * is needed, usually by its associated {@link AlgorithmFactory}, before + * execution. This allows an Algorithm to be set up, then scheduled for later + * execution. * - * Algorithms are typically also given a {@link CIShellContext} by which they - * can gain access to standard services like logging, preferences, and gui - * creation. If an algorithm only uses these standard services and does not pop - * up any graphical gui (aside from using the GUIBuilderService) then this - * Algorithm may be safely run remotely. - * * @author Bruce Herr (bh...@bh...) */ public interface Algorithm { /** - * Executes and optionally returns a Data array. Algorithms are usually - * primed ahead of time with all the necessary data needed. This allows - * an Algorithm to be set up, then scheduled for later execution. + * Executes and optionally returns a Data array * - * @return A Data array that was created or <code>null</code> + * @return A Data array that was created. <code>null</code> is ONLY acceptable + * when the algorithms out_data is null. + * @throws AlgorithmExecutionException An exception has occured while executing + * the algorithm. This exception should have a user-comprehendable message if + * at all possible. */ - public Data[] execute(); + public Data[] execute() throws AlgorithmExecutionException; } Copied: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmExecutionException.java (from rev 739, trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmExecutionException.java) =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmExecutionException.java (rev 0) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmExecutionException.java 2008-03-28 16:51:07 UTC (rev 740) @@ -0,0 +1,36 @@ +/* **************************************************************************** + * 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 Feb 8, 2008 at Indiana University. + * + * Contributors: + * Indiana University - Initial API + * ***************************************************************************/ +package org.cishell.framework.algorithm; + +/** + * An exception which is thrown when an error occurs in the process of executing + * an {@link Algorithm} + * + * @author Bruce Herr (bh...@bh...) + */ +public class AlgorithmExecutionException extends Exception { + private static final long serialVersionUID = 9017277008277139930L; + + public AlgorithmExecutionException(String message, Throwable exception) { + super(message, exception); + } + + public AlgorithmExecutionException(Throwable exception) { + super(exception); + } + + public AlgorithmExecutionException(String message) { + super(message); + } +} Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmFactory.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmFactory.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmFactory.java 2008-03-28 16:51:07 UTC (rev 740) @@ -17,45 +17,37 @@ import org.cishell.framework.CIShellContext; import org.cishell.framework.data.Data; -import org.osgi.service.metatype.MetaTypeProvider; +import org.osgi.service.metatype.MetaTypeService; /** - * A class for creating {@link Algorithm}s. This class provides the parameters - * needed by an <code>Algorithm</code> on demand and when given correct data, - * will create an <code>Algorithm</code> that can be executed. An algorithm - * writer who wishes to be usable by CIShell clients must create an - * implementation of this interface and register it (along with some standard - * meta-data about the algorithm, defined in the {@link AlgorithmProperty} - * class) in the OSGi service registry. + * A service interface for creating {@link Algorithm}s to be executed. + * An algorithm developer must create an implementation of this interface and + * register it (along with some standard metadata about the algorithm, defined + * in the {@link AlgorithmProperty} class) in the OSGi service registry. + * If the algorithm requires input in addition to the raw data provided, a + * {@link MetaTypeProvider} must be published to OSGi's {@link MetaTypeService} + * (usually through a METADATA.XML file in the algorithm's bundle). * + * See the <a href="http://cishell.org/dev/docs/spec/cishell-spec-1.0.pdf"> + * CIShell Specification 1.0</a> for documentation on the full requirements for + * algorithm creation. + * * @author Bruce Herr (bh...@bh...) */ public interface AlgorithmFactory { + /** - * Creates a set of parameter definitions that define what parameters are - * needed in order to run its associated Algorithm. + * Creates an {@link Algorithm} to be executed * - * @param data An optional argument, the Data array that will be given to - * this class to create an Algorithm with the createAlgorithm - * method. Clients that don't know the Data array that is going - * to be used ahead of time can give a <code>null</code> value. - * @return An OSGi {@link MetaTypeProvider} that defines the parameters - * needed by the Algorithm this class creates. May be - * <code>null</code> if no parameters are needed. - */ - public MetaTypeProvider createParameters(Data[] data); - - /** - * Creates an {@link Algorithm} to be executed. - * * @param data The data to be given to the Algorithm to process. * Some Algorithms may ignore this value. The order and * type of data given are specified in the service * dictionary (the 'in_data' key) when registered as a * service in OSGi. * @param parameters A set of key-value pairs that were created based on - * the parameters given by the createParameters method. - * @param context The context by which an Algorithm can gain access to + * the associated input specification published to the + * {@link MetaTypeService} + * @param context The context by which the Algorithm can gain access to * standard CIShell services * @return An <code>Algorithm</code> primed for execution */ Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmProperty.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmProperty.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmProperty.java 2008-03-28 16:51:07 UTC (rev 740) @@ -15,29 +15,50 @@ /** * A standard set of properties and values used for creating a service - * Dictionary that is provided when registering an AlgorithmFactory with the - * OSGi service registry. + * metadata Dictionary that is provided when registering an + * {@link AlgorithmFactory} with the OSGi service registry. * + * See the <a href="http://cishell.org/dev/docs/spec/cishell-spec-1.0.pdf"> + * CIShell Specification 1.0</a> for documentation on each property. + * * @author Bruce Herr (bh...@bh...) */ public interface AlgorithmProperty { public static final String IN_DATA = "in_data"; public static final String OUT_DATA = "out_data"; public static final String NULL_DATA = "null"; - public static final String CONVERSION = "conversion"; - public static final String LOSSY = "lossy"; - public static final String LOSSLESS = "lossless"; - public static final String MENU_PATH = "menu_path"; + + public static final String PARAMETERS_PID = "parameters_pid"; + + public static final String PARENTAGE = "parentage"; + public static final String DEFAULT_PARENTAGE="default"; + + public static final String ALGORITHM_TYPE = "type"; + public static final String TYPE_CONVERTER = "converter"; + public static final String TYPE_VALIDATOR = "validator"; + public static final String TYPE_DATASET = "dataset"; + + public static final String REMOTEABLE = "remoteable"; + public static final String REMOTE = "remote"; + public static final String LABEL = "label"; public static final String DESCRIPTION = "description"; + + public static final String MENU_PATH = "menu_path"; public static final String ADDITIONS_GROUP = "additions"; public static final String START_GROUP = "start"; public static final String END_GROUP = "end"; - public static final String REMOTEABLE = "remoteable"; - public static final String REMOTE = "remote"; - public static final String ALGORITHM_TYPE = "type"; - public static final String TYPE_CONVERTER = "converter"; - public static final String TYPE_ALGORITHM = "algorithm"; - public static final String TYPE_DATASET = "dataset"; - public static final String PARAMETER_PID = "parameter_pid"; + + public static final String CONVERSION = "conversion"; + public static final String LOSSY = "lossy"; + public static final String LOSSLESS = "lossless"; + + public static final String AUTHORS = "authors"; + public static final String IMPLEMENTERS = "implementers"; + public static final String INTEGRATORS = "integrators"; + + public static final String DOCUMENTATION_URL = "documentation_url"; + public static final String REFERENCE = "reference"; + public static final String REFERENCE_URL = "reference_url"; + public static final String WRITTEN_IN = "written_in"; } Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/DataValidator.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/DataValidator.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/DataValidator.java 2008-03-28 16:51:07 UTC (rev 740) @@ -24,10 +24,6 @@ * make additional checks. For example, if an algorithm only worked on * symmetric matrices, this interface would check the data ahead of time * to ensure that the given matrix was in fact a symmetric matrix. - * <br /> - * In order for CIShell clients to fully recognize this additional validation - * method, an algorithm writer must register this interface in addition to the - * algorithm interface when registering their service. * * @author Bruce Herr (bh...@bh...) */ Copied: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ParameterMutator.java (from rev 739, trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/ParameterMutator.java) =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ParameterMutator.java (rev 0) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ParameterMutator.java 2008-03-28 16:51:07 UTC (rev 740) @@ -0,0 +1,46 @@ +/* **************************************************************************** + * 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 Mar 7, 2008 at Indiana University. + * + * Contributors: + * Indiana University - + * ***************************************************************************/ +package org.cishell.framework.algorithm; + +import org.cishell.framework.data.Data; +import org.osgi.service.metatype.AttributeDefinition; +import org.osgi.service.metatype.ObjectClassDefinition; + +/** + * An additional interface an {@link AlgorithmFactory} can implement that allows + * for adding, modifying, or removing input parameters before being shown to the + * end-user for input. This interface is often implemented by algorithms that + * wish to customize the user interface based on the actual input data. + * + * @author Bruce Herr (bh...@bh...) + */ +public interface ParameterMutator { + + /** + * Adds, modifies, or removes {@link Algorithm} parameters + * ({@link AttributeDefinition}s) from a given {@link ObjectClassDefinition} + * returning either the same (if no changes are made) input or a new, + * mutated version of the input + * + * @param data An optional argument, the Data array that will be given to + * this class to create an Algorithm with the createAlgorithm + * method. Applications that don't know the Data array that is going + * to be used ahead of time can give a <code>null</code> value. + * @param parameters A set of AttributeDefinitions which define the + * algorithm's input parameters + * @return An OSGi {@link ObjectClassDefinition} that defines the parameters + * needed by the Algorithm this class creates + */ + public ObjectClassDefinition mutateParameters(Data[] data, ObjectClassDefinition parameters); +} Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressMonitor.java 2008-03-28 16:51:07 UTC (rev 740) @@ -16,9 +16,9 @@ /** * A class to monitor the progress of an algorithm. It allows for notification * 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. + * description of current work during execution. Except for the setter methods, + * the methods are generally only called by the algorithm with the CIShell + * application providing the progress monitor implementation. * * @author Bruce Herr (bh...@bh...) */ @@ -59,14 +59,14 @@ /** * Notifies the start of execution of the algorithm in addition to - * revealing how many work units will be used. + * revealing how many work units will be used * - * @param capabilities An ORed int that tells the monitor what the + * @param capabilities An OR'ed int that tells the monitor what the * algorithm is capable of with respect to the - * monitor. The ORed values are taken from the int + * monitor. The OR'ed 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. + * @param totalWorkUnits The number of work units, -1 if the + * algorithm does not provide progress information */ public void start(int capabilities, int totalWorkUnits); @@ -74,19 +74,19 @@ * Notifies that a certain number of units of work has been completed * * @param work The number of units of work completed - * since last notification. + * since last notification */ public void worked(int work); /** - * The algorithm is finished executing. + * The algorithm is finished executing */ public void done(); /** * 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 one of the methods that can be called by someone + * An algorithm developer can ignore or clear this flag if it cannot stop + * midstream. This is one of the methods that can be called by something * other than the algorithm. * * @param value Set or clear the cancellation request @@ -104,8 +104,8 @@ /** * 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 + * algorithm developer can ignore or clear this flag if it cannot pause + * midstream. This is one of the methods that can be called by something * other than the algorithm. * * @param value Set or clear the pause request @@ -123,7 +123,7 @@ /** * Method to describe what the algorithm is currently doing for the benefit - * of the users of the algorithm as it progresses during execution. + * of the users of the algorithm as it progresses during execution * * @param currentWork A short description of the current work the algorithm * is doing Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/ProgressTrackable.java 2008-03-28 16:51:07 UTC (rev 740) @@ -38,10 +38,10 @@ /** * Returns the progress monitor currently in use, or <code>null</code> if - * no monitor has been set. + * no monitor has been set * * @return The current progress monitor, or <code>null</code> if there - * isn't one set. + * isn't one set */ public ProgressMonitor getProgressMonitor(); } Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/package.html =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/package.html 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/algorithm/package.html 2008-03-28 16:51:07 UTC (rev 740) @@ -19,12 +19,12 @@ * ***************************************************************************/ --> </head> -<body>Provides interfaces required for creating CIShell compatible algorithms. +<body>Provides interfaces required for creating CIShell algorithms. <h2>Package Specification</h2> -This package specifies the API related to creation of CIShell compatible -algorithms. +The API related to creation of CIShell algorithms. -TODO: Describe here how an algorithm is integrated into OSGi. +@see <a href="http://cishell.org/dev/docs/spec/cishell-spec-1.0.pdf"> +CIShell Specification 1.0</a> </body> </html> \ No newline at end of file Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/BasicData.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/BasicData.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/BasicData.java 2008-03-28 16:51:07 UTC (rev 740) @@ -29,7 +29,7 @@ private String format; /** - * Creates a Data object with the given data and an empty meta-data + * Creates a Data object with the given data and an empty metadata * {@link Dictionary} * * @param data The data being wrapped @@ -39,9 +39,9 @@ } /** - * Creates a Data object with the given data and meta-data {@link Dictionary} + * Creates a Data object with the given data and metadata {@link Dictionary} * - * @param properties The meta-data about the data + * @param properties The metadata about the data * @param data The data being wrapped */ public BasicData(Dictionary properties, Object data, String format) { @@ -58,9 +58,9 @@ } /** - * @see org.cishell.framework.data.Data#getMetaData() + * @see org.cishell.framework.data.Data#getMetadata() */ - public Dictionary getMetaData() { + public Dictionary getMetadata() { return properties; } Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/Data.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/Data.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/Data.java 2008-03-28 16:51:07 UTC (rev 740) @@ -17,40 +17,37 @@ import java.util.Dictionary; /** - * A class that encapsulates data and its meta-data. This class is used to pass - * data between algorithms and is what algorithms optionally create when executed. + * A class that contains data, its format, and its metadata. This class is used + * to pass data between algorithms and is what algorithms optionally create when + * executed. * * @author Bruce Herr (bh...@bh...) */ public interface Data { /** - * Returns the meta-data associated with the data stored in this Data object. - * Some standard keys are in the {@link DataProperty} interface. + * Returns the metadata associated with the data stored in this Data object. + * Standard keys and values are in the {@link DataProperty} interface. * - * @return The data's meta-data + * @return The data's metadata */ - public Dictionary getMetaData(); + public Dictionary getMetadata(); /** - * Returns the data stored in this Data object. + * Returns the data stored in this Data object * - * @return The data (a java object) + * @return The data (a Java object) */ public Object getData(); /** - * Get the format of the encapsulated data. If the data is a {@link File}, + * Returns the format of the encapsulated data. If the data is a {@link File}, * then this method returns what MIME type it is with "file:" prepended - * (eg. file:text/plain). Otherwise, the string returned should be the java + * (eg. file:text/plain). Otherwise, the string returned should be the Java * class it represents. For algorithms this format should be the same as * their OUT_DATA property. * * @return The main format of the data */ public String getFormat(); - - //TODO: Consider these methods for inclusion in Data - //public String getUID(); //may be better for specifying parent datamodels - //public Object getDataAsFormat(String format); } Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/DataProperty.java =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/DataProperty.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/DataProperty.java 2008-03-28 16:51:07 UTC (rev 740) @@ -15,8 +15,8 @@ /** - * Standard property keys to use when creating meta-data for a - * {@link Data} object. + * Standard property keys and values to use when creating metadata for a + * {@link Data} object * * @author Bruce Herr (bh...@bh...) */ @@ -28,16 +28,23 @@ public static final String LABEL = "Label"; /** + * A short label to give the Data object for shorter displays. It is + * recommended to keep the string length below 20 characters. This will often + * be used for recommended file names when saving the data to disk. The type + * associated with this property is of type {@link String}. + */ + public static final String SHORT_LABEL = "Short_Label"; + + /** * The parent Data object of the Data object. This is used when a Data object * is derived from another Data object to show the hierarchical relationship - * between them. This property can be null, signifying that the Data object + * between them. This property can be null, signifying that the Data object * was not derived from any other Data object, such as when loading a new Data * object from a file. The type associated with this property is of type - * {@link Data} + * {@link Data}. */ public static final String PARENT = "Parent"; - //TODO: should we consider removing this/changing it? /** * The general type of the Data object. Various standard types are created as * constants with name *_TYPE from this class. These can be used, or new @@ -49,7 +56,7 @@ /** * Flag to determine if the Data object 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 Data object exists and see if they want to save + * they exit that a modified Data object exists and ask if they want to save * it. The type associated with this property is of type {@link Boolean}. */ public static final String MODIFIED = "Modified"; @@ -59,6 +66,9 @@ /** Says this data model is abstractly a network */ public static String NETWORK_TYPE = "Network"; + + /** Says this data model is abstractly a table */ + public static String TABLE_TYPE = "Table"; /** Says this data model is abstractly a tree */ public static String TREE_TYPE = "Tree"; @@ -66,9 +76,9 @@ /** Says this data model is abstractly an unknown type */ public static String OTHER_TYPE = "Unknown"; - /** a plain text file */ + /** Says this data model is abstractly a plain text file */ public static String TEXT_TYPE = "Text"; - /** a file can be fed to xmgrace */ - public static String GRACE_TYPE = "Grace"; + /** Says this data model is abstractly a data plot */ + public static String PLOT_TYPE = "Plot"; } Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/package.html =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/package.html 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/data/package.html 2008-03-28 16:51:07 UTC (rev 740) @@ -2,7 +2,7 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <title>org.cishell.framework.datamodel Package-level Javadoc</title> + <title>org.cishell.framework.data Package-level Javadoc</title> <!-- /* **************************************************************************** * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. @@ -21,9 +21,10 @@ </head> <body>Provides interfaces required for creating Data objects. <h2>Package Specification</h2> -This package specifies the API related to creation of Data objects. +The API related to creation of Data objects. -TODO: Describe here what a Data object is, how it is used, and why it is used. +@see <a href="http://cishell.org/dev/docs/spec/cishell-spec-1.0.pdf"> +CIShell Specification 1.0</a> </body> </html> \ No newline at end of file Modified: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/package.html =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/package.html 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/package.html 2008-03-28 16:51:07 UTC (rev 740) @@ -2,7 +2,7 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> - <title>org.cishell.framework.algorithm Package-level Javadoc</title> + <title>org.cishell.framework Package-level Javadoc</title> <!-- /* **************************************************************************** * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework. @@ -19,11 +19,12 @@ * ***************************************************************************/ --> </head> -<body>The base package of the CIShell framework specification. +<body>The core package for the CIShell platform API. <h2>Package Specification</h2> -This package is the root package for the CIShell framework specification +The core package for the CIShell platform API -TODO: Talk about the framework and give links. +@see <a href="http://cishell.org/dev/docs/spec/cishell-spec-1.0.pdf"> +CIShell Specification 1.0</a> </body> </html> \ No newline at end of file Copied: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs (from rev 739, trunk/core/org.cishell.framework/src/org/cishell/framework/userprefs) Deleted: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/UserPrefsProperty.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/userprefs/UserPrefsProperty.java 2008-03-28 16:40:44 UTC (rev 739) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/UserPrefsProperty.java 2008-03-28 16:51:07 UTC (rev 740) @@ -1,112 +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 Feb 8, 2008 at Indiana University. - * - * Contributors: - * Indiana University - - * ***************************************************************************/ -package org.cishell.framework.userprefs; - -/** - * A standard set of properties and values to be placed in a service's - * metadata Dictionary when registering a service with the OSGi service registry - * for the purpose of publishing and receiving user-adjustable preferences. - * - * See the <a href="http://cishell.org/dev/docs/spec/cishell-spec-1.0.pdf"> - * CIShell Specification 1.0</a> for information on publishing user-adjustable - * preferences. - */ -public interface UserPrefsProperty { - - /** - * The suffix to add to the service's PID for generating a local preferences - * PID when using the standard naming convention - */ - public static final String LOCAL_PREFS_OCD_SUFFIX = ".prefs.local"; - - /** - * The suffix to add to the service's PID for generating a global preferences - * PID when using the standard naming convention - */ - public static final String GLOBAL_PREFS_OCD_SUFFIX = ".prefs.global"; - - /** - * The suffix to add to the service's PID for an {@link Algorithm}'s - * user-entered input parameters PID when using the standard naming convention - */ - public static final String PARAM_PREFS_OCD_SUFFIX = ""; - - /** - * The key for specifying a local preferences PID. - * Only use this when not following the standard naming convention. - */ - public static final String LOCAL_PREFS_PID = "local_prefs_pid"; - - /** - * The key for specifying a global preferences PID. - * Only use this when not following the standard naming convention. - */ - public static final String GLOBAL_PREFS_PID = "global_prefs_pid"; - - - - /** - * The key for specifying what types of preferences are published - */ - public static final String PREFS_PUBLISHED_KEY = "prefs_published"; - - /** - * The value for specifying that local preferences are to be published - */ - public static final String PUBLISH_LOCAL_PREFS_VALUE = "local"; - - /** - * The value for specifying that global preferences are to be published - */ - public static final String PUBLISH_GLOBAL_PREFS_VALUE = "global"; - - /** - * The value for specifying that an {@link Algorithm}'s user-entered input - * parameter defaults may be adjusted by the user - */ - public static final String PUBLISH_PARAM_DEFAULT_PREFS_VALUE = "param-defaults"; - - /** - * The key for declaring a need to receive preferences. "true" and "false" - * are the possible associated values. - */ - public static final String RECEIVE_PREFS_KEY = "receive_prefs"; - - - - /** - * The suffix to add to the service's PID for getting the local preferences - * directly from the ConfigurationAdmin (not recommended) - */ - public static final String LOCAL_PREFS_CONF_SUFFIX = ""; - - /** - * The suffix to add to the service's PID for getting the global preferences - * directly from the ConfigurationAdmin (not recommended) - */ - public static final String GLOBAL_PREFS_CONF_SUFFIX = GLOBAL_PREFS_OCD_SUFFIX; - - /** - * The suffix to add to the service's PID for getting an {@link Algorithm}'s - * user-entered input parameter defaults that have been user-adjusted directly - * from the ConfigurationAdmin (not recommended) - */ - public static final String PARAM_PREFS_CONF_SUFFIX = ".prefs.params"; - - /** - * A key set in each configuration object which states the Bundle-Version of - * the service when it was last updated - */ - public static final String BUNDLE_VERSION_KEY = "Bundle-Version"; -} Copied: branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/UserPrefsProperty.java (from rev 739, trunk/core/org.cishell.framework/src/org/cishell/framework/userprefs/UserPrefsProperty.java) =================================================================== --- branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/UserPrefsProperty.java (rev 0) +++ branches/user_prefs/org.cishell.framework/src/org/cishell/framework/userprefs/UserPrefsProperty.java 2008-03-28 16:51:07 UTC (rev 740) @@ -0,0 +1,112 @@ +/* **************************************************************************** + * 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 Feb 8, 2008 at Indiana University. + * + * Contributors: + * Indiana University - + * ***************************************************************************/ +package org.cishell.framework.userprefs; + +/** + * A standard set of properties and values to be placed in a service's + * metadata Dictionary when registering a service with the OSGi service registry + * for the purpose of publishing and receiving user-adjustable preferences. + * + * See the <a href="http://cishell.org/dev/docs/spec/cishell-spec-1.0.pdf"> + * CIShell Specification 1.0</a> for information on publishing user-adjustable + * preferences. + */ +public interface UserPrefsProperty { + + /** + * The suffix to add to the service's PID for generating a local preferences + * PID when using the standard naming convention + */ + public static final String LOCAL_PREFS_OCD_SUFFIX = ".prefs.local"; + + /** + * The suffix to add to the service's PID for generating a global preferences + * PID when using the standard naming convention + */ + public static final String GLOBAL_PREFS_OCD_SUFFIX = ".prefs.global"; + + /** + * The suffix to add to the service's PID for an {@link Algorithm}'s + * user-entered input parameters PID when using the standard naming convention + */ + public static final String PARAM_PREFS_OCD_SUFFIX = ""; + + /** + * The key for specifying a local preferences PID. + * Only use this when not following the standard naming convention. + */ + public static final String LOCAL_PREFS_PID = "local_prefs_pid"; + + /** + * The key for specifying a global preferences PID. + * Only use this when not following the standard naming convention. + */ + public static final String GLOBAL_PREFS_PID = "global_prefs_pid"; + + + + /** + * The key for specifying what types of preferences are published + */ + public static final String PREFS_PUBLISHED_KEY = "prefs_published"; + + /** + * The value for specifying that local preferences are to be published + */ + public static final String PUBLISH_LOCAL_PREFS_VALUE = "local"; + + /** + * The value for specifying that global preferences are to be published + */ + public static final String PUBLISH_GLOBAL_PREFS_VALUE = "global"; + + /** + * The value for specifying that an {@link Algorithm}'s user-entered input + * parameter defaults may be adjusted by the user + */ + public static final String PUBLISH_PARAM_DEFAULT_PREFS_VALUE = "param-defaults"; + + /** + * The key for declaring a need to receive preferences. "true" and "false" + * are the possible associated values. + */ + public static final String RECEIVE_PREFS_KEY = "receive_prefs"; + + + + /** + * The suffix to add to the service's PID for get... [truncated message content] |