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

« back to all changes in this revision

Viewing changes to src/org/openscience/cdk/io/formats/MOPAC97Format.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
/* $RCSfile$
 
2
 * $Author: egonw $
 
3
 * $Date: 2007-01-04 18:46:10 +0100 (Thu, 04 Jan 2007) $
 
4
 * $Revision: 7636 $
 
5
 *
 
6
 * Copyright (C) 2004-2007  The Chemistry Development Kit (CDK) project
 
7
 *
 
8
 * Contact: cdk-devel@lists.sourceforge.net
 
9
 *
 
10
 * This library is free software; you can redistribute it and/or
 
11
 * modify it under the terms of the GNU Lesser General Public
 
12
 * License as published by the Free Software Foundation; either
 
13
 * version 2.1 of the License, or (at your option) any later version.
 
14
 *
 
15
 *  This library is distributed in the hope that it will be useful,
 
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
18
 * Lesser General Public License for more details.
 
19
 *
 
20
 * You should have received a copy of the GNU Lesser General Public
 
21
 * License along with this library; if not, write to the Free Software
 
22
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
23
 */
 
24
package org.openscience.cdk.io.formats;
 
25
 
 
26
import org.openscience.cdk.tools.DataFeatures;
 
27
 
 
28
/**
 
29
 * @cdk.module io
 
30
 * @cdk.set    io-formats
 
31
 */
 
32
public class MOPAC97Format implements IChemFormatMatcher {
 
33
 
 
34
        private static IResourceFormat myself = null;
 
35
        
 
36
    private MOPAC97Format() {}
 
37
    
 
38
    public static IResourceFormat getInstance() {
 
39
        if (myself == null) myself = new MOPAC97Format();
 
40
        return myself;
 
41
    }
 
42
    
 
43
    public String getFormatName() {
 
44
        return "MOPAC 97";
 
45
    }
 
46
 
 
47
    public String getMIMEType() {
 
48
        return null;
 
49
    }
 
50
    public String getPreferredNameExtension() {
 
51
        return getNameExtensions()[0];
 
52
    }
 
53
    public String[] getNameExtensions() {
 
54
        return new String[]{"mop","mopcrt","mopout"};
 
55
    }
 
56
 
 
57
    public String getReaderClassName() { 
 
58
      return "org.openscience.cdk.io.MOPAC97Reader";
 
59
    }
 
60
    public String getWriterClassName() { return null; }
 
61
 
 
62
    public boolean matches(int lineNumber, String line) {
 
63
        if (line.indexOf("MOPAC  97.") >= 0){
 
64
            return true;
 
65
        }
 
66
        return false;
 
67
    }
 
68
 
 
69
        public boolean isXMLBased() {
 
70
                return false;
 
71
        }
 
72
 
 
73
        public int getSupportedDataFeatures() {
 
74
                return DataFeatures.NONE;
 
75
        }
 
76
 
 
77
        public int getRequiredDataFeatures() {
 
78
                return DataFeatures.NONE;
 
79
        }
 
80
}