lobid / lodmill

This repo is replaced by i.a. https://github.com/hbz/lobid-resources/
19 stars 8 forks source link

Two "title" for one resource #761

Closed acka47 closed 8 years ago

acka47 commented 8 years ago

Example http://lobid.org/resource/BT000003404 (snippet):

{
    "@id" : "http://lobid.org/resource/BT000003404",
    "title" : [ "Deutschland 1:300000", "Deutschland, 2: Nordrhein-Westfalen, Niedersachsen-Süd" ]
}

From the source:

<datafield tag="310" ind1="-" ind2="2">
  <subfield code="a">Deutschland &lt;1:300000></subfield>
</datafield>
<datafield tag="331" ind1="-" ind2="1">
  <subfield code="a">Nordrhein-Westfalen, Niedersachsen-Süd</subfield>
</datafield>
<datafield tag="331" ind1="-" ind2="2">
  <subfield code="a">Deutschland</subfield>
</datafield>

Obviously, both the title of the resource and the superordinated resource are taken as a title. I think, these should rather be concatinated

acka47 commented 8 years ago

One title is generated as usually by taking the 331 from the superordinated resource with concatenated volume information from 090 and adding the 331 from the volume, see current morph, lines 502ff. Obviously, we don't have a rule for when there also is a 310 from the superordinated resource. I think, in this case we should just ignore the 310. Desired outcome for the example:

{
    "@id" : "http://lobid.org/resource/BT000003404",
    "title" :  "Deutschland, 2: Nordrhein-Westfalen, Niedersachsen-Süd" 
}
dr0i commented 8 years ago

Fix deployed to staging.

acka47 commented 8 years ago

From the comment above (removed the array for the title filed):

Desired outcome for the example:

{
    "@id" : "http://lobid.org/resource/BT000003404",
    "title" :  "Deutschland, 2: Nordrhein-Westfalen, Niedersachsen-Süd" 
}

Currently on staging (snippet):

{
  "@id" : "http://lobid.org/resource/BT000003404",
  "title" : "Deutschland 1:300000"

Obviously, not the 331s plus 090 were taken for the title (as requested) but the other way round, the 310 from the superordinated resource was taken and the rest was ignored. Please adjust the morph accordingly so that the 310 from the superordinated resource is ignored.

dr0i commented 8 years ago

Ok, as this was just a sideeffect of dealing with #762 I will fix this when the latter is closed.

dr0i commented 8 years ago

Deployed to staging.

acka47 commented 8 years ago

+1

dr0i commented 8 years ago

Deployed to production, closing.