Logo Search packages:      
Sourcecode: cdk version File versions  Download package

EntryReact.java
/* $RCSfile$
 * $Author: rajarshi $
 * $Date: 2007-10-22 02:38:43 +0200 (Mon, 22 Oct 2007) $
 * $Revision: 9172 $
 *
 * Copyright (C) 2003-2007  The Chemistry Development Kit (CDK) project
 * 
 * Contact: cdk-devel@lists.sourceforge.net
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1
 * of the License, or (at your option) any later version.
 * All we ask is that proper credit is given for our work, which includes
 * - but is not limited to - adding the above copyright notice to the beginning
 * of your source code files, and to any copyright notice that you may distribute
 * with programs based on this work.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */
package org.openscience.cdk.dict;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Entry in a Dictionary for reactions.
 * 
 * @author       Miguel Rojas <miguelrojasch@users.sf.net>
 * @cdk.created  2008-01-01
 * @cdk.keyword  dictionary
 * @cdk.module   dict
 *
 * @see          Dictionary
 */
00045 public class EntryReact extends Entry{
    
    private List<String> reactionInfo;
      private List<String> representations;
      private HashMap<String,String> parameters;
      private List<String> parametersValue;
      private List<String> reactionExample;
      private List<List<String>> parameterClass;
      private String mechanism;
    
    /**
     * Constructor of the EntryReact.
     * 
     * @param identifier The ID value
     * @param term
     */
00061     public EntryReact(String identifier, String term) {
        super(identifier, term);
        this.representations = new ArrayList<String>();
        this.parameters = new HashMap<String,String>();
        this.parametersValue = new ArrayList<String>();
        this.reactionExample = new ArrayList<String>();
        this.parameterClass = new ArrayList<List<String>>();
    }
    
    /**
     * Constructor of the EntryReact.
     * 
     * @param identifier The ID value
     */
00075     public EntryReact(String identifier) {
      this(identifier, "");
    }
    
    public void setReactionMetadata(String metadata) {
        this.reactionInfo.add( metadata );
    }
    
    public List<String> getReactionMetadata() {
        return this.reactionInfo;
    }
    
    /**
     * Set the representation of the reaction.
     * 
     * @param contentRepr The representation of the reaction as String
     */
00092     public void setRepresentation(String contentRepr) {
      this.representations.add(contentRepr);
    }
    
    /**
     * Get the Representation of the reaction.
     * 
     * @return A List of String of the reaction representations 
     */
00101     public List<String> getRepresentations() {
      return this.representations;
    }
    
    /**
     * Set the parameters of the reaction.
     * 
     * @param nameParam The parameter names of the reaction as String
     * @param typeParam The parameter types of the reaction as String
     * @param value     The value default of the parameter
     */
00112     public void setParameters(String nameParam, String typeParam, String value) {
      this.parameters.put(nameParam, typeParam);
      this.parametersValue.add(value);
    }
    
    /**
     * Get the parameters of the reaction.
     * 
     * @return A HashMap with the parameters 
     */
00122     public HashMap<String,String> getParameters() {
      return this.parameters;
    }

    /**
     * Get the IParameterReact's of the reaction.
     * 
     * @return A String List with the parameter class 
     */
00131     public List<List<String>> getParameterClass() {
      return this.parameterClass;
    }
    /**
     * Add a IParameterReact's of the reaction.
     * 
     * @param param A String List containing the information about this parameter.
     */
00139     public void addParameter(List<String> param) {
      
      this.parameterClass.add(param);
    }
    /**
     * Get the parameter value of the reaction.
     * 
     * @return A List with the parameter value 
     */
00148     public List<String> getParameterValue() {
      return this.parametersValue;
    }

    /**
     * Set the mechanism of this reaction.
     * 
     * @param mechani The mechanism
     */
00157       public void setMechanism(String mechani) {
            this.mechanism = mechani; 
      }
      /**
     * Get the mechanism of this reaction.
     * 
     * @return The mechanism
     */
00165       public String getMechanism() {
            return this.mechanism; 
      }

      /**
       * add a example for this reaction.
       * 
       * @param xml A reaction in XML scheme
       */
00174       public void addExampleReaction(String xml) {
            this.reactionExample.add(xml);
            
      }

      /**
       * @return A List of reactions in XML schema.
       */
00182       public List<String> getExampleReactions() {
            return this.reactionExample;
            
      }
}

Generated by  Doxygen 1.6.0   Back to index