Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

Molstructure

Here is a real-world example for illustrative purposes. Suppose you have a chemical information system that has to support both Molfile and Smiles structures and a business method in a business object has to get the mol-weight and molformula from the Molstructure objects to fulfill its responsibilities. A naive design is to have two versions of the business method one takes a Molfile structure object as input and another takes a Smiles structure as input (Figure 2.4). [Pg.10]

You would not create an instance of Molstructure without knowing its format. [Pg.18]

Notice that now each of these two classes extends Molstructure class and all common code is removed from them. This result is because the common behaviors are inherited from the common superclass—Molstructure. Also notice that even some logic in the constructor is inherited from the superclass. Now we have achieved some code reuse through inheritance by having a class hierarchy. [Pg.19]

Notice that the new register ) method takes the abstract class Molstructure as input. At compile time, it does not care whether MolfileStructure or SmilesStructure is bound to it when the application runs. At runtime, depending on what concrete type is passed into the register ) method by its caller, CompoundRegistrationService behaves according to the implementation details of MolfileStructrure or SmilesStructure. [Pg.21]

Molstructurelnspector inspector = MDLCheshire Molstructure Inspector Impl. getlnstance() ... [Pg.78]

The other instance variables in the Compound class include a Molstructure object, a list of salt structures, a list of parent structures, a String array that contains information about what has been changed or what the problems are in the structure as a result of the chemistry rules checking, and a Compounds tate object representing the current state of the Compound object. The process() method in the Compound object simply delegates the call to its current state object, which knows how to process the Compound object depending on its current state as described above. [Pg.83]

Molstructure is similar to the Quantity object described in Martin Fowler s Analysis Patterns book (Fowler, 1996) in that it has a format (unit) and a value. [Pg.93]

Molstructure structure = new Molstructure (Molstructure.MOLFILE, attributeValue.toString )) compound.setMolstructure structure) ... [Pg.131]


See other pages where Molstructure is mentioned: [Pg.112]    [Pg.9]    [Pg.10]    [Pg.11]    [Pg.16]    [Pg.17]    [Pg.17]    [Pg.17]    [Pg.18]    [Pg.18]    [Pg.18]    [Pg.19]    [Pg.21]    [Pg.77]    [Pg.77]    [Pg.79]    [Pg.80]    [Pg.80]    [Pg.83]    [Pg.83]    [Pg.83]    [Pg.83]    [Pg.85]    [Pg.85]    [Pg.85]    [Pg.86]    [Pg.87]    [Pg.87]    [Pg.87]    [Pg.90]    [Pg.91]    [Pg.91]    [Pg.91]    [Pg.91]    [Pg.93]    [Pg.93]    [Pg.94]    [Pg.94]    [Pg.95]    [Pg.96]    [Pg.97]    [Pg.98]    [Pg.130]   


SEARCH



Molstructure Inspector

Molstructure class

Molstructure object

© 2024 chempedia.info