@PublicAPI public final class MPropHandler extends java.lang.Object
Constructor and Description |
---|
MPropHandler() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
convertToString(MPropertyContainer p,
java.lang.String key)
Convert key of MPropertyContainer to string.
|
static java.lang.String |
convertToString(MProp p,
java.lang.String fmt)
Converts the property to text format.
|
static MProp |
createArray(java.lang.String type,
java.lang.String sval,
int arrsize,
int delim)
Creates an array property.
|
static MProp |
createArrayXSD(java.lang.String xsdtype,
java.lang.String sval,
int size,
int delim)
Creates an array property from the XSD type.
|
static MMoleculeProp |
createMMoleculeProp(java.lang.String sval) |
static MProp |
createScalar(java.lang.String type,
java.lang.String sval)
Creates a scalar property.
|
static MProp |
createScalar(java.lang.String type,
java.lang.String sval,
MProgressMonitor pmon)
Creates a scalar property.
|
static MProp |
createScalarXSD(java.lang.String xsdtype,
java.lang.String sval)
Creates a scalar property from the XSD type.
|
static Molecule |
parseMolecule(java.lang.String sval) |
static MProp |
stringToArray(java.lang.String xsdtype,
java.lang.String sval,
int size,
int delim) |
static MProp |
stringToScalar(java.lang.String xsdtype,
java.lang.String sval) |
public static MProp createScalar(java.lang.String type, java.lang.String sval) throws MolFormatException
type
- property type or class namesval
- string value to parseMolFormatException
public static MProp createScalar(java.lang.String type, java.lang.String sval, MProgressMonitor pmon) throws MolFormatException
type
- property type or class namesval
- string value to parsepmon
- progress monitorMolFormatException
public static MProp createArray(java.lang.String type, java.lang.String sval, int arrsize, int delim) throws MolFormatException, java.lang.IllegalArgumentException
type
- property type or class namesval
- string value to parsejava.lang.IllegalArgumentException
MolFormatException
public static MProp createScalarXSD(java.lang.String xsdtype, java.lang.String sval) throws MolFormatException
xsdtype
- the XSD typesval
- string value to parseMolFormatException
public static MProp createArrayXSD(java.lang.String xsdtype, java.lang.String sval, int size, int delim) throws MolFormatException
xsdtype
- the XSD typesval
- string value to parseMolFormatException
public static java.lang.String convertToString(MProp p, java.lang.String fmt) throws java.lang.IllegalArgumentException
MProp.getPropValue()
.Object.toString()
call on the property.p
- propertyfmt
- the molecule file format or null
java.lang.IllegalArgumentException
- if conversion failspublic static java.lang.String convertToString(MPropertyContainer p, java.lang.String key)
p
- containerkey
- property objectpublic static MProp stringToScalar(java.lang.String xsdtype, java.lang.String sval) throws java.io.IOException
java.io.IOException
public static MProp stringToArray(java.lang.String xsdtype, java.lang.String sval, int size, int delim) throws java.io.IOException
java.io.IOException
public static Molecule parseMolecule(java.lang.String sval) throws java.io.IOException
java.io.IOException
public static MMoleculeProp createMMoleculeProp(java.lang.String sval) throws java.io.IOException
java.io.IOException