~ubuntu-branches/ubuntu/maverick/cdk/maverick

« back to all changes in this revision

Viewing changes to src/org/openscience/cdk/reaction/IReactionProcess.java

  • Committer: Bazaar Package Importer
  • Author(s): Paul Cager
  • Date: 2008-04-09 21:17:53 UTC
  • Revision ID: james.westby@ubuntu.com-20080409211753-46lmjw5z8mx5pd8d
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  $RCSfile$
 
3
 *  $Author: egonw $
 
4
 *  $Date: 2006-03-29 10:27:08 +0200 (Wed, 29 Mar 2006) $
 
5
 *  $Revision: 5855 $
 
6
 *
 
7
 *  Copyright (C) 2006-2007  Miguel Rojas <miguel.rojas@uni-koeln.de>
 
8
 *
 
9
 *  Contact: cdk-devel@lists.sourceforge.net
 
10
 *
 
11
 *  This program is free software; you can redistribute it and/or
 
12
 *  modify it under the terms of the GNU Lesser General Public License
 
13
 *  as published by the Free Software Foundation; either version 2.1
 
14
 *  of the License, or (at your option) any later version.
 
15
 *
 
16
 *  This program is distributed in the hope that it will be useful,
 
17
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
 *  GNU Lesser General Public License for more details.
 
20
 *
 
21
 *  You should have received a copy of the GNU Lesser General Public License
 
22
 *  along with this program; if not, write to the Free Software
 
23
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
24
 */
 
25
package org.openscience.cdk.reaction;
 
26
 
 
27
import org.openscience.cdk.exception.CDKException;
 
28
import org.openscience.cdk.interfaces.IMoleculeSet;
 
29
import org.openscience.cdk.interfaces.IReactionSet;
 
30
 
 
31
/**
 
32
 * Classes that implement this interface are Reactions types.
 
33
 *
 
34
 * @author      Miguel Rojas
 
35
 * @cdk.module  reaction
 
36
 */
 
37
public interface IReactionProcess {
 
38
        
 
39
    
 
40
        /**
 
41
         * Returns a <code>Map</code> which specifies which reaction
 
42
         * is implemented by this class. 
 
43
         *
 
44
         * These fields are used in the map:
 
45
         * <ul>
 
46
         * <li>Specification-Reference: refers to an entry in a unique dictionary or web page
 
47
         * <li>Implementation-Title: anything
 
48
         * <li>Implementation-Identifier: a unique identifier for this version of
 
49
         *  this class
 
50
         * <li>Implementation-Vendor: CDK, JOELib, or anything else
 
51
         * </ul>
 
52
         *
 
53
         * @return An object containing the reaction specification
 
54
         */
 
55
    public ReactionSpecification getSpecification();
 
56
    /** 
 
57
     * Returns the names of the parameters for this reaction. 
 
58
     *
 
59
     * @return An array of String containing the names of the paraneters 
 
60
     * that this reaction can accept
 
61
     */
 
62
    public String[] getParameterNames();
 
63
    /** 
 
64
     * Returns a class matching that of the parameter with the given name.
 
65
     *
 
66
     * @param name The name of the parameter whose type is requested
 
67
     * @return An Object of the class corresponding to the parameter with the supplied name
 
68
     */
 
69
    public Object getParameterType(String name);
 
70
    
 
71
    /** 
 
72
     * Sets the parameters for this reaction. 
 
73
     *
 
74
     * Must be done before calling
 
75
     * calculate as the parameters influence the calculation outcome.
 
76
     *
 
77
     * @param params An array of Object containing the parameters for this reaction
 
78
     * @throws CDKException if invalid number of type of parameters are passed to it
 
79
     * 
 
80
     * @see #getParameters
 
81
     */
 
82
    public void setParameters(Object[] params) throws CDKException;
 
83
    
 
84
    /** 
 
85
     * Returns the current parameter values.
 
86
     *
 
87
     * @return An array of Object containing the parameter values
 
88
     * @see #setParameters
 
89
     * */
 
90
    public Object[] getParameters();
 
91
    /** 
 
92
     * Initiates the process for the given Reaction.
 
93
     * 
 
94
     * Optionally, parameters may be set which can affect the course of the process.
 
95
     *
 
96
     * @param reactants   An {@link IMoleculeSet} for which this process should be initiate.
 
97
     * @param agents      An {@link IMoleculeSet} for which this process should be initiate.
 
98
     * 
 
99
     * @throws CDKException if an error occurs during the reaction process. 
 
100
     * See documentation for individual reaction processes
 
101
     */
 
102
    public IReactionSet initiate(IMoleculeSet reactants, IMoleculeSet agents) throws CDKException;
 
103
 
 
104
}