Exercise 2: Change metadata

Change a piece of metadata

Introduction:

In the sample data set, metadata is stored in two different ways to demonstrate the range of options supported in XTF. For instance, metadata can be stored in a separate file as in the Dublin Core metadata for our sample EAD files (e.g., %XTF_HOME%\data\ead\bell\bell.dc.xml accompanies the data file bell.xml). Metadata can also be stored directly in the main data file (e.g., %XTF_HOME%\data\nlm\bmc\bmc.xml contains both the document and its metadata).

In this exercise, you will change a piece of metadata stored in each of the two ways described above. Then you will re-index the collection and verify that the changed metadata is available for search and display.

Demonstration:

Steps:

  1. Modify the Dublin Core metadata for the “bell” EAD file:
    %XTF_HOME%\data\ead\bell\bell.dc.xml
    Using your XML editor:
    a) open the file
    b) find the line and replace the existing author with your own name
    c) save the file
  2. Modify the metadata for the “bmc” NLM file, which has the metadata stored in the main file:
    %XTF_HOME%\data\nlm\bmc\bmc.xml
    Using your XML editor:
    a) open the file
    b) under , replace the existing elements with your name and other required information
    c) save the file
  3. Shut down tomcat.
  4. Run the textIndexer in incremental mode to pick up the new changes.
  5. Start up tomcat.
  6. Note how “bmc” got indexed, but “bell” did not. Why not? Because the indexer only recognizes changes to the main XML file as signaling the need to re-index. To fix, make a trivial change (like inserting a space) to bell.xml, or from the Mac command-line you can “touch” the bell.xml file. Then re-index. The indexer will notice the change now and pick up your new metadata.
  7. Go to the XTF search page (http://localhost:8080/xtf/search) and search for your name. The modified items should show up in the search results.

Next tutorial step: Exercise 3: Change the logo and colors