public function visitRelation(KVDthes_Relation $relation)
 {
     $relNode = $this->dom->createElement('relation');
     $relNode->appendChild($this->createRelationType($relation->getType()));
     $relNode->appendChild($this->createTermId($relation->getTerm()->getId()));
     $relNode->appendChild($this->createTermName($relation->getTerm()->getTerm()));
     $this->term->appendChild($this->createTermType($node->getType()->getId()));
     $relNode->appendChild($this->createTermLanguage('nl-BE'));
     $this->term->appendChild($relNode);
     return true;
 }
 /**
  * visitRelation
  *
  * @param KVDthes_Relation $relation
  * @return boolean
  */
 public function visitRelation(KVDthes_Relation $relation)
 {
     $this->result[] = array('id_from' => $this->from, 'rel_type' => $relation->getType(), 'id_to' => $relation->getTerm()->getId());
     return true;
 }
 /**
  * compareRelations
  *
  * @param   string              $comparedMethod     Methode van het domainobject die dient om te vergelijken.
  * @param   KVDthes_Relation    $a
  * @param   KVDthes_Relation    $b
  * @return  integer                                 -1, 0 of 1 indien $a respectievelijk kleiner dan, gelijk aan of groter dan $b is.
  */
 public function compareRelations(KVDthes_Relation $a, KVDthes_Relation $b)
 {
     return $this->compareTerms($a->getTerm(), $b->getTerm());
 }
 /**
  * visitRelation
  *
  * @param KVDthes_Relation $rel
  * @return boolean
  */
 public function visitRelation(KVDthes_Relation $rel)
 {
     $this->result .= $this->currItem->getId() . ' -> ' . $rel->getTerm()->getId() . ";\n";
     return true;
 }
Example #5
0
 /**
  * equals
  *
  * @param KVDthes_Relation $relation
  * @return void
  */
 public function equals(KVDthes_Relation $relation)
 {
     return $relation->getTerm() === $this->getTerm() && $relation->getType() === $this->getType();
 }
 /**
  * visitRelation
  *
  * @param KVDthes_Relation $rel
  * @return boolean
  */
 public function visitRelation(KVDthes_Relation $rel)
 {
     $this->currItem->addChild($rel->getTerm()->getId());
     return true;
 }
Example #7
0
 public function testGetTerm()
 {
     $this->assertEquals($this->object->getTerm(), $this->term);
 }