User Tools

Site Tools


en:user_advanced:web_editor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:user_advanced:web_editor [2016/06/22 04:39] anupamaen:user_advanced:web_editor [2016/06/23 06:30] anupama
Line 20: Line 20:
  8. If you want to add new metadata, fill in the field underneath the metadata table with a new metadata name and click on the button ''Add new metadata''. Your new metadata entry will appear at the end of the metadata table. Then enter a value for your new metadata entry.  8. If you want to add new metadata, fill in the field underneath the metadata table with a new metadata name and click on the button ''Add new metadata''. Your new metadata entry will appear at the end of the metadata table. Then enter a value for your new metadata entry.
  
- 9. As you may know, you can use hierarchy classifiers in your collections. To add a document to the hierarchy classifier, you need to add a metadata entry just as you did in step 8 above, but with metadata name used by the hierarchy classifier. To choose the hierarchy position you then want to assign to your document, click on the value cell. To the right of the metadata table, you will see a flyout menu from which you can select the hierarchy position. You can also manually enter the hierarchy position as metadata value. In that case, you will see suggestions indication a position you can choose from.+ 9. If your collection uses a **hierarchy classifier**, you can use the web editor to assign each document to a position in the hierarchy you've already defined in the hierarchy classifier's hfile. 
 + 
 +To add a document to the hierarchy classifier, you need to add a metadata entry just as you did in step 8 above, but with the metadata name set to the ''metadata'' option configured for the hierarchy classifier. For instance, if you built your hierarchy classifier with the metadata option set to dc.Creator, then you'd use the web editor to Add New Metadata with name ''dc.Creator'' for the document. 
 + 
 +To choose the hierarchy position that you want to assign to your document, click on the value cell for the new metadata field added. To the right of the metadata table, you will then see a flyout menu appear from which you can select the hierarchy position. You can also manually enter the hierarchy position as the metadata value (e.g. ''2.3''). In that case, you will see all the matching suggestions for that hierarchical position from which you can choose. A more detailed example follows below.
  
 10. To save your changes, just click on the ''Save and Rebuild'' button and wait for the build to complete. 10. To save your changes, just click on the ''Save and Rebuild'' button and wait for the build to complete.
 +
 +
 +==== Using the web editor to insert a document into a hierarchy created by a hierarchical classifier ====
 +
 +1. Let's take the lucene-jdbm-demo collection as an example. Its ''etc/collectionConfig.xml'' file contains the following:
 +
 +<code>
 +<classifier name="Hierarchy">
 +      <option name="-metadata" value="dc.Subject"/>
 +      <option name="-sort" value="dc.Title"/>
 +</classifier>
 +</code>
 +
 +2. You can either edit this file manually or use GLI to set the hfile option on the Hierarchy classifier to a file:
 +
 +<code>
 +<classifier name="Hierarchy">
 + <option name="-metadata" value="dc.Subject"/>
 + <option name="-sort" value="dc.Title"/>
 + <option name="-hfile" value="subject_hierarchy.txt"/>
 + <option name="-documents_last"/>
 + <option name="-buttonname" value="Topic Hierarchy"/>
 +</classifier>
 +</code>
 +
 +3. Add the hierarchy file, hfile, by creating it with whatever name you assigned above (subject_hierarchy.txt), with content of the following format. Then place this file in the collection's etc folder:
 +<code>
 +1 1 "First level. First element"
 +1.1 1.1 "Second level. First element"
 +2 2 "First level. Second element"
 +2.1 2.1 "Second level. First element"
 +2.2 2.2 "Second level. Second element"
 +2.3 2.3 "Second level. Third element"
 +</code>
 +
 +The subject_hierarchy.txt hfile in our example contains the following existing metadata (from dc.Subject and Keywords) thus organising the Subjects classifier into an outline:
 +
 +<code>
 +1 1 "Agriculture and Food Processing"
 +1.1 1.1 "Better Farming series of FAO and INADES - 46 booklets"
 +2 2 "Animal Husbandry and Animal Product Processing"
 +2.1 2.1 "Cattle"
 +2.2 2.2 "Other animals (micro-livestock, little known animals, silkworms, reptiles, frogs, snails, game, etc.)"
 +3 3 "Communication, Information and Documentation" 
 +</code>
 +
 +4. Rebuild the collection and preview the hierarchy classifier. The hierarchy exists in the form of book nodes you can expand, but there are no documents in them. This is where the web editor comes in, making it easier to assign each document to somewhere in the existing hierarchy you created in the hfile.
 +
 +5. Log in to your Greenstone 3 digital library and preview a document in your collection. Press the ''Edit content'' button to the right of the open document. Then press the ''edit metadata'' button that appears near the //document heading//. At the bottom of the document's metadata table, type the metadata name on which the hierarchy is built (''dc.Subject'' in our example) and press the ''Add new metadata'' button.
 +
 +Click in the value cell of the new ''dc.Subject'' metadata field that now appears at the bottom of the document's metadata table. A flyout should appear to the right allowing you to choose what hierarchical topic you want this document to appear under. For instance, heading 3 in our hfile is "Communication, Information and Documentation", so if you select this from the flyout, then the document will appear under that topic.
 +
 +Alternatively you could have typed "3" as the value for the dc.Subject metadata that you added and it will likewise appear under "Communication, Information and Documentation" when you now press the Save and Rebuild button to incorporate your changes.
en/user_advanced/web_editor.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1