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 input for InChI to structure conversion.
25 * @author Sam Adams
26 */
27 public class JniInchiInputInchi {
28
29 /**
30 * InChI ASCIIZ string to be converted to a strucure
31 */
32 protected String inchiString;
33
34 /**
35 * InChI options: space-delimited
36 */
37 protected String options;
38
39 /**
40 * Constructor.
41 * @param inchi InChI string
42 * @param opts Options
43 */
44 public JniInchiInputInchi(final String inchi) {
45 this.inchiString = inchi;
46 this.options = "";
47 }
48
49 /**
50 * Constructor.
51 * @param inchi InChI string
52 * @param opts Options
53 */
54 public JniInchiInputInchi(final String inchi, final String opts) throws JniInchiException {
55 this.inchiString = inchi;
56 this.options = JniInchiWrapper.checkOptions(opts);
57 }
58
59 /**
60 * Constructor.
61 * @param inchi InChI string
62 * @param opts Options
63 */
64 public JniInchiInputInchi(final String inchi, List opts) throws JniInchiException {
65 this.inchiString = inchi;
66 this.options = JniInchiWrapper.checkOptions(opts);
67 }
68
69 /**
70 * Returns options string.
71 * @return
72 */
73 public String getOptions() {
74 return options;
75 }
76
77 /**
78 * Returns options string.
79 * @return
80 */
81 public String getInchi() {
82 return inchiString;
83 }
84 }