Example #1
0
 /**
  * Writes the contents of this Coverage to an XML writer. The startElement is expected to be already provided.
  *
  * @param \XMLWriter $writer The XML writer.
  */
 public function writeXmlContents(\XMLWriter $writer)
 {
     parent::writeXmlContents($writer);
     if ($this->recordType) {
         $writer->startElementNs('gx', 'recordType', null);
         $writer->text($this->recordType);
         $writer->endElement();
     }
     if ($this->spatial) {
         $writer->startElementNs('gx', 'spatial', null);
         $this->spatial->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->temporal) {
         $writer->startElementNs('gx', 'temporal', null);
         $this->temporal->writeXmlContents($writer);
         $writer->endElement();
     }
 }
Example #2
0
 /**
  * Writes the contents of this Fact to an XML writer. The startElement is expected to be already provided.
  *
  * @param \XMLWriter $writer The XML writer.
  */
 public function writeXmlContents(\XMLWriter $writer)
 {
     if ($this->primary) {
         $writer->writeAttribute('primary', $this->primary);
     }
     if ($this->type) {
         $writer->writeAttribute('type', $this->type);
     }
     parent::writeXmlContents($writer);
     if ($this->date) {
         $writer->startElementNs('gx', 'date', null);
         $this->date->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->place) {
         $writer->startElementNs('gx', 'place', null);
         $this->place->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->value) {
         $writer->startElementNs('gx', 'value', null);
         $writer->text($this->value);
         $writer->endElement();
     }
     if ($this->qualifiers) {
         foreach ($this->qualifiers as $i => $x) {
             $writer->startElementNs('gx', 'qualifier', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->fields) {
         foreach ($this->fields as $i => $x) {
             $writer->startElementNs('gx', 'field', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
 }
Example #3
0
 /**
  * Writes the contents of this Event to an XML writer. The startElement is expected to be already provided.
  *
  * @param \XMLWriter $writer The XML writer.
  */
 public function writeXmlContents(\XMLWriter $writer)
 {
     if ($this->type) {
         $writer->writeAttribute('type', $this->type);
     }
     parent::writeXmlContents($writer);
     if ($this->date) {
         $writer->startElementNs('gx', 'date', null);
         $this->date->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->place) {
         $writer->startElementNs('gx', 'place', null);
         $this->place->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->roles) {
         foreach ($this->roles as $i => $x) {
             $writer->startElementNs('gx', 'role', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
 }