Package chemaxon.marvin.io.fieldaccess
Class MFieldAccessor
java.lang.Object
chemaxon.marvin.io.fieldaccess.MFieldAccessor
Abstract class for extracting fields (properties) from input and storing them.
Under development, please do not implement it yet!
- Since:
- Marvin 5.0, 11/08/2007
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
Extracts properties.abstract String[]
Gets the keys in a record.abstract Molecule
getMainMolecule
(int irec, Molecule mol) Gets the main molecule object in a record.abstract boolean
isEditable
(int irec, Molecule mol, String key) Tests whether a field is editable or not.protected String
Converts a property to a string.final void
Sets a property.abstract void
Sets properties.
-
Constructor Details
-
MFieldAccessor
public MFieldAccessor()
-
-
Method Details
-
getMainMolecule
Gets the main molecule object in a record.- Parameters:
irec
- the record numbermol
- input molecule, may benull
in case of an implementation for which the record number is enough- Returns:
- the main molecule object or
null
if it does not exist
-
getKeys
Gets the keys in a record.- Parameters:
irec
- the record numbermol
- input molecule, may benull
in case of an implementation for which the record number is enough- Returns:
- the array of keys
-
getFields
Extracts properties.- Parameters:
irec
- the record numbermol
- input molecule, may benull
in case of an implementation for which the record number is enoughkeys
- array of field keysvalues
- the output array, may containnull
if a property is not found
-
setFields
Sets properties.- Parameters:
irec
- the record numbermol
- input molecule, may benull
in case of an implementation for which the record number is enoughkeys
- array of field keysvalues
- array of values
-
isEditable
Tests whether a field is editable or not.- Parameters:
irec
- the record numbermol
- input molecule, may benull
in case of an implementation for which the record number is enoughkey
- the field key- Returns:
true
if setFields works for this key,false
otherwise
-
setField
Sets a property.- Parameters:
irec
- the record numbermol
- input molecule, may benull
in case of an implementation for which the record number is enoughkey
- the field keyp
- the property value
-
propToString
Converts a property to a string. Utility method called by implementations.- Parameters:
p
- the property- Returns:
- the string value
-