chemaxon.marvin.io
Class MRecord

java.lang.Object
  extended by chemaxon.marvin.io.MRecord

public class MRecord
extends java.lang.Object

Record in a multi-molecule file.

Since:
Marvin 5.0, 04/06/2006
Version:
5.0.3, 03/20/2008
Author:
Peter Csizmadia

Field Summary
static int F_MOL_MISSING
          Molecule (or reaction) is missing from the record.
protected  MPropertyContainer properties
           
 
Constructor Summary
MRecord(long start, long end, int lineno, java.lang.String s, MPropertyContainer p, int[] lmap)
          Creates a record.
MRecord(long start, long end, int lineno, java.lang.String s, MPropertyContainer p, int[] lmap, int descflags)
          Creates a record.
 
Method Summary
 long getEndPosition()
          Gets the end position in the input file.
 int getFlags()
          Gets the record descriptor flags.
 int[] getLineNumberMap()
          Gets the line number to original line number mapping.
 MPropertyContainer getPropertyContainer()
          Gets the properties.
 int getStartLineCount()
          Gets the line number at the starting point.
 long getStartPosition()
          Gets the start position in the input file.
 java.lang.String getString()
          Gets the record text as string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

F_MOL_MISSING

public static final int F_MOL_MISSING
Molecule (or reaction) is missing from the record. This record descriptor flag is set if the molecule part of the record contains only a registry number ("MIREG", "MEREG", "RIREG" or "REREG") in case of an RDfile.

Since:
Marvin 5.0.3, 03/20/2008
See Also:
getFlags(), Constant Field Values

properties

protected MPropertyContainer properties
Constructor Detail

MRecord

public MRecord(long start,
               long end,
               int lineno,
               java.lang.String s,
               MPropertyContainer p,
               int[] lmap)
Creates a record.

Parameters:
start - the start position in input file
end - the end position in input file
lineno - the line number at the starting point
s - the record string
p - the properties
lmap - original line numbers

MRecord

public MRecord(long start,
               long end,
               int lineno,
               java.lang.String s,
               MPropertyContainer p,
               int[] lmap,
               int descflags)
Creates a record.

Parameters:
start - the start position in input file
end - the end position in input file
lineno - the line number at the starting point
s - the record string
p - the properties
lmap - original line numbers
descflags - extra record descriptor flags
Since:
Marvin 5.0.3, 03/20/2008
Method Detail

getString

public java.lang.String getString()
Gets the record text as string. Note that the returned string is not guaranteed to be a valid molecule file. Prepend the molecule file header and append the footer to get an importable file.

Returns:
the text
Throws:
IOException - If I/O error occured
See Also:
MRecordReader.getHeaderAsString(), MRecordReader.getFooterAsString()

getPropertyContainer

public MPropertyContainer getPropertyContainer()
Gets the properties.

Returns:
the properties

getLineNumberMap

public int[] getLineNumberMap()
Gets the line number to original line number mapping.

Returns:
the mapping

getStartPosition

public long getStartPosition()
Gets the start position in the input file.

Returns:
the position

getEndPosition

public long getEndPosition()
Gets the end position in the input file.

Returns:
the position

getStartLineCount

public int getStartLineCount()
Gets the line number at the starting point.

Returns:
the line number

getFlags

public int getFlags()
Gets the record descriptor flags.

Returns:
the record descriptor flags
Since:
Marvin 5.0.3, 03/20/2008
See Also:
F_MOL_MISSING