User Tools

Site Tools


en:user_advanced:web_editor

This is an old revision of the document!


Using Greenstone 3's Web Editor

The following instructions are by Georgy Litvinov.

Requirements: a Greenstone3 installation, a collection to test it on.

1. Run the Greenstone 3 server (gs3-server) and visit your digital library home page in the browser. If you have installed Greenstone 3 on your PC, the URL to visit would be http://localhost:8383/greenstone3/library or http://127.0.0.1:8383/greenstone3/library

2. You need to be logged in to edit your collection. To do so when using the default Greenstone 3 library interface, you'd click the Login button at the top right of the home page. (For the half-tone interface, click on the down arrow at the bottom of the home page to View More options, and then follow the Login link). Use the username and password you created during installation. The default is admin for both. If you haven't change the defaults, you can do so by running ant config-admin from the command line.

3. You need to enable the document edit mode. To do so, click on the button with your account name at the top right of the page (where the Login button was). From the drop-down list, choose Enable edit mode.

4. Open the document you wish to edit. You can do this by using Search or to locate your document, or you can simply open the document after Browsing to it with a collection classifier.

5. With a document open, click on the Edit content button to the right.

6. You'll now be you able to edit the internal content of your document much like in your favourite text editor. Click on anywhere in the text body of the document to see a cursor to start editing the content.

7. You can modify metadata by pressing edit metadata button above the document body.

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. 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.

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:

<classifier name="Hierarchy">
      <option name="-metadata" value="dc.Subject"/>
      <option name="-sort" value="dc.Title"/>
</classifier>

2. You can either edit this file manually or use GLI to set the hfile option on the Hierarchy classifier to a file:

<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>

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:

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"

The "subject_hierarchy.txt" hfile in our example contains the following existing metadata (from dc.Subject and Keywords assigned to documents) thus organising the Subjects into an outline or hierarchy:

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" 

4. Rebuild the collection and preview the hierarchy classifier "Topic Hierarchy". You'll see that the hierarchy now exists in the form of book nodes that you can expand, but it's just an empty outline at this stage as there are no documents under them.

This is where the web editor comes in, making it easier to assign each document to somewhere in the existing hierarchy that 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's heading. The metadata associated with the document will be displayed in a table. 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.

6. Click in the value cell of the new dc.Subject metadata field that now appears at the bottom of the document's metadata table. Clicking in it should make a flyout appear to the right displaying the hierarchical topics and allowing you choose the one 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 field that you added, at which point the flyout would try to show you the subject for this and its subtopics. If you left the value at "3", the document will once again appear under "Communication, Information and Documentation" (as this is associated with heading 3 in our hfile) when you now press the Save and Rebuild button to incorporate your changes.

7. After modifying the metadata for the document, press Save and Rebuild. Then preview to see your changes take effect, by visiting the "Topic hierarchy" classifier. Check under the appropriate book nodes and you'll see that your documents have been added under them.

en/user_advanced/web_editor.1466664723.txt.gz · Last modified: 2016/06/23 06:52 by anupama