/**
  * Marshall a ExtendedAssessmentItemRef object into its DOMElement representation.
  * 
  * @return DOMElement The according DOMElement object.
  */
 protected function marshall(QtiComponent $component)
 {
     $element = parent::marshall($component);
     foreach ($component->getResponseDeclarations() as $responseDeclaration) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($responseDeclaration);
         $element->appendChild($marshaller->marshall($responseDeclaration));
     }
     foreach ($component->getOutcomeDeclarations() as $outcomeDeclaration) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($outcomeDeclaration);
         $element->appendChild($marshaller->marshall($outcomeDeclaration));
     }
     if ($component->hasResponseProcessing() === true) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getResponseProcessing());
         $respProcElt = $marshaller->marshall($component->getResponseProcessing());
         $element->appendChild($respProcElt);
     }
     self::setDOMElementAttribute($element, 'adaptive', $component->isAdaptive());
     self::setDOMElementAttribute($element, 'timeDependent', $component->isTimeDependent());
     return $element;
 }
 /**
  * Marshall a ExtendedAssessmentItemRef object into its DOMElement representation.
  *
  * @param \qtism\data\QtiComponent
  * @return \DOMElement The according DOMElement object.
  */
 protected function marshall(QtiComponent $component)
 {
     $element = parent::marshall($component);
     foreach ($component->getResponseDeclarations() as $responseDeclaration) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($responseDeclaration);
         $element->appendChild($marshaller->marshall($responseDeclaration));
     }
     foreach ($component->getOutcomeDeclarations() as $outcomeDeclaration) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($outcomeDeclaration);
         $element->appendChild($marshaller->marshall($outcomeDeclaration));
     }
     foreach ($component->getTemplateDeclarations() as $templateDeclaration) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($templateDeclaration);
         $element->appendChild($marshaller->marshall($templateDeclaration));
     }
     if ($component->hasTemplateProcessing() === true) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getTemplateProcessing());
         $templProcElt = $marshaller->marshall($component->getTemplateProcessing());
         $element->appendChild($templProcElt);
     }
     if ($component->hasResponseProcessing() === true) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getResponseProcessing());
         $respProcElt = $marshaller->marshall($component->getResponseProcessing());
         $element->appendChild($respProcElt);
     }
     foreach ($component->getModalFeedbackRules() as $modalFeedbackRule) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($modalFeedbackRule);
         $element->appendChild($marshaller->marshall($modalFeedbackRule));
     }
     foreach ($component->getShufflings() as $shuffling) {
         $marshaller = $this->getMarshallerFactory()->createMarshaller($shuffling);
         $element->appendChild($marshaller->marshall($shuffling));
     }
     self::setDOMElementAttribute($element, 'adaptive', $component->isAdaptive());
     self::setDOMElementAttribute($element, 'timeDependent', $component->isTimeDependent());
     $endAttemptIdentifiers = $component->getEndAttemptIdentifiers();
     if (count($endAttemptIdentifiers) > 0) {
         self::setDOMElementAttribute($element, 'endAttemptIdentifiers', implode(" ", $endAttemptIdentifiers->getArrayCopy()));
     }
     return $element;
 }