Building ======== Everything come pre-built. However, there is an ant and a maven build file which you can use to rebuild the source code if needed. To rebuild the lead-metadata-util jar with ant: ant jar with maven: maven jar The latest code is in the rainier.extreme.indiana.edu:/l/extreme/cvs repository in the codes/lead_metadata/util module. Using the API ============= Dependencies - This api requires xmlbeans 2, jsr173, and the lead metadata xmlbeans jar. Specifically, the requirements are: - jsr173_1.0_api.jar - lead-metadata-1.6.jar - xbean-2.2.0.jar To use the API, you need to create a MinimalLEADMetadata object. The constructor takes a user ID, a name, and a description. Then you call the construct() method on that object to build the LEADResource document. Finally, you can get access to the XML by casting the object to a String, since it implements toString(). MinimalLEADMetadata test = new MinimalLEADMetadata(userId, name, desc); test.construct(); System.out.println(test); You can also get direct access to the XMLBeans object created by the construct method by calling the object's getLeadResourceDoc(). Hence, you can use MinimalLEADMetadata as a starting point, and then build out a more complex metadata document. Javadoc is hosted at http://www.cs.indiana.edu/~machrist/lead-metadata-util Using the command line client ============================= The provided commandline client is meant only to demonstrate how you might invoke the MinimalLEADMetadata utility from a script, or similar environment. Simply run "run.sh" with three arguments: a user id, a name and a description (you'll need to first run "ant" which will download the required dependencies). Here's a sample run: $ ./run.sh "Marcus Christie" exp1 "a new experiment" Unknown Marcus Christie 20070202 063957207-0500 exp1 a new experiment a new experiment In work Unknown Managed by MyLEAD Unknown leadproject.org LEAD edu.indiana.extreme.lead.metadata.util.MinimalLEADMetadata.version.1_6 20070202 LEAD Profile of FGDC Content Standard for Digital Geospatial Metadata FGDC-STD-001.LEAD_1_6-2007 The generated document is written to stdout.