Class: CmlFormulaReader

Kekule.IO. CmlFormulaReader

new CmlFormulaReader()

CML element reader.
Source:

Extends

Methods

getAtomChildren(elem, domHelper)

Returns child elements of .
Parameters:
Name Type Description
elem Object
domHelper Object
Inherited From:
Source:

hasAtomChildren(elem, domHelper)

Check if a element has child elements.
Parameters:
Name Type Description
elem Object
domHelper Object
Inherited From:
Source:

iterateChildElements(elem, parentObj)

Iterate through and read all direct children of elem.
Parameters:
Name Type Description
elem Object
parentObj Object
Inherited From:
Source:

readChildElement(elem, parentObj) → {Variant}

Read and handle child elements,
Parameters:
Name Type Description
elem Object
parentObj Object
Inherited From:
Source:
Returns:
Type
Variant

readChildElementDef(elem, parentObj) → {Variant}

A default method to read child elements, just ask CmlElementReaderFactory to create a suitable reader and use the reader to read.
Parameters:
Name Type Description
elem Object
parentObj Object
Inherited From:
Source:
Returns:
Type
Variant

readConsice(concise) → {Kekule.MolecularFormula}

Read concise directly and return a formula object. Sometimes formula attrib are in molecule element directly, such as , use this method to analysis and return proper object instead of Kekule.IO.CmlFormulaReader.readElement.
Parameters:
Name Type Description
concise String
Source:
Returns:
Type
Kekule.MolecularFormula

readElement(elem, parentObj) → {Variant}

Read an element in CML document and returns a proper Kekule object or insert something into parentObj.
Parameters:
Name Type Description
elem Object
parentObj Kekule.ChemObject
Inherited From:
Source:
Returns:
Type
Variant

readFormula(elem, domHelper) → {Kekule.MolecularFormula}

Read an formula a CML formula element.
Parameters:
Name Type Description
elem Object
domHelper Object
Source:
Returns:
Type
Kekule.MolecularFormula