private void processElementNormal ( GeneratorSingleCluster cluster , Node cur ) { double mean = 0.0 ; double stddev = 1.0 ; String meanstr = ( ( Element ) cur ) . getAttribute ( ATTR_MEAN ) ; if ( meanstr != null && meanstr . length ( ) > 0 ) { mean = ParseUtil . parseDouble ( meanstr ) ; } String stddevstr = ( ( Element ) cur ) . getAttribute ( ATTR_STDDEV ) ; if ( stddevstr != null && stddevstr . length ( ) > 0 ) { stddev = ParseUtil . parseDouble ( stddevstr ) ; } // *** New normal distribution generator Random random = cluster . getNewRandomGenerator ( ) ; Distribution generator = new NormalDistribution ( mean , stddev , random ) ; cluster . addGenerator ( generator ) ; // TODO: check for unknown attributes. XMLNodeIterator iter = new XMLNodeIterator ( cur . getFirstChild ( ) ) ; while ( iter . hasNext ( ) ) { Node child = iter . next ( ) ; if ( child . getNodeType ( ) == Node . ELEMENT_NODE ) { LOG . warning ( "Unknown element in XML specification file: " + child . getNodeName ( ) ) ; } } }
Process a normal Element in the XML stream .