[greenstone-users] Help for duplicate name in Hierarchy browsing classifier hfile

From dagrigna@libero.it
DateSat, 30 Dec 2006 18:25:07 +0100
Subject [greenstone-users] Help for duplicate name in Hierarchy browsing classifier hfile
Hi to all
I'm writing an application that exports elements from DSpace to Greenstone (for my work StoneD is less flexible), and it makes some "hfile", one per Hierarchy browsing classifier, that piece together the DSpace "community", "sub-community" and "collections" structure for Greenstone (who know DSpace knows that "communities" are containers for other "communities" and collections too). When I try to make a Greenstone's collection all works fine, but when I try to make it with an hfile that contains two nodes elements with the same name, in the tree generated by hierarchy browsing classifier the second object appears like a leaf and it doesn't work.

For example, in my hfile (named subjects.txt) there is something like this:
"Emigration"1"Emigration"
"Belli-Taddei Collection"1.1"Belli-Taddei Collection"
"Belli, Vittore"1.1.1"Belli, Vittore"
"10 August 1905"1.1.1.1"10 August 1905"
"10 December 1916"1.1.1.2"10 December 1916"
"10 December 1917"1.1.1.3"10 December 1917"
"First World War"2"First World War"
"Belli-Taddei Collection"2.1"Belli-Taddei Collection"
"Belli, Vittore"2.1.1"Belli, Vittore"
"10 August 1905"2.1.1.1"10 August 1905"
"10 December 1916"2.1.1.2"10 December 1916"
"10 December 1917"2.1.1.3"10 December 1917"

and in my collect.cfg there is something like this:
classifyHierarchy -metadata dc.Title -sort dc.Subject -buttonname subjects -hfile subjects.txt

and metadata ("10 August 1905" for example):
[...]
<Metadata mode="accumulate" name="dc.Title">10 August 1905</Metadata><Metadata mode="accumulate" name="dc.Creator">Belli, Vittore</Metadata>
<Metadata mode="accumulate" name="dc.Relation">Belli-Taddei Collection</Metadata>
<Metadata mode="accumulate" name="dc.Subject">Emigration</Metadata>
<Metadata mode="accumulate" name="dc.Subject">First World War</Metadata>
[...]

Now, as I have said before, if the hfile contains section 1 (from 1 to 1.1.1.3) only, all works fine, but when I try to put section 2 (from 2 to 2.1.1.3), the second node, that is "First World War", appears like a leaf and it doesn't work. Why?

Thanks for the help

Daniele Grignani


------------------------------------------------------
Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom
http://click.libero.it/infostrada30dic06