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

From John Thompson
DateTue, 02 Jan 2007 09:09:54 +1300
Subject Re: [greenstone-users] Help for duplicate name in Hierarchy browsing classifier hfile
In-Reply-To (JB3KDV$A5EF8BE2F8D0DCB3CF2E5725A7BCDCD8-libero-it)
Hi Daniele,

I expect that you are facing two issues concerning the way you have set
up the metadata. The first occurs because the first column in an hfile
specifies the metadata to match when assigning documents to the
classification. Because of this every value in the first column needs
to be unique, otherwise the classifier generated will be different than
expected. Consider changing the hfile to be something like:

"Emigration" 1"Emigration"
"Emigration|Belli-Taddei Collection"1.1"Belli-Taddei Collection"
"Emigration|Belli, Vittore" 1.1.1"Belli, Vittore"
"Emigration|10 August 1905" 1.1.1.1"10 August 1905"
"Emigration|10 December 1916" 1.1.1.2"10 December 1916"
"Emigration|10 December 1917" 1.1.1.3"10 December 1917"
"First World War" 2"First World War"
"First World War|Belli-Taddei Collection"2.1"Belli-Taddei Collection"
"First World War|Belli, Vittore" 2.1.1"Belli, Vittore"
"First World War|10 August 1905"2.1.1.1"10 August 1905"
"First World War|10 December 1916"2.1.1.2"10 December 1916"
"First World War|10 December 1917"2.1.1.3"10 December 1917"

and then change associated metadata.xmls accordingly

[...]
<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">Emigration|First World War</Metadata>
<Metadata mode="accumulate" name="dc.Subject">Emigration|10 August 1905</Metadata>
[...]


The second issue you may encounter is that old versions of Greenstone
cannot mix folders and documents in a single parent document. Because of
this, of the metadata shown above, I believe only the value
"Emigration|10 August 1905" is necessary, as both "Emigration", and
"Emigration|First World War" would require the document to be inserted
alongside folders (and so will probably be ignored). These may have
been addressed in newer versions of Greenstone.

Cheers
John Thompson

--
DL Consulting
Greenstone Digital Library and Digitisation Specialists
contact@dlconsulting.co.nz
www.dlconsulting.co.nz

dagrigna@libero.it wrote:
> 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
>
>
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>