Esempio n. 1
0
 /**
  * Writes the contents of this Collection 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->lang) {
         $writer->writeAttribute('xml:lang', $this->lang);
     }
     parent::writeXmlContents($writer);
     if ($this->title) {
         $writer->startElementNs('gx', 'title', null);
         $writer->text($this->title);
         $writer->endElement();
     }
     if ($this->size) {
         $writer->startElementNs('gx', 'size', null);
         $writer->text($this->size);
         $writer->endElement();
     }
     if ($this->content) {
         foreach ($this->content as $i => $x) {
             $writer->startElementNs('gx', 'content', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->attribution) {
         $writer->startElementNs('gx', 'attribution', null);
         $this->attribution->writeXmlContents($writer);
         $writer->endElement();
     }
 }
Esempio n. 2
0
 /**
  * Writes the contents of this Conclusion 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->confidence) {
         $writer->writeAttribute('confidence', $this->confidence);
     }
     if ($this->lang) {
         $writer->writeAttribute('xml:lang', $this->lang);
     }
     parent::writeXmlContents($writer);
     if ($this->attribution) {
         $writer->startElementNs('gx', 'attribution', null);
         $this->attribution->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->sources) {
         foreach ($this->sources as $i => $x) {
             $writer->startElementNs('gx', 'source', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->analysis) {
         $writer->startElementNs('gx', 'analysis', null);
         $this->analysis->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->notes) {
         foreach ($this->notes as $i => $x) {
             $writer->startElementNs('gx', 'note', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
 }
Esempio n. 3
0
 /**
  * Writes the contents of this EvidenceReference 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->resourceId) {
         $writer->writeAttribute('resourceId', $this->resourceId);
     }
     if ($this->resource) {
         $writer->writeAttribute('resource', $this->resource);
     }
     parent::writeXmlContents($writer);
     if ($this->attribution) {
         $writer->startElementNs('gx', 'attribution', null);
         $this->attribution->writeXmlContents($writer);
         $writer->endElement();
     }
 }
Esempio n. 4
0
 /**
  * Writes the contents of this SourceReference 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->descriptionRef) {
         $writer->writeAttribute('description', $this->descriptionRef);
     }
     parent::writeXmlContents($writer);
     if ($this->attribution) {
         $writer->startElementNs('gx', 'attribution', null);
         $this->attribution->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->qualifiers) {
         foreach ($this->qualifiers as $i => $x) {
             $writer->startElementNs('gx', 'qualifier', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
 }
Esempio n. 5
0
 /**
  * Writes the contents of this Note 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->lang) {
         $writer->writeAttribute('xml:lang', $this->lang);
     }
     parent::writeXmlContents($writer);
     if ($this->subject) {
         $writer->startElementNs('gx', 'subject', null);
         $writer->text($this->subject);
         $writer->endElement();
     }
     if ($this->text) {
         $writer->startElementNs('gx', 'text', null);
         $writer->text($this->text);
         $writer->endElement();
     }
     if ($this->attribution) {
         $writer->startElementNs('gx', 'attribution', null);
         $this->attribution->writeXmlContents($writer);
         $writer->endElement();
     }
 }
Esempio n. 6
0
 /**
  * Writes the contents of this SourceDescription 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->about) {
         $writer->writeAttribute('about', $this->about);
     }
     if ($this->mediaType) {
         $writer->writeAttribute('mediaType', $this->mediaType);
     }
     if ($this->resourceType) {
         $writer->writeAttribute('resourceType', $this->resourceType);
     }
     parent::writeXmlContents($writer);
     if ($this->citations) {
         foreach ($this->citations as $i => $x) {
             $writer->startElementNs('gx', 'citation', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->mediator) {
         $writer->startElementNs('gx', 'mediator', null);
         $this->mediator->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->sources) {
         foreach ($this->sources as $i => $x) {
             $writer->startElementNs('gx', 'source', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->analysis) {
         $writer->startElementNs('gx', 'analysis', null);
         $this->analysis->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->componentOf) {
         $writer->startElementNs('gx', 'componentOf', null);
         $this->componentOf->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->titles) {
         foreach ($this->titles as $i => $x) {
             $writer->startElementNs('gx', 'title', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->titleLabel) {
         $writer->startElementNs('gx', 'titleLabel', null);
         $this->titleLabel->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->notes) {
         foreach ($this->notes as $i => $x) {
             $writer->startElementNs('gx', 'note', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->attribution) {
         $writer->startElementNs('gx', 'attribution', null);
         $this->attribution->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->sortKey) {
         $writer->startElementNs('gx', 'sortKey', null);
         $writer->text($this->sortKey);
         $writer->endElement();
     }
     if ($this->descriptions) {
         foreach ($this->descriptions as $i => $x) {
             $writer->startElementNs('gx', 'description', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->identifiers) {
         foreach ($this->identifiers as $i => $x) {
             $writer->startElementNs('gx', 'identifier', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->created) {
         $writer->startElementNs('gx', 'created', null);
         $writer->text($this->created);
         $writer->endElement();
     }
     if ($this->modified) {
         $writer->startElementNs('gx', 'modified', null);
         $writer->text($this->modified);
         $writer->endElement();
     }
     if ($this->coverage) {
         foreach ($this->coverage as $i => $x) {
             $writer->startElementNs('gx', 'coverage', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->rights) {
         foreach ($this->rights as $i => $x) {
             $writer->startElementNs('gx', 'rights', null);
             $writer->text($x);
             $writer->endElement();
         }
     }
     if ($this->fields) {
         foreach ($this->fields as $i => $x) {
             $writer->startElementNs('gx', 'field', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->repository) {
         $writer->startElementNs('gx', 'repository', null);
         $this->repository->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->descriptorRef) {
         $writer->startElementNs('gx', 'descriptor', null);
         $this->descriptorRef->writeXmlContents($writer);
         $writer->endElement();
     }
 }
Esempio n. 7
0
 /**
  * Writes the contents of this Gedcomx 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->lang) {
         $writer->writeAttribute('xml:lang', $this->lang);
     }
     if ($this->descriptionRef) {
         $writer->writeAttribute('description', $this->descriptionRef);
     }
     if ($this->profile) {
         $writer->writeAttribute('profile', $this->profile);
     }
     parent::writeXmlContents($writer);
     if ($this->attribution) {
         $writer->startElementNs('gx', 'attribution', null);
         $this->attribution->writeXmlContents($writer);
         $writer->endElement();
     }
     if ($this->persons) {
         foreach ($this->persons as $i => $x) {
             $writer->startElementNs('gx', 'person', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->relationships) {
         foreach ($this->relationships as $i => $x) {
             $writer->startElementNs('gx', 'relationship', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->sourceDescriptions) {
         foreach ($this->sourceDescriptions as $i => $x) {
             $writer->startElementNs('gx', 'sourceDescription', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->agents) {
         foreach ($this->agents as $i => $x) {
             $writer->startElementNs('gx', 'agent', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->events) {
         foreach ($this->events as $i => $x) {
             $writer->startElementNs('gx', 'event', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->places) {
         foreach ($this->places as $i => $x) {
             $writer->startElementNs('gx', 'place', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->documents) {
         foreach ($this->documents as $i => $x) {
             $writer->startElementNs('gx', 'document', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
     if ($this->collections) {
         foreach ($this->collections as $i => $x) {
             $writer->startElementNs('gx', 'collection', 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();
         }
     }
     if ($this->recordDescriptors) {
         foreach ($this->recordDescriptors as $i => $x) {
             $writer->startElementNs('gx', 'recordDescriptor', null);
             $x->writeXmlContents($writer);
             $writer->endElement();
         }
     }
 }