1 /* 2 * Copyright 2006-2010 Sam Adams <sea36 at users.sourceforge.net> 3 * 4 * This file is part of JNI-InChI. 5 * 6 * JNI-InChI is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU Lesser General Public License as published 8 * by the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * JNI-InChI is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public License 17 * along with JNI-InChI. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 package net.sf.jniinchi; 20 21 import java.util.List; 22 23 /** 24 * Encapsulates structure input for InChI generation. 25 * @author Sam Adams 26 */ 27 public class JniInchiInput extends JniInchiStructure { 28 29 /** 30 * Options string, 31 */ 32 protected String options; 33 34 /** 35 * Constructor. 36 * @throws JniInchiException 37 */ 38 public JniInchiInput() { 39 this.options = ""; 40 } 41 42 /** 43 * Constructor. 44 * @param opts Options string. 45 * @throws JniInchiException 46 */ 47 public JniInchiInput(final String opts) throws JniInchiException { 48 this.options = opts == null ? "" : JniInchiWrapper.checkOptions(opts); 49 } 50 51 /** 52 * Constructor. 53 * @param opts List of options. 54 * @throws JniInchiException 55 */ 56 public JniInchiInput(List opts) throws JniInchiException { 57 this.options = JniInchiWrapper.checkOptions(opts); 58 } 59 60 /** 61 * Constructor. 62 * @throws JniInchiException 63 */ 64 public JniInchiInput(JniInchiStructure struct) { 65 this(); 66 setStructure(struct); 67 } 68 69 /** 70 * Constructor. 71 * @throws JniInchiException 72 */ 73 public JniInchiInput(JniInchiStructure struct, String opts) throws JniInchiException { 74 this(opts); 75 setStructure(struct); 76 } 77 78 /** 79 * Returns options string. 80 * @return 81 */ 82 public String getOptions() { 83 return options; 84 } 85 }