chemaxon.struc
Class MProp

java.lang.Object
  extended by chemaxon.struc.MProp
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
MBooleanProp, MCollectionProp, MDocument.Prop, MDoubleArrayProp, MDoubleProp, MHCoords3DProp, MIntegerArrayProp, MIntegerProp, MMoleculeProp, MObjectProp, MStringProp

public abstract class MProp
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Property base class.

Since:
Marvin 4.1, 11/20/2005
Version:
5.0, 11/06/2007
Author:
Peter Csizmadia
See Also:
Serialized Form

Field Summary
static int CONV_SELFREF
          Conversion of self referring property.
static int COORDDEP
          Coordinate dependent property.
 
Constructor Summary
MProp()
           
 
Method Summary
abstract  MProp cloneProp()
          Clones the object.
 java.lang.String convertToString(java.lang.String fmt)
          Deprecated. As of Marvin 5.7, replaced by MPropHandler.convertToString(MProp, String)
abstract  java.lang.String convertToString(java.lang.String fmt, int flags)
          Deprecated. As of Marvin 5.7, replaced by MPropHandler.convertToString(MProp, String). Instead CONV_SELFREF flag use fmt + ":-selfrefprops" string in fmt.
protected  long getGrinvCC()
          Gets the graph invariant change count at the moment of creation.
 int getPropArraySize()
          Gets the array size.
abstract  java.lang.String getPropType()
          Gets the type name of the property.
abstract  java.lang.Object getPropValue()
          Gets the property value as an object.
abstract  java.lang.String getPropXSDType()
          Gets the XSD type name of the property.
 boolean isCoordDependent()
          Tests whether the property depends on the molecular coordinates.
protected  void setCoordDependent(long gcc)
          Sets the property as coordinate dependent.
 java.lang.String toString()
          Overrides Object.toString() to ease debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COORDDEP

public static final int COORDDEP
Coordinate dependent property.

See Also:
MPropertyContainer.set(String, MProp, int), Constant Field Values

CONV_SELFREF

public static final int CONV_SELFREF
Conversion of self referring property.

Since:
Marvin 5.0, 11/05/2007
See Also:
convertToString(java.lang.String, int), Constant Field Values
Constructor Detail

MProp

public MProp()
Method Detail

getPropArraySize

public int getPropArraySize()
Gets the array size. It should return the array size, or -1 if the property is not an array.

Returns:
-1 in default implementation

convertToString

public abstract java.lang.String convertToString(java.lang.String fmt,
                                                 int flags)
                                          throws MolExportException
Deprecated. As of Marvin 5.7, replaced by MPropHandler.convertToString(MProp, String). Instead CONV_SELFREF flag use fmt + ":-selfrefprops" string in fmt.

Converts the property to text format.

Parameters:
fmt - the molecule file format or null
flags - optional conversion flags
Returns:
the string
Throws:
MolExportException
Since:
Marvin 5.0, 11/05/2007
See Also:
CONV_SELFREF

convertToString

public final java.lang.String convertToString(java.lang.String fmt)
                                       throws MolExportException
Deprecated. As of Marvin 5.7, replaced by MPropHandler.convertToString(MProp, String)

Converts the property to text format.

Parameters:
fmt - the molecule file format or null
Returns:
the string
Throws:
MolExportException
Since:
Marvin 4.1.7, 04/10/2007

getPropValue

public abstract java.lang.Object getPropValue()
Gets the property value as an object.

Returns:
the object

getPropType

public abstract java.lang.String getPropType()
Gets the type name of the property.

Returns:
the name

getPropXSDType

public abstract java.lang.String getPropXSDType()
Gets the XSD type name of the property.

Returns:
the name

cloneProp

public abstract MProp cloneProp()
Clones the object.

Returns:
the clone

isCoordDependent

public final boolean isCoordDependent()
Tests whether the property depends on the molecular coordinates.

Returns:
true if the property depends on the molecular coordinates, false otherwise

getGrinvCC

protected final long getGrinvCC()
Gets the graph invariant change count at the moment of creation.

Returns:
the graph invariant change count
Since:
Marvin 4.1.3, 11/09/2006

setCoordDependent

protected final void setCoordDependent(long gcc)
Sets the property as coordinate dependent.

Parameters:
gcc - the graph invariant change count
Since:
Marvin 4.1.3, 11/09/2006

toString

public java.lang.String toString()
Overrides Object.toString() to ease debugging. Returns a string consisting of the classname (without the package name!), the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object
Since:
Marvin 4.1.8, 04/19/2007