[DO NOT SQUASH] [FINNA-3708] Refactor LIDO record handling to use VuFindXml (Finna). - #114
[DO NOT SQUASH] [FINNA-3708] Refactor LIDO record handling to use VuFindXml (Finna).#114EreMaijala wants to merge 4 commits into
Conversation
mshroom
left a comment
There was a problem hiding this comment.
Noiden kommenttien lisäksi testasin haravointia&indeksointia ja ainoa ongelma mitä löysin, on että koordinaattien indeksointi ei nyt toimi jos lido:gml-elementin sisällä olevilla elementeillä on gml-namespace kuten kuuluisi. Jos niillä on (väärä) lido-namespace niin sitten toimii (mutta tällaista vääränlaista dataa tulee, joten mielellään sekin saa toimia myös jatkossa)
| foreach ($subject->subjectPlace as $placeNode) { | ||
| if (!empty($placeNode->place->gml)) { | ||
| foreach ($this->xmlDoc->all($subject, 'subjectPlace') as $placeNode) { | ||
| if ($this->xmlDoc->firstValue($placeNode, 'place/gml')) { |
There was a problem hiding this comment.
gml-elementin sisällä ei suoraan ole arvoa, vaan arvo on esim. gml/Point/pos -elementissä ja tämä ei nyt nappaa niitä.
| foreach ($eventNode->eventPlace as $placeNode) { | ||
| if (!empty($placeNode->place->gml)) { | ||
| foreach ($this->xmlDoc->all($eventNode, 'eventPlace') as $placeNode) { | ||
| if ($this->xmlDoc->firstValue($placeNode, 'place/gml')) { |
| $result[] = $placeID; | ||
| } | ||
| foreach ($this->xmlDoc->all($eventNode, 'eventPlace') as $eventPlace) { | ||
| if (!$excludePlacesWithCoordinates || !$this->xmlDoc->firstValue($eventPlace, 'place/gml')) { |
There was a problem hiding this comment.
Tässä myös tuo firstValue ei löydä koordinaatteja syvempää gml-elementin alta
| $result[] = $placeID; | ||
| } | ||
| foreach ($this->xmlDoc->all($subject, 'subjectPlace') as $subjectPlace) { | ||
| if (!$excludePlacesWithCoordinates || !$this->xmlDoc->firstValue($subjectPlace, 'place/gml')) { |
| if (!$label && !empty($current->placeClassification)) { | ||
| $label = trim((string)$current->placeClassification); | ||
| if (!$label) { | ||
| $label = $this->xmlDoc->firstValue($current, 'placeClassification'); |
There was a problem hiding this comment.
Höm mitähän tässä on alunperinkään ajateltu kun arvon pitäisi olla placeClassification/term -elementissä
mshroom
left a comment
There was a problem hiding this comment.
muutospyynnnöt kommenteissa ^
No description provided.