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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidExtracts properties.abstract String[]Gets the keys in a record.abstract MoleculegetMainMolecule(int irec, Molecule mol) Gets the main molecule object in a record.abstract booleanisEditable(int irec, Molecule mol, String key) Tests whether a field is editable or not.protected StringConverts a property to a string.final voidSets a property.abstract voidSets 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 benullin case of an implementation for which the record number is enough- Returns:
- the main molecule object or
nullif it does not exist
-
getKeys
Gets the keys in a record.- Parameters:
irec- the record numbermol- input molecule, may benullin 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 benullin case of an implementation for which the record number is enoughkeys- array of field keysvalues- the output array, may containnullif a property is not found
-
setFields
Sets properties.- Parameters:
irec- the record numbermol- input molecule, may benullin 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 benullin case of an implementation for which the record number is enoughkey- the field key- Returns:
trueif setFields works for this key,falseotherwise
-
setField
Sets a property.- Parameters:
irec- the record numbermol- input molecule, may benullin 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
-