/**
  * Marshall an AreaMapping object into a DOMElement object.
  * 
  * @param QtiComponent $component An AreaMapping object.
  * @return DOMElement The according DOMElement object.
  */
 protected function marshall(QtiComponent $component)
 {
     $element = static::getDOMCradle()->createElement($component->getQtiClassName());
     self::setDOMElementAttribute($element, 'defaultValue', $component->getDefaultValue());
     if ($component->hasLowerBound() === true) {
         self::setDOMElementAttribute($element, 'lowerBound', $component->getLowerBound());
     }
     if ($component->hasUpperBound() === true) {
         self::setDOMElementAttribute($element, 'upperBound', $component->getUpperBound());
     }
     foreach ($component->getAreaMapEntries() as $entry) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($entry);
         $element->appendChild($marshaller->marshall($entry));
     }
     return $element;
 }