Skip to content

[DO NOT SQUASH] [FINNA-3708] Refactor LIDO record handling to use VuFindXml (Finna). - #114

Open
EreMaijala wants to merge 4 commits into
NatLibFi:devfrom
EreMaijala:dev-lido-xml
Open

[DO NOT SQUASH] [FINNA-3708] Refactor LIDO record handling to use VuFindXml (Finna).#114
EreMaijala wants to merge 4 commits into
NatLibFi:devfrom
EreMaijala:dev-lido-xml

Conversation

@EreMaijala

Copy link
Copy Markdown
Contributor

No description provided.

@EreMaijala
EreMaijala requested a review from mshroom August 27, 2026 09:11

@mshroom mshroom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tässä sama kuin ylempänä

$result[] = $placeID;
}
foreach ($this->xmlDoc->all($eventNode, 'eventPlace') as $eventPlace) {
if (!$excludePlacesWithCoordinates || !$this->xmlDoc->firstValue($eventPlace, 'place/gml')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eikä tässä

if (!$label && !empty($current->placeClassification)) {
$label = trim((string)$current->placeClassification);
if (!$label) {
$label = $this->xmlDoc->firstValue($current, 'placeClassification');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Höm mitähän tässä on alunperinkään ajateltu kun arvon pitäisi olla placeClassification/term -elementissä

@mshroom mshroom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

muutospyynnnöt kommenteissa ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants