コード例 #1
0
ファイル: CXDSName.class.php プロジェクト: fbone/mediboard4
 /**
  * Génération du xml
  *
  * @return CXDSXmlDocument
  */
 function toXML()
 {
     $xml = new CXDSXmlDocument();
     $xml->createNameDescriptionRoot($this->name);
     $xml->importDOMDocument($xml->documentElement, $this->value->toXML());
     return $xml;
 }
コード例 #2
0
 /**
  * Génération du xml
  *
  * @return CXDSXmlDocument
  */
 function toXML()
 {
     $xml = new CXDSXmlDocument();
     $xml->createRegistryObjectListRoot();
     $base_xml = $xml->documentElement;
     foreach ($this->registryPackage as $_registryPackage) {
         $xml->importDOMDocument($base_xml, $_registryPackage->toXML());
     }
     foreach ($this->extrinsicObject as $_extrinsicObject) {
         $xml->importDOMDocument($base_xml, $_extrinsicObject->toXML());
     }
     foreach ($this->association as $_association) {
         $xml->importDOMDocument($base_xml, $_association->toXML());
     }
     $xml->createSubmitObjectsRequestRoot();
     return $xml;
 }
コード例 #3
0
 /**
  * Génération du XML pour l'instance en cours
  *
  * @return CXDSXmlDocument
  */
 function toXML()
 {
     $xml = new CXDSXmlDocument();
     $xml->createExternalIdentifierRoot($this->id, $this->identificationScheme, $this->registryObject, $this->value);
     if ($this->name) {
         $xml->importDOMDocument($xml->documentElement, $this->name->toXML());
     }
     return $xml;
 }
コード例 #4
0
 /**
  * @see parent::toXML()
  *
  * @return CXDSXmlDocument
  */
 function toXML()
 {
     $xml = new CXDSXmlDocument();
     $root = $xml->createAssociationRoot($this->id, $this->associationType, $this->sourceObject, $this->targetObject, $this->objectType);
     if ($this->OriginalStatus) {
         $xml->importDOMDocument($root, $this->OriginalStatus->toXML());
     }
     if ($this->NewStatus) {
         $xml->importDOMDocument($root, $this->NewStatus->toXML());
     }
     if ($this->SubmissionSetStatus) {
         $xml->importDOMDocument($root, $this->SubmissionSetStatus->toXML());
     }
     if ($this->PreviousVersion) {
         $xml->importDOMDocument($root, $this->PreviousVersion->toXML());
     }
     return $xml;
 }
コード例 #5
0
 /**
  * Build ProvideAndRegisterDocumentSetRequest event
  *
  * @param CCompteRendu|CFile $object compte rendu
  *
  * @see parent::build()
  *
  * @throws CMbException
  * @return void
  */
 function build($object)
 {
     parent::build($object);
     $uuid = $this->uuid;
     $factory = CCDAFactory::factory($object);
     $cda = $factory->generateCDA();
     try {
         CCdaTools::validateCDA($cda);
     } catch (CMbException $e) {
         throw $e;
     }
     $xml = new CXDSXmlDocument();
     $xds = CXDSFactory::factory($factory);
     $xds->type = $this->type;
     $xds->extractData();
     $header_xds = $xds->generateXDS57($uuid, $this->action);
     $xml->importDOMDocument($xml, $header_xds);
     $this->message = $xml->saveXML();
     $this->updateExchange(false);
 }
コード例 #6
0
 /**
  * Génère le XML
  *
  * @param boolean $registry XML pour le lot de soumission
  *
  * @return CXDSXmlDocument|void
  */
 function toXML($registry)
 {
     $xml = new CXDSXmlDocument();
     $variables = $this->getPropertie();
     if ($registry) {
         $xml->createRegistryPackageRoot($this->id);
     } else {
         $xml->createExtrinsicObjectRoot($this->id, $this->mimeType, $this->objectType, $this->lid);
     }
     $base_xml = $xml->documentElement;
     foreach ($variables as $_variable) {
         $class = $this->{$_variable};
         if (!$class || $_variable === "mimeType" || $_variable === "lid") {
             continue;
         }
         if (is_array($this->{$_variable})) {
             foreach ($this->{$_variable} as $_instance) {
                 $xml->importDOMDocument($base_xml, $_instance->toXML());
             }
         } else {
             $xml->importDOMDocument($base_xml, $class->toXML());
         }
     }
     return $xml;
 }