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:
- 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 theline and replace the existing author with your own name
c) save the file - 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 - Shut down tomcat.
- Run the textIndexer in incremental mode to pick up the new changes.
- Start up tomcat.
- 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.
- 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