equal
deleted
inserted
replaced
168 } |
168 } |
169 $section = [ |
169 $section = [ |
170 'id' => $this->document->getId()."_sctn".sprintf("%03d", $sectionIndex+1), |
170 'id' => $this->document->getId()."_sctn".sprintf("%03d", $sectionIndex+1), |
171 'items' => $sectionItems, |
171 'items' => $sectionItems, |
172 'meta' => [ |
172 'meta' => [ |
173 'corpus:topic'=> ["id-ref" => $this->topicIds[$sectionNode->getAttribute('topic')]], |
|
174 'corpus:begin' => floatval($sectionNode->getAttribute('startTime'))*1000, |
173 'corpus:begin' => floatval($sectionNode->getAttribute('startTime'))*1000, |
175 'corpus:end' => floatval($sectionNode->getAttribute('endTime'))*1000, |
174 'corpus:end' => floatval($sectionNode->getAttribute('endTime'))*1000, |
176 ] |
175 ] |
177 ]; |
176 ]; |
178 |
177 $topicRef = $sectionNode->getAttribute('topic'); |
|
178 if(!empty($topicRef) && array_key_exists($topicRef, $this->topicIds)) { |
|
179 $section['meta']['corpus:topic'] = ["id-ref" => $this->topicIds[$topicRef]]; |
|
180 } |
179 array_push($this->lists, $section); |
181 array_push($this->lists, $section); |
180 } |
182 } |
181 } |
183 } |
182 |
184 |
183 public function parseSource() { |
185 public function parseSource() { |