Exemplo n.º 1
0
 /**
  * @see parent::toXML()
  *
  * @return CXDSXmlDocument
  */
 function toXML()
 {
     $xml = parent::toXML();
     if ($this->contentTypeCodeDisplayName) {
         $xml->importDOMDocument($xml->documentElement, $this->contentTypeCodeDisplayName->toXML());
     }
     if ($this->codingScheme) {
         $xml->importDOMDocument($xml->documentElement, $this->codingScheme->toXML());
     }
     return $xml;
 }
 /**
  * @see parent::toXML()
  */
 function toXML()
 {
     $xml = parent::toXML();
     if ($this->newStatus) {
         $xml->importDOMDocument($xml->documentElement, $this->newStatus->toXML());
     }
     if ($this->originalStatus) {
         $xml->importDOMDocument($xml->documentElement, $this->originalStatus->toXML());
     }
     return $xml;
 }
 /**
  * Génération du xml
  *
  * @return CXDSXmlDocument
  */
 function toXML()
 {
     $xml = parent::toXML();
     if ($this->submissionSetStatus) {
         $xml->importDOMDocument($xml->documentElement, $this->submissionSetStatus->toXML());
     }
     if ($this->previousVersion) {
         $xml->importDOMDocument($xml->documentElement, $this->previousVersion->toXML());
     }
     return $xml;
 }
Exemplo n.º 4
0
 /**
  * @see parent::toXML()
  *
  * @return CXDSXmlDocument
  */
 function toXML()
 {
     $xml = parent::toXML();
     $base_xml = $xml->documentElement;
     if ($this->name) {
         $xml->importDOMDocument($base_xml, $this->name->toXML());
     }
     if ($this->codingScheme) {
         $xml->importDOMDocument($base_xml, $this->codingScheme->toXML());
     }
     return $xml;
 }
Exemplo n.º 5
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;
 }
 /**
  * @see parent::toXML()
  *
  * @return CXDSXmlDocument
  */
 function toXML()
 {
     $xml = parent::toXML();
     $base_xml = $xml->documentElement;
     if ($this->authorInstitution) {
         $xml->importDOMDocument($base_xml, $this->authorInstitution->toXML());
     }
     if ($this->authorPerson) {
         $xml->importDOMDocument($base_xml, $this->authorPerson->toXML());
     }
     foreach ($this->authorRole as $_authorRole) {
         $xml->importDOMDocument($base_xml, $_authorRole->toXML());
     }
     if ($this->authorSpecialty) {
         $xml->importDOMDocument($base_xml, $this->authorSpecialty->toXML());
     }
     return $xml;
 }
 /**
  * Create the XDS query
  *
  * @return string
  */
 function createQuery()
 {
     $xml = new CXDSXmlDocument();
     $message = $xml->createQueryElement($xml, "AdhocQueryRequest");
     $response_option = $xml->createQueryElement($message, "ResponseOption");
     $xml->addAttribute($response_option, "returnComposedObjects", $this->returnComposedObjects);
     $xml->addAttribute($response_option, "returnType", $this->returnType);
     $adhocQuery = $xml->createRimRoot("AdhocQuery", null, $message);
     $xml->addAttribute($adhocQuery, "id", $this->query);
     foreach ($this->values as $_name => $_values) {
         //And statement
         if (is_array($_values)) {
             foreach ($_values as $_value) {
                 $data = self::formatData($_value, $_name);
                 $slot = new CXDSSlot("{$_name}", array($data));
                 $xml->importDOMDocument($adhocQuery, $slot->toXML());
             }
         } else {
             $parts = explode("|", $_values);
             $value = "";
             foreach ($parts as $_part) {
                 $data = self::formatData($_part, $_name, true);
                 $value .= "{$data},";
             }
             $value = rtrim($value, ",");
             $slot = new CXDSSlot("{$_name}", array("({$value})"));
             $xml->importDOMDocument($adhocQuery, $slot->toXML());
         }
     }
     return $xml->saveXML();
 }