# Class JDXMOLParser

java.lang.Object
org.jmol.jsv.JDXMOLParser

All Implemented Interfaces:
  `JmolJDXMOLParser`

public class JDXMOLParser extends Object implements JmolJDXMOLParser
Parses JDX-MOL records ##$MODELS and ##$PEAKS/##$SIGNALS. Used in both Jmol and JSpecView. Also gets info from ACD Labs files JCAMP-DX=5.00 $$ ACD/SpecManager v 12.01

## Field Summary

Fields
Modifier and Type
Field
Description
`static final boolean`
`allowSameName`

## Constructor Summary

Constructors
Constructor
Description
`JDXMOLParser()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getAttribute(String line, String tag)`
`String`
`getFirstModelWithPeaks()`
`String`
`getRecord(String key)`
`boolean`
`readACDAssignments(int nPoints, boolean isPeakAssignment, Lst<String[]> list)`
`String`
`readACDMolFile()`
MOL file embedded in JDX file
`boolean`
`readModels()`
`int`
`readPeaks(boolean isSignals, int peakCount)`
`JmolJDXMOLParser`
`set(JmolJDXMOLReader loader, String filePath, Map<String,Object> htParams)`
`int`
`setACDAssignments(String model, String mytype, int peakCount, Lst<String[]> acdlist, String molFile)`
`void`
`setLine(String s)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### allowSameName

public static final boolean allowSameName

See Also:
  - Constant Field Values

## Constructor Details

### JDXMOLParser

public JDXMOLParser()

## Method Details

### set

public JmolJDXMOLParser set(JmolJDXMOLReader loader, String filePath, Map<String,Object> htParams)

Specified by:
  `set` in interface `JmolJDXMOLParser`

### getAttribute

public String getAttribute(String line, String tag)

Specified by:
  `getAttribute` in interface `JmolJDXMOLParser`

### getRecord

public String getRecord(String key) throws Exception

Specified by:
  `getRecord` in interface `JmolJDXMOLParser`
Throws:
  `Exception`

### readModels

public boolean readModels() throws Exception

Specified by:
  `readModels` in interface `JmolJDXMOLParser`
Throws:
  `Exception`

### readACDMolFile

public String readACDMolFile() throws Exception
MOL file embedded in JDX file

Specified by:
  `readACDMolFile` in interface `JmolJDXMOLParser`
Throws:
  `Exception`

### readACDAssignments

public boolean readACDAssignments(int nPoints, boolean isPeakAssignment, Lst<String[]> list) throws Exception

Specified by:
  `readACDAssignments` in interface `JmolJDXMOLParser`
Throws:
  `Exception`

### setACDAssignments

public int setACDAssignments(String model, String mytype, int peakCount, Lst<String[]> acdlist, String molFile) throws Exception

Specified by:
  `setACDAssignments` in interface `JmolJDXMOLParser`
Throws:
  `Exception`

### readPeaks

public int readPeaks(boolean isSignals, int peakCount) throws Exception

Specified by:
  `readPeaks` in interface `JmolJDXMOLParser`
Throws:
  `Exception`

### setLine

public void setLine(String s)

Specified by:
  `setLine` in interface `JmolJDXMOLParser`

### getFirstModelWithPeaks

public String getFirstModelWithPeaks()

Specified by:
  `getFirstModelWithPeaks` in interface `JmolJDXMOLParser`