Index: gs3-extensions/fedora/README
===================================================================
--- gs3-extensions/fedora/README	(revision 26412)
+++ 	(revision )
@@ -1,580 +1,0 @@
-********************************************************************************************************************
-							CONTENTS
-********************************************************************************************************************
-
-A. To install your GS3 Fedora extension from fedora3-gs3ext.tar.gz
-
-B. How to manually build fedora collections
-
-C. The customisations that have been made for the extension
-
-D. How to manually set up Fedora 3.6.1 with Fedora GSearch 2.5 from scratch
-	Installing Fedora
-	Installing Fedora GSearch
-	Debugging
-
-
-Version:
-Greenstone 3.05
-Fedora 3.6.1
-Fedora GSearch 2.5
-
-Web services pages once installed: 
-http://localhost:8383/fedora/services
-http://localhost:8383/fedoragsearch/services
-
--- ak19, 2012
-
-
-
-********************************************************************************************************************
-	A. To install your Fedora extension for Greenstone 3 from the fedora3-gs3ext.tar.gz distribution file
-********************************************************************************************************************
-
-(Tested to work on Linux machines.)
-
-0. You will need Greenstone 3.05 or a fresh checkout from SVN, already installed.
-
-1. Download the Fedora Extension for Greenstone 3: http://trac.greenstone.org/browser/gs3-extensions/fedora/fedora3-gs3ext.tar.gz
-
-2. Save into your Greenstone3/ext folder
-
-3. Untar and decompress it:
-	$ tar -xvzf fedora3-gs3ext.tar.gz
-
-4. This will create a fedora3 folder in your Greenstone3/ext folder. 
-
-5. Open Greenstone3/build.properties and find the section:
-
-	##These need to be uncommented if using Fedora and Fedora GSearch with Greenstone's tomcat
-	fedora.home=#${basedir}/ext/fedora3
-	#fedora.maxpermsize=-XX:MaxPermSize=128m
-	#fedora.password=pounamu
-
-Uncomment all these properties and change the value for the fedora password if necessary:
-
-	##These need to be uncommented if using Fedora and Fedora GSearch with Greenstone's tomcat
-	fedora.home=${basedir}/ext/fedora3
-	fedora.maxpermsize=-XX:MaxPermSize=128m
-	fedora.password=pounamu		
-
-
-6. Use a terminal to go into this folder:
-	$ cd Greenstone3/ext/fedora3
-
-7. If you type `ant` in the x-term, it will print the Usage message which will display the list of commands available and the order in which to execute them for proper installation. It's a 5 step process (explained in detail further below):
-
-	$ ant -Dgsdl3.home=<type-full-path-to-your-gs3> start-fedora-install
-
-	$ ant start
-
-	$ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> continue-fedora-install
-
-	$ ant stop
-
-	$ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> finish-fedora-install
-
-
-That's it. 
-Now you can start tomcat again and visit http://localhost:8383/fedora and http://localhost:8383/fedoragsearch/rest to check the pages display.
-
-8. You can start creating Greenstone Fedora collections with FLI. Run FLI from the GS3 toplevel folder by typing:
-	$ ./gli/fli.sh
-
-
-
-DETAILS ON STEP 7:
-a. From your Greenstone3/ext/fedora3 folder, run:
-	$ ant -Dgsdl3.home=<type-full-path-to-your-gs3> start-fedora-install
-
-This step prepares the fedora and gsearch war files for deployment (by customising template files) and moves them into Greenstone 3's tomcat.
-
-b. Start tomcat by going into your GS3 toplevel folder and running: 
-	$ ant start
-
-This step gets Greenstone's tomcat to deploy the fedora and fedoragsearch war files.
-You may want to check your Greenstone library is working by visiting http://localhost:8383/greenstone3 in your browser
-
-c. Go back into Greenstone3/ext/fedora3 and run:
-	$ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> continue-fedora-install
-
-This target configures fedora-gsearch now that it has been deployed. It runs a fedora-gsearch ant build file to customise properties files that are internal to fedora-gsearch.
-
-d. Stop tomcat by going back into your GS3 toplevel folder and running: 
-	$ ant stop
-
-You may want to check java instances running tomcat have indeed stopped:
-	$ ps aux | grep tomcat
-
-You will need to kill the process if any tomcat is still running at this stage (this can happen if you accidentally start tomcat several times in succession without stopping it).
-	$ kill -9 <process-id> 
-
-e. Now that tomcat has stopped, go back into Greenstone3/ext/fedora3 and run:
-	ant -Dgsdl3src.home=<Full-Path-To-GS3> finish-fedora-install
-
-This will clean up the extension's war files in tomcat/packages/webapps now that they have already been deployed. (Do not perform this final step when tomcat is still running, else your fedora extension webapps will become undeployed.)
-
-
-
-When installation is completed, there will be a fedora3 folder in Greenstone3/ext, which you should not delete, since the Fedora Digital objects will be stored here, and the FedoraGSearch index will be created here. 
-
-Further, the Fedora extension installation process would have made tomcat deploy several webapps in packages/tomcat/webapps. The resulting folders are:
-- fedora
-- fedora-demo
-- fedoragsearch
-- fop
-- imagemanip
-- saxon
-
-(Note that the installation process will have removed the Fedora extension war files it put into packages/tomcat/webapps during installation.)
-
-
-
-********************************************************************************************************************
-					B. Manual building of fedora collections
-********************************************************************************************************************
-
-You can use FLI to create, build and preview Fedora collections using Greenstone.
- 
-The same can be done manually by calling the g2f perl scripts from the command line.
-
-1. Fedora needs to be running, so ensure the Greenstone tomcat is running:
-	ant start
-
-2. Set up the GS3 environment:
-	source gs3-setup.bash
-
-3. Create a new collection with mkcol.pl. Call it "fedora1" for example 
-	mkcol.pl -collectdir /<GS3>/web/sites/localsite/collect fedora1
-
-4. Run import and build to ingest the new collection
-
-- First put the documents you want into the import directory of your new collection.
-
-- g2f-import.pl -hostname localhost -port 8383 -password pounamu -removeold -collectdir /<GS3>/web/sites/localsite/collect fedora1
-(password may be optional at this stage, by include it for convenience)
-
-- g2f-buildcol.pl -hostname localhost -port 8383 -password pounamu -removeold -collectdir /<GS3>/web/sites/localsite/collect fedora1
-
-
-5. If building the GS3 demo collection as a fedora collection: 
-- use FLI to transfer dls to dc metadata upon Gathering the documents.
-- then before building, turn on the description_tags in the HTMLPlugin.
-
-6. If you ran FLI, exit it. It should stop the Greenstone server.
-
-With fedora installed, it's always good to check that the java process that launched tomcat has indeed stopped:
-	ps aux | grep "tomcat"
-
-(Since things will fail if multiple instances of this same tomcat are running, kill any java processes that are referring to tomcat.)
-
-7. Create an index folder in the new fedora collection folder. Create a buildConfig.xml file in it containing the following:
-
-<buildConfig> 
-  <metadataList/>
-  <serviceRackList>                                                            
-    <serviceRack name="FedoraServiceProxy" />
-  </serviceRackList>
-</buildConfig>
-
-
-8. Restart the GS3 server.
-	ant start
-
-9. Visit the collection from the Greenstone collections page
-
-10. Deleting a Fedora GS3 collection requires the collection's documents and the collection file to be purged from the Fedora repository and removed from the Fedora Gsearch index. (In the case of a normal GS3 collection, just the GS3 collection's directory will be deleted.) There's now a script to delete a Greenstone Fedora collection which will take care of these additional steps if you are manually managing your collections. (FLI calls this script when a collection is deleted from FLI.)
-
-Deleting a Fedora GS3 collection is accomplished with the following 2 steps:
-- Run the g2f-deletecol.pl script over the collection to be deleted. Assuming the collection is called fedora1, you'd run:
-	g2f-deletecol.pl -hostname localhost -port 8383 -password pounamu -collectdir /<GS3>/web/sites/localsite/collect fedora1
-- manually delete the Greenstone collection directory from the filesystem
-
-
-To run this manually, 
-- first remove the pids from the GSearch index:
-/<GS3>/packages/tomcat/webapps/fedoragsearch/client>/<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex deletePID greenstone:fedora1-HASH010313b14474bc72b296b15f
-
-It will ask for the fedoragsearch username and password, which by default are fedoraAdmin and pounamu, respectively.
-
-- then purge the necessary documents (pids) from the fedora repository:
-/<GS3>/ext/fedora3/client/bin>./fedora-purge.sh localhost:8383 fedoraAdmin pounamu greenstone:fedora1-HASHe14e36cba08bd41c663237 http "purging"
-
-- You can check it's all been deleted by visiting http://localhost:8383/fedora/search 
-and searching for:
-
-greenstone:*
-or greenstone:<colname>*
-
-Visit http://localhost:8383/fedoragsearch/rest?operation=browseIndex
-and browse the PID field
-
-You can also visit http://localhost:8383/fedoragsearch/rest?operation=gfindObjects
-then you can search for a query term by prefixing the index field to it, e.g ds.fulltext:computers 
-
-
-********************************************************************************************************************
-			C. The customisations that have been made for the extension
-********************************************************************************************************************
-
-This section is of use when Fedora or GSearch is updated or if you want to update the fedora3-gs3ext.tar.gz distribution file with further customisations.
-
-The first version of the Fedora extension for Greenstone uses Fedora 3.6.1 and the GSearch 2.5 (which goes with Fedora 3.6.1).
-
-Some template files were added to Fedora and Fedora Gsearch's distribution files in order to customise these for installing them within a Greenstone 3 installation. These files are committed to SVN (without directory structure) at http://trac.greenstone.org/browser/gs3-extensions/fedora/fedora-files and http://trac.greenstone.org/browser/gs3-extensions/fedoragsearch-files
-
-They can be edited there if and when necessary, but they would then need to be included in the extension's distribution file fedora3-gs3ext.tar.gz to update its own existing copies.
-
-That's because these template files are included in the Fedora Extension for GS3 (fedora3-gs3ext.tar.gz). The extension's build.xml modifies these template files when installing the Fedora Extension into Greenstone 3. The template files contain placeholder strings that get updated when ant targets are run over the build.xml file.
-
-
-1. The customisation files for Fedora 3.6.1 are:
-
-- ./install/install.properties.in
-- ./server/config/spring/akubra-llstore.xml.in
-- ./server/config/fedora.fcfg.in
-- ./server/config/fedora-users.xml.in
-
-All these files get converted to filenames without the ".in" suffix upon installation, and placeholder strings in these template files get replaced. The replacements are on the strings 
-- @GSDL3SRCHOME@
-- @FEDORA_HOME@ (set to gsdl3srchome/ext/fedora3)
-- @tomcatserver@
-- @tomcatport@
-- @tomcatshutdownport@
-- @fedorapassw@
-- @indexwritelocktimeout@
-
-Except for the first, which needs to be set when running the Fedora extension's ant targets, all the remaining ones can be specified in Greenstone 3's toplevel build.properties.
-
-
-2. The customisation files for Fedora GSearch 2.6 are located in the "adjust_war_files" subfolder of fedora3-gs3ext.tar.gz file. This custom folder contains the official unpacked fedoragsearch folder, but with the following customisation files:
-
-- adjust_war_files/fedoragsearch/WEB-INF/web.xml
-- adjust_war_files/fedoragsearch/FgsConfig/fgsconfig-basic.properties.in 
-- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLucene.xslt 
-- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLuceneGenerated.xslt
-- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties
-- adjust_war_files/fedoragsearch/client/runRESTClient.sh
-- adjust_war_files/fedoragsearch/client/runSOAPClient.sh
-- adjust_war_files/fedoragsearch/client/runSOAPClient.bat
-
-
-All these files will get copied into the same locations within <GS3>/packages/tomcat/webapps/fedoragsearch. The file fgsconfig-basic.properties.in will get copied as fgsconfig-basic.properties but with the previously-listed placeholder strings replaced.
-
-
-3. There's also the fedora.xml.in inside the "adjust_war_files" folder of the unpacked extension. This template file will be copied over as <GS3>/packages/tomcat/conf/Catalina/localhost/fedora.xml during the extension installation process, also with placeholder strings replaced.
-
-
-DETAILS TO STEP 2 (Fedora GSearch customisation files):
-
-a. The changes to web.xml are that the authorisation filters are commented out:
-
-<!--
-    <filter-mapping>
-      <filter-name>EnforceAuthnFilter</filter-name>
-      <servlet-name>AxisServlet</servlet-name>
-    </filter-mapping>
-    <filter-mapping>
-      <filter-name>EnforceAuthnFilter</filter-name>
-      <servlet-name>GenericSearchREST</servlet-name>
-    </filter-mapping>
-    <filter-mapping>
-      <filter-name>EnforceAuthnFilter</filter-name>
-      <url-pattern>/index.html</url-pattern>
-    </filter-mapping>
-    <filter-mapping>
-      <filter-name>EnforceAuthnFilter</filter-name>
-      <url-pattern>/rest</url-pattern>
-    </filter-mapping>
--->
-
-
-b. The 3 client scripts runRESTClient.bat, runRESTClient.sh and runSOAPClient.sh have been modified to be runnable from any directory, as they will be called by GS3's g2f perl scripts. 
-
-- The bash files have been made executable on extraction of the GS3 Fedora extension and the following has been added to the top of the files:
-
-	# Need to run this script from its own directory instead of whichever directory it may be called from
-	thisdir="`dirname \"$0\"`"
-	thisdir="`cd \"$thisdir\" && pwd`"
-	cd "$thisdir"
-
-
-- Additions to the bat scripts are at the top and bottom:
-
-	@echo off
-
-	::pushd "%CD%"
-	set startdir=%CD%
-	CD /D "%~dp0"
-
-	...
-
-	:: popd
-	cd "%startdir%"
-	set startdir=
-
-
-c. The changes to fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene's foxmlToLucene.xslt and foxmlToLuceneGenerated.xslt are identical. The following xslt has been added:
-
-- Add the following namespaces to the namespace declarations at the top:
-	xmlns:ex="http://www.greenstone.org/namespace/fake/ex"
-	xmlns:dls="http://www.greenstone.org/namespace/fake/dls"
-
-- Add custom indexing for EX and DLS datastreams below the comment on datastreams:
-
-	<!-- a datastream is fetched, if its mimetype 
-	     can be handled, the text becomes the value of the field. 
-	     This is the version using PDFBox,
-	     below is the new version using Apache Tika. -->
-
-	<xsl:for-each select="foxml:datastream[starts-with(@ID,'EX')]/foxml:datastreamVersion[last()]/foxml:xmlContent/ex:ex/ex:metadata">
-	  <IndexField index="TOKENIZED" store="YES" termVector="YES">
-	    <xsl:attribute name="IFname">
-	      <xsl:value-of select="concat('ex.', @name)"/>
-	    </xsl:attribute>
-	    <xsl:value-of select="text()"/>
-	  </IndexField>
-	</xsl:for-each>
-	
-	<xsl:for-each select="foxml:datastream[starts-with(@ID,'DLS')]/foxml:datastreamVersion[last()]/foxml:xmlContent/dls:dls/dls:metadata">
-	  <IndexField index="TOKENIZED" store="YES" termVector="YES">
-	    <xsl:attribute name="IFname">
-	      <xsl:value-of select="concat('dls.', @name)"/>
-	    </xsl:attribute>
-	    <xsl:value-of select="text()"/>
-	  </IndexField>
-	</xsl:for-each>
-
-- Near the end of the XSLT files, just after index for the "foxml.all.text" field, allow just the full text of the documents to be indexed by adding an index for the ds.fulltext field:
-
-	<IndexField IFname="ds.fulltext" index="TOKENIZED" store="YES" termVector="YES">
-	  <xsl:for-each select="//foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
-	    <xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
-	    <xsl:text>Â </xsl:text>
-	  </xsl:for-each>
-	</IndexField>
-
-
-Further datastreams and metadata sets can be indexed by adding similar namespace declarations and xml elements to these 2 XSLT files. 
-If the changes are not meant to apply for all Greenstone users, individual Greenstone users can add fields for indexing by making such changes to just the file fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLuceneGenerated.xslt
-
-
-d. By default, Lucene's lock obtain timeout is set to 0 in its properties file, which is not acceptable for all but the smallest documents. The lock timeout can be customised in build.properties and by default is set to 10000 (or 1000), which can be adjusted before starting the Fedora extension installation process.
-
-The installation process will write out this property into GSearch's FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties: 
-	fgsindex.defaultWriteLockTimeout = 1000
-
-When fedoragsearch then gets deployed, this value will be propagated into: 
-	<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/index.properties
-
-
-
-********************************************************************************************************************
-			D. To manually set up Fedora with Fedora GSearch 2.5 from scratch
-********************************************************************************************************************
-
-When installing Fedora, you can choose to install it outside Greenstone, and also instruct it to use its own tomcat. However, in the following instructions, Fedora's installation location (FEDORA_HOME) is still taken to be /GS3/ext/fedora3, since it's assumed Fedora is be installed to use Greenstone's tomcat. 
-
-The Fedora GSearch war file will need to be unpacked in the tomcat/webapps folder of whichever tomcat Fedora is using. In the following, this is still Greenstone's tomcat.
-
-In whichever location Fedora is installed, that's where Fedora will store its digital objects and their datastreams, and that's where Fedora GSearch will create its GSearch index.
-
-
-********************************
-INSTALLING FEDORA
-********************************
-1. Set FEDORA_HOME=/<GS3>/ext/fedora3 in .profile (emacs ~/.profile)
-source ~/.profile
-
-2. Run fedora installer:
-	java -jar fcrepo-installer-3.6.1.jar
-
-Install by specifying to use the existing tomcat (existingTomcat), and provide the Greenstone3 tomcat stop and start ports (usually 8383 and 8305).
-Then set the existingTomcat to the Greenstone3 one: /<GS3>/packages/tomcat
-Turn on messaging, as this is necessary for Fedora GSearch.
-
-- Installation options:
-
-custom
-FEDORA_HOME
-pwd: pounamu
-host: <full-tomcat.server-host-name>
-def server context: fedora
-default false for user authentication for APIA-A
-false for SSL availability
-existingTomcat
-path to tomcat: </full-path-to-GS3>/packages/tomcat
-tomcat listen port: 8383
-tomcat shutdown port:8305
-derby:included
-upstream HTTP authentication: (default) false
-FeSL AuthZ: (default) false
-XACML policy enforcement enabled: false
-Low Level Storage: (default) akubra-fs 
-Resource Index: true
-Enable Messaging: true
-Messaging Provider URI: [default is vm:(broker:(tcp://localhost:61616))]
-Deploy local services and demos: (default) true
-
-
-- The Fedora installation options used are to be found (after installation) in fedora3/install/install.properties:
-
-#Install Options
-#Fri Sep 21 15:29:29 NZST 2012
-ri.enabled=true
-messaging.enabled=false
-apia.auth.required=false
-database.jdbcDriverClass=org.apache.derby.jdbc.EmbeddedDriver
-upstream.auth.enabled=false
-ssl.available=false
-database.jdbcURL=jdbc\:derby\:/<GS3>/ext/fedora3/derby/fedora3;create\=true
-database.password=fedoraAdmin
-database.username=fedoraAdmin
-fesl.authz.enabled=false
-tomcat.shutdown.port=8305
-deploy.local.services=true
-xacml.enabled=false
-tomcat.http.port=8383
-fedora.serverHost=<full-tomcat.server-host-name>
-database=included
-database.driver=included
-fedora.serverContext=fedora
-llstore.type=akubra-fs
-tomcat.home=/<GS3>/packages/tomcat
-fedora.home=/<GS3>/ext/fedora3
-install.type=custom
-servlet.engine=existingTomcat
-fedora.admin.pass=pounamu
-
-
-- If trying to turn a custom installation into one for distribution, you would need to modify the following 4 files by inserting placeholder strings where applicable for the tomcatserver name, tomcat listen port and shutdown port, fedorapassword, GSLD3SRCHOME and FEDORA_HOME:
-
-fedora3/install/install.properties
-fedora3/server/config/spring/akubra-llstore.xml
-fedora3/server/config/fedora.fcfg
-fedora3/server/config/fedora-users.xml
-
-Then you would rename these files with the suffix .in 
-
-
-3. Just to confirm there are no differences between the server.xml fedora has generated for fedora, and the server.xml of GS3's tomcat, run a diff:
-
-	diff -w /<GS3>/packages/tomcat/conf/server.xml </GS3/ext/>fedora3/install/server.xml
-
-4. Copy the fedora war files from fedora3/install into packages/tomcat/webapps
-fedora.war, fedora-demo.war, fop.war, imagemanip.war, saxon.war
-
-5. Copy the jar files xalan.jar, serializer.jar (and xsltc.jar) from Greenstone3's web/WEB-INF/lib into Greenstone3's packages/tomcat/lib so that fedora has access to the xalan version of the TransformerFactoryImpl class.
-
-There's also a xalan.jar in /<GS3>/packages/tomcat/webapps/fop/WEB-INF/lib
-So this can be copied into /<GS3>/packages/tomcat/lib/. instead of the Greenstone version.
-
-6. Create the file /<GS3>/packages/tomcat/conf/Catalina/localhost/fedora.xml
-containing:
-
-<?xml version="1.0" encoding="UTF-8"?>
-<Context>
-  <Parameter name="fedora.home" value="/<GS3>/ext/fedora3" />
-</Context>
-
-
-7. Before running the Greenstone server, make a copy of the fedora3 folder. Because once you start up tomcat, and visit the fedora home page, it will create a lot of files customised to the location of the current installation.
-
-8. Visit http://localhost:8383/greenstone3 and 
-	http://localhost:8383/fedora 
-
-to confirm both work.
-
-
-********************************
-INSTALLING FEDORA GSEARCH
-********************************
-1. Download Fedora GSearch 2.5
-
-2. Stop tomcat. Copy the fedoragsearch.war files into /<GS3>/packages/tomcat/webapps
-
-If Fedora was not installed with messaging turned on, then turn it on in now /<GS3>/ext/fedora3/server/config/fedora.fcfg:
-
- <module role="org.fcrepo.server.messaging.Messaging" class="org.fcrepo.server.messaging.MessagingModule">
-    <comment>Fedora's Java Messaging Service (JMS) Module</comment>
-    <param name="enabled" value="true"/>
- ...
-
-3. Update the following properties in /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/fgsconfig-basic.properties
-
-gsearchBase=http://<tomcat.server>:8383
-gsearchUser=fedoraAdmin
-gsearchPass=<fedora.password>
-local.FEDORA_HOME=/<GS3>/ext/fedora3
-finalConfigPath=/<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes
-
-fedoraBase=http://<tomcat.server>:8383
-fedoraPass=<fedora.password>
-
-4. Add the edited foxmlToLucene.xslt & foxmlToLuceneGenerated.xslt files to /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene
-
-5. Add the edited runRESTClient.sh (and runSOAPClient.sh, runRESTClient.bat) to /<GS3>/packages/tomcat/webapps/fedoragsearch/client
-And give them execute permissions, unless they already have it.
-
-6. In a text editor, open up /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/web.xml
-and comment out the authentication filters (one or two of these is probably all that is necessary):
-
-<!--
-    <filter-mapping>
-      <filter-name>EnforceAuthnFilter</filter-name>
-      <servlet-name>AxisServlet</servlet-name>
-    </filter-mapping>
-    <filter-mapping>
-      <filter-name>EnforceAuthnFilter</filter-name>
-      <servlet-name>GenericSearchREST</servlet-name>
-    </filter-mapping>
-    <filter-mapping>
-      <filter-name>EnforceAuthnFilter</filter-name>
-      <url-pattern>/index.html</url-pattern>
-    </filter-mapping>
-    <filter-mapping>
-      <filter-name>EnforceAuthnFilter</filter-name>
-      <url-pattern>/rest</url-pattern>
-    </filter-mapping>
--->
-
-Maybe what I really need to comment out is:
-    <filter>
-      <filter-name>EnforceAuthnFilter</filter-name>
-      <filter-class>org.fcrepo.server.security.servletfilters.FilterEnforceAuthn</filter-class>
-    </filter>
-
-7. Start tomcat to have it deploy fedoragsearch.
-This will unpack fedoragsearch.
-
-8. With tomcat running, configure fedoragsearch, which will adjust various config files. You will need to go into the deployed fedoragsearch webapps folder's FgsConfig folder first to be able to run the configuration target:
-
-	<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig>ant -f fgsconfig-basic.xml
-
-9. With tomcat still running, run updateIndex once to create the empty index for the first time (by running the runRESTClient.sh script with the command: "host:port updateIndex createEmpty [indexName]")
-
-	./<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex createEmpty FgsIndex
-
-10. Check fedoragsearch has been properly installed by visiting:
-http://localhost:8383/fedoragsearch/rest
-
-10. If you wish to remove the various war files from GS3's tomcat webapps folder, you will need to stop tomcat first before deleting the war files, because doing so when tomcat is running will undeploy those webapps.
-
-
-********************************
-DEBUGGING
-********************************
-
-Logs to consult when debugging:
-
-1. Check /<GS3>/packages/tomcat/logs/catalina.out
-
-2. </GS3/ext/>fedora3/server/logs/fedora.log for Fedora error logging.
-
-3. To turn on FedoraGSearch's logging of debug statements (Huge files, can reach 500 Mb in a day if rebuilding the demo collection. So you may want to switch this off when not debugging by setting the debug level to INFO):
-
-- /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/log4j.xml is already set to output DEBUG statements and higher logging levels
-- So open </GS3/ext/>fedora3/server/logs/fedoragsearch.daily.log to look at debug messages in case fedoragsearch doesn't work as expected.
-
-
-********************************************************************************************************************
Index: gs3-extensions/fedora/build.xml
===================================================================
--- gs3-extensions/fedora/build.xml	(revision 26412)
+++ 	(revision )
@@ -1,189 +1,0 @@
-<?xml version="1.0"?>
-<!-- ====================================================================== 
-     Oct 2012
-
-     Script to install Fedora and Fedora GSearch as extensions within Greenstone3
-     (using Greenstone's tomcat)
-     ak19                                                                
-     ====================================================================== -->
-
-<project name="fedora_for_gs3" default="usage" basedir=".">
-  <echo>
-    Tested for Linux. 
-    Your os.name: ${os.name}
-  </echo>
-
-  <!-- PROPERTIES -->
-
-  <!-- need to have FEDORA_HOME env correctly defined -->
-
-  <!--<property name="gsdl3src.home" value="../..${basedir}"/>-->
-  <!--<property name="gsdl3src.home" location="." relative="true" basedir="../.."/>-->
-  <!--<property name="gsdl3src.home" value="/full/path/to/GS3" />-->
-
-  <!-- load the Greenstone properties file to have access to tomcat and fedora properties. 
-    This assumes they have Greenstone installed (build.properties must exist). -->
-  <property file="${gsdl3src.home}/build.properties"/>
-
-  <available file="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/FgsConfig/build.xml" property="fedoragsearch.deployed"/>   
-
-
-  <!-- TARGETS -->
-  <target name="usage" description="Print a help message">
-    <echo message="  Execute 'ant -projecthelp' for a list of targets."/>
-    <echo message="  Execute 'ant -help' for Ant help."/>
-    
-    <echo>
-      *********************************************************
-      1. ant -Dgsdl3src.home=&lt;Full-Path-To-GS3&gt; start-fedora-install
-
-      2. start tomcat by going into ${gsdl3src.home} and running: ant start
-
-      3. ant -Dgsdl3src.home=&lt;Full-Path-To-GS3&gt; continue-fedora-install
-
-      4. stop tomcat by going back into ${gsdl3src.home} and running: ant stop
-      
-      5. ant -Dgsdl3src.home=&lt;Full-Path-To-GS3&gt; finish-fedora-install
-      
-      The README.txt file will have more information about the Greenstone 
-      Fedora extension's installation process.
-      *********************************************************
-    </echo>
-  </target>
-
-
-
-  <target name="start-fedora-install" description="Prepares the fedora war files and puts them into tomcat">
-
-    <!-- adjust template files -->
-    <filter token="GSDL3SRCHOME" value="${gsdl3src.home}"/>
-    <filter token="FEDORA_HOME" value="${gsdl3src.home}/ext/fedora3"/>
-    <filter token="tomcatserver" value="${tomcat.server}"/>
-    <filter token="tomcatport" value="${tomcat.port}"/>
-    <filter token="tomcatshutdownport" value="${tomcat.shutdown.port}"/>
-    <filter token="fedorapassw" value="${fedora.password}"/>
-    <filter token="indexwritelocktimeout" value="${index.writelock.timeout}"/>
-
-    <copy file="${basedir}/adjust_war_files/fedoragsearch/FgsConfig/fgsconfig-basic.properties.in" tofile="${basedir}/adjust_war_files/fedoragsearch/FgsConfig/fgsconfig-basic.properties" filtering="true" overwrite="true"/>
-    <copy file="${basedir}/adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties.in" tofile="${basedir}/adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties" filtering="true" overwrite="true"/>
-    <copy file="${basedir}/install/install.properties.in" tofile="${basedir}/install/install.properties" filtering="true" overwrite="true"/>
-    <copy file="${basedir}/server/config/fedora.fcfg.in" tofile="${basedir}/server/config/fedora.fcfg" filtering="true" overwrite="true"/>
-    <copy file="${basedir}/server/config/fedora-users.xml.in" tofile="${basedir}/server/config/fedora-users.xml" filtering="true" overwrite="true"/>
-    <copy file="${basedir}/server/config/spring/akubra-llstore.xml.in" tofile="${basedir}/server/config/spring/akubra-llstore.xml" filtering="true" overwrite="true"/>
-
-    <!-- zip up fedoragsearch, rename as .war file and put it in the install folder-->
-    <zip destfile="${basedir}/install/fedoragsearch.war"
-	 basedir="${basedir}/adjust_war_files/fedoragsearch"	 
-	 />
-
-    <!-- move fedora.xml and war files into tomcat -->
-    <copy file="${basedir}/adjust_war_files/fedora.xml.in" tofile="${gsdl3src.home}/packages/tomcat/conf/Catalina/localhost/fedora.xml" filtering="true" overwrite="true"/>
-
-    <copy todir="${gsdl3src.home}/packages/tomcat/webapps">
-      <fileset dir="${basedir}/install">
-	<include name="**/*.war"/>
-      </fileset>
-    </copy>
-
-    <!-- copy jar files needed by tomcat to run fedora from greenstone/web/WEB-INF/lib -->
-    <copy todir="${gsdl3src.home}/packages/tomcat/lib">
-      <filelist dir="${gsdl3src.home}/web/WEB-INF/lib">
-	<file name="xalan.jar"/>
-	<file name="serializer.jar"/>
-	<file name="xsltc.jar"/>
-      </filelist>
-    </copy>
-
-    <echo>
-      *********************************************************
-      1. Adjust ${gsdl3src.home}/build.properties to set up Fedora.
-      2. Then restart the Greenstone 3 tomcat. This will take some time the first time around. 
-      3. Once tomcat's started up, return to this extension directory and run: ant continue-fedora-install
-      *********************************************************
-    </echo>
- </target>
-
-
-
-  <!-- Only if fedoragsearch exists inside tomcat/webapps -->
-  <target name="continue-fedora-install" 
-	  description="When tomcat is running and has deployed the fedora war files, this stage configures Fedora GSearch" 
-	  if="fedoragsearch.deployed">
-
-    <!-- call the fgsconfig-basic.xml buildfile in GS3/packages/tomcat/webapps/fedoragsearch/FgsConfig's 
-	 ant -f fgsconfig-basic.xml -->
-    <echo>
-      Configuring Fedora GSearch
-    </echo>
-    <ant dir="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/FgsConfig" antfile="fgsconfig-basic.xml"/>
-    
-    <!-- give read execute permissions to all (755) for the fedoragsearch files -->
-    <echo>
-      Giving executable permissions to Fedora GSearch scripts
-    </echo>
-    <chmod file="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh" perm="755"/>
-    <chmod file="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/client/runSOAPClient.sh" perm="755"/>
-    
-    <!-- call Update EmptyIndex on GSearch to create the initial index (segments) file:
-	 .../webapps/fedoragsearch/client/runRESTClient.sh <host:port> updateIndex createEmpty <indexName>    
-
-	 Where the indexName is FgsIndex. If it is made customisable, then template files need 
-	 to change to contain placeholders wherever the indexName is mentioned.
-	 To run the upateIndex command, need GSearch username and pwd set in the environment. -->
-    <echo>
-      Calling UpdateIndex CreateEmpty on Fedora GSearch to create a new index
-    </echo>
-    <exec osfamily="unix" spawn="false"
-	  executable="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh">	  
-      <env key="fgsUserName" value="fedoraAdmin"/>
-      <env key="fgsPassword" value="${fedora.password}"/>
-      <arg value="${tomcat.server}:${tomcat.port}"/>
-      <arg value="updateIndex"/>
-      <arg value="createEmpty"/>
-      <arg value="FgsIndex"/>
-    </exec>
-    
-    <exec osfamily="windows" spawn="false"
-	  executable="cmd">
-      <env key="fgsUserName" value="fedoraAdmin" />
-      <env key="fgsPassword" value="${fedora.password}" />
-      <arg value="/c"/>
-      <arg value="${gsdl3src.home}\\packages\\tomcat\\webapps\\fedoragsearch\\client\\runRESTClient.bat"/>
-      <arg value="${tomcat.server}:${tomcat.port}" />
-      <arg value="updateIndex" />
-      <arg value="createEmpty" />
-      <arg value="FgsIndex" />
-    </exec>
-
-    <echo>
-      *********************************************************
-      0. Don't worry about the IndexNotFoundException message. It always does this.
-      1. Stop your Greenstone 3 tomcat. (Check it's stopped: ps aux | grep tomcat)
-      2. Then, to complete fedora installation, return to this extension directory and run: ant finish-fedora-install.
-      This will clear the war files, since they have already been deployed by now.
-      *********************************************************
-    </echo>
-    
-  </target>
-
-
-  
-  <target name="finish-fedora-install" 
-	  description="Removes Fedora and GSearch war files from ${basedir}/tomcat/packages/webapps after deployment. Tomcat must not be running.">
-    <!-- clean up the war files -->
-    <delete file="${gsdl3src.home}/packages/tomcat/webapps/fedora.war"/>
-    <delete file="${gsdl3src.home}/packages/tomcat/webapps/fedora-demo.war"/>
-    <delete file="${gsdl3src.home}/packages/tomcat/webapps/fop.war"/>
-    <delete file="${gsdl3src.home}/packages/tomcat/webapps/imagemanip.war"/>
-    <delete file="${gsdl3src.home}/packages/tomcat/webapps/saxon.war"/>
-    <delete file="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch.war"/>
-    
-    <echo>
-      *********************************************************
-      Fedora installation complete. Try running FLI.
-      *********************************************************
-   </echo>
-    
-  </target>
-  
-</project>
Index: gs3-extensions/fedora/fedora-files/akubra-llstore.xml.in
===================================================================
--- gs3-extensions/fedora/fedora-files/akubra-llstore.xml.in	(revision 26412)
+++ 	(revision )
@@ -1,93 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
-<beans>
-
-  <bean name="org.fcrepo.server.storage.lowlevel.ILowlevelStorage"
-    class="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorageModule">
-    <constructor-arg index="0">
-      <map />
-    </constructor-arg>
-    <constructor-arg index="1" ref="org.fcrepo.server.Server" />
-    <constructor-arg index="2" type="java.lang.String"
-      value="org.fcrepo.server.storage.lowlevel.ILowlevelStorage" />
-    <property name="impl"
-      ref="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorage" />
-  </bean>
-
-  <bean
-    name="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorage"
-    class="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorage"
-    singleton="true">
-    <constructor-arg>
-      <description>The store of serialized Fedora objects</description>
-      <ref bean="objectStore" />
-    </constructor-arg>
-    <constructor-arg>
-      <description>The store of datastream content</description>
-      <ref bean="datastreamStore" />
-    </constructor-arg>
-    <constructor-arg value="true">
-      <description>if true, replaceObject calls will be done in a way
-        that
-        ensures the old content is not deleted until the new content is safely
-        written. If the objectStore already does this, this should be
-        given as
-        false</description>
-    </constructor-arg>
-    <constructor-arg value="true">
-      <description>save as above, but for datastreamStore</description>
-    </constructor-arg>
-  </bean>
-
-  <bean name="objectStore" class="org.akubraproject.map.IdMappingBlobStore"
-    singleton="true">
-    <constructor-arg value="urn:example.org:objectStore" />
-    <constructor-arg>
-      <ref bean="fsObjectStore" />
-    </constructor-arg>
-    <constructor-arg>
-      <ref bean="fsObjectStoreMapper" />
-    </constructor-arg>
-  </bean>
-
-  <bean name="fsObjectStore" class="org.akubraproject.fs.FSBlobStore"
-    singleton="true">
-    <constructor-arg value="urn:example.org:fsObjectStore" />
-    <constructor-arg value="@GSDL3SRCHOME@/ext/fedora3/data/objectStore"/>
-  </bean>
-
-  <bean name="fsObjectStoreMapper"
-    class="org.fcrepo.server.storage.lowlevel.akubra.HashPathIdMapper"
-    singleton="true">
-    <constructor-arg value="##" />
-  </bean>
-
-  <bean name="datastreamStore" class="org.akubraproject.map.IdMappingBlobStore"
-    singleton="true">
-    <constructor-arg value="urn:fedora:datastreamStore" />
-    <constructor-arg>
-      <ref bean="fsDatastreamStore" />
-    </constructor-arg>
-    <constructor-arg>
-      <ref bean="fsDatastreamStoreMapper" />
-    </constructor-arg>
-  </bean>
-
-  <bean name="fsDatastreamStore" class="org.akubraproject.fs.FSBlobStore"
-    singleton="true">
-    <constructor-arg value="urn:example.org:fsDatastreamStore" />
-    <constructor-arg value="@GSDL3SRCHOME@/ext/fedora3/data/datastreamStore"/>
-  </bean>
-
-  <bean name="fsDatastreamStoreMapper"
-    class="org.fcrepo.server.storage.lowlevel.akubra.HashPathIdMapper"
-    singleton="true">
-    <constructor-arg value="##" />
-  </bean>
-
-  <bean name="fedoraStorageHintProvider"
-    class="org.fcrepo.server.storage.NullStorageHintsProvider"
-    singleton="true">
-  </bean>
-
-</beans>
Index: gs3-extensions/fedora/fedora-files/fedora-users.xml.in
===================================================================
--- gs3-extensions/fedora/fedora-files/fedora-users.xml.in	(revision 26412)
+++ 	(revision )
@@ -1,14 +1,0 @@
-<?xml version='1.0' ?>
-  <users>
-    <user name="fedoraAdmin" password="@fedorapassw@">
-      <attribute name="fedoraRole">
-        <value>administrator</value>
-      </attribute>
-    </user>
-    <user name="fedoraIntCallUser" password="changeme">
-      <attribute name="fedoraRole">
-        <value>fedoraInternalCall-1</value>
-        <value>fedoraInternalCall-2</value>
-      </attribute>
-    </user>
-  </users>
Index: gs3-extensions/fedora/fedora-files/fedora.fcfg.in
===================================================================
--- gs3-extensions/fedora/fedora-files/fedora.fcfg.in	(revision 26412)
+++ 	(revision )
@@ -1,953 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<server xmlns="http://www.fedora.info/definitions/1/0/config/" class="org.fcrepo.server.BasicServer">
-  <param name="datastreamExtensionMappingSource" value="mime-to-extensions.xml">
-    <comment>Source of mappings from MIMETYPE to file extension</comment>
-  </param>
-  <param name="datastreamExtensionMappingId" value="ifmissing">
-    <comment>Controls filename extension mapping when the datastream ID is used
-		as the source of the filename.  Values are as above.</comment>
-  </param>
-  <param name="httpClientMaxConnectionsPerHost" value="5">
-    <comment>Maximum number of Fedora http client connections allowed to a given host.</comment>
-  </param>
-  <param name="httpClientSocketTimeoutSecs" value="120">
-    <comment>Number of seconds Fedora http client will wait for data coming across an 
-		established http connection.</comment>
-  </param>
-  <param name="fedoraServerHost" value="wharariki.cms.waikato.ac.nz">
-    <comment>Defines the host name for the Fedora server, as seen from the 
-		outside world.</comment>
-  </param>
-  <param name="datastreamExtensionMappingLabel" value="always">
-    <comment>Controls filename extension mapping when the datastream label is used
-		as the source of the filename.  Values are always: always generate an extension
-		based on the MIMETYPE, using the default extension if none can be determined; 
-		ifmissing: generate an extension if the filename obtained from the source does not
-		already contain one (again returning the default if there is no MIMETYPE-to-extension
-		mapping is found); never: never generate an extension, use the filename from the source
-		as-is</comment>
-  </param>
-  <param name="httpClientMaxFollowRedirects" value="3">
-    <comment>Maximun number of redirects the Fedora http client will follow (only if 
-		httpClientFollowRedirects is set to true.)</comment>
-  </param>
-  <param name="httpClientUserAgent" value="Fedora">
-    <comment>The value to be set for the User-Agent HTTP request header.</comment>
-  </param>
-  <param name="httpClientMaxTotalConnections" value="5">
-    <comment>Maximum number of total Fedora http client connections allowed at once.</comment>
-  </param>
-  <param name="datastreamFilenameSource" value="rels label id">
-    <comment>determines the source of the filename generated when download=true
-		on a datastream dissemination.  Value is space separated list of label: use the datastream label;
-		id: use the datastream ID; rels: use the value defined in RELS-INT.  Each
-		source is checked in order, and the first containing a value is used.  Omit
-		any of the sources if that source is never to be used.  If no sources are to be used,
-		and just the default filename and extension below are to be used, specify &quot; &quot;.</comment>
-  </param>
-  <param name="adminEmailList" value="bob@example.org sally@example.org">
-    <comment>Defines one or more email addresses for server administrators; 
-		list is space delimited.</comment>
-  </param>
-  <param name="datastreamMediationLimit" value="5000">
-    <comment>Determines the time interval in which external mechanisms must 
-		respond to requests by the Fedora server. The value is specified in 
-		milliseconds. The value specified should be set high enough to allow 
-		for an average response time from any single external mechanisms. Note 
-		this value must be less than the limit specified for the 
-		datastreamExpirationLimit.</comment>
-  </param>
-  <param name="fedoraServerPort" value="8383">
-    <comment>Defines the port number on which the Fedora server runs; 
-		default is 8080.</comment>
-  </param>
-  <param name="fedoraRedirectPort" value="8443">
-    <comment>Defines the redirect port of the Fedora sever; default is 8443.</comment>
-  </param>
-  <param name="httpClientFollowRedirects" value="true">
-    <comment>Should the Fedora http client follow redirects?</comment>
-  </param>
-  <param name="datastreamExtensionMappingDefault" value="never">
-    <comment>Controls filename extension mapping when no filename can be determined from
-		the sources listed in datastreamFilenameSource.  Values are always: always generate an extension
-		based on the MIMETYPE (using the default if no appropriate mapping is specified);
-		never: never generate an extension.</comment>
-  </param>
-  <param name="datastreamContentDispositionInlineEnabled" value="true">
-    <comment>determines if a content-disposition header specifying &quot;inline&quot; and
-		a filename is added to the response for the REST API getDatastreamDissemination
-		when no query parameter of download=true is specified.  Browser support for 
-		recognising a filename in case of &quot;inline&quot; content disposition is patchy,
-		so you may wish to disable the content disposition header in this case and only
-		have it provided when download=true is specified, in which case the content disposition
-		of &quot;attachment&quot; will be used; which is generally supported.</comment>
-  </param>
-  <param name="fedoraAppServerContext" value="fedora">
-    <comment>Defines the context name for the Fedora server within the 
-		application server. If set to eg &quot;myfedora&quot; the URL for Fedora will result
-		in http[s]://fedoraServerHost[:fedoraServerPort]/myfedora.</comment>
-  </param>
-  <param name="fedoraShutdownPort" value="8305">
-    <comment>Defines the port number used to shutdown the Fedora sever; 
-		default is 8005.</comment>
-  </param>
-  <param name="datastreamDefaultExtension" value="bin">
-    <comment>Extension to use when none can be determined from mappings</comment>
-  </param>
-  <param name="datastreamDefaultFilename" value="download">
-    <comment>Filename to use for datastream downloads when none can be determined from the
-		sources listed in datastreamFilenameSource.</comment>
-  </param>
-  <param name="datastreamExpirationLimit" value="300">
-    <comment>Controls the size of the datastream mediation hash by removing 
-		entries outside the specified threshold. The value is specified in 
-		seconds. Note this value must be greater than the limit specified for 
-		the datastreamMediationLimit.</comment>
-  </param>
-  <param name="datastreamExtensionMappingRels" value="never">
-    <comment>Controls filename extension mapping when RELS-INT is used
-		as the source of the filename.  Values are as above.</comment>
-  </param>
-  <param name="httpClientTimeoutSecs" value="20">
-    <comment>Number of seconds Fedora http client will wait for a connection before timing 
-		out.</comment>
-  </param>
-  <param name="repositoryName" value="Fedora Repository">
-    <comment>Defines a human readable name for the Fedora server; default is 
-		Fedora Repository.</comment>
-  </param>
-  <module role="org.fcrepo.server.security.Authorization" class="org.fcrepo.server.security.DefaultAuthorization">
-    <comment>Builds and manages Fedora's authorization structure.</comment>
-    <param name="REPOSITORY-POLICY-GUITOOL-POLICIES-DIRECTORY" value="data/fedora-xacml-policies/repository-policies-generated-by-policyguitool" isFilePath="true">
-      <comment>This parameter is for future use.</comment>
-    </param>
-    <param name="POLICY-SCHEMA-PATH" value="xsd/cs-xacml-schema-policy-01.xsd"/>
-    <param name="ENFORCE-MODE" value="permit-all-requests"/>
-    <param name="VALIDATE-OBJECT-POLICIES-FROM-DATASTREAM" value="false"/>
-    <param name="XACML-COMBINING-ALGORITHM" value="com.sun.xacml.combine.OrderedDenyOverridesPolicyAlg"/>
-    <param name="VALIDATE-OBJECT-POLICIES-FROM-FILE" value="false"/>
-    <param name="VALIDATE-REPOSITORY-POLICIES" value="true"/>
-    <param name="REPOSITORY-POLICIES-DIRECTORY" value="data/fedora-xacml-policies/repository-policies" isFilePath="true"/>
-  </module>
-  <module role="org.fcrepo.server.security.BackendSecurity" class="org.fcrepo.server.security.DefaultBackendSecurity">
-    <comment>Description: Interface to the backend service security 
-		configuration. This module initializes backend service security 
-		information in the server by parsing the beSecurity configuration file. 
-		This file is located in the distribution in 
-		$FEDORA_HOME/dist/server/config/beSecurity.xml. The configuration file 
-		is read once at server startup.</comment>
-    <param name="beSecurity_char_encoding" value="utf-8">
-      <comment>The character encoding used for the beSecurity 
-			configuration file. The default is &quot;utf-8&quot;. The value 
-			specified must correspond to the character encoding used in the 
-			beSecurity configuration file.</comment>
-    </param>
-    <param name="beSecurity_validation" value="false">
-      <comment>Controls whether beSecurity config file is validated 
-			against the beSecurityDescription schema. The default is 
-			&quot;false&quot;. Valid values are &quot;true&quot; or 
-			&quot;false&quot;.</comment>
-    </param>
-  </module>
-  <module role="org.fcrepo.server.storage.DOManager" class="org.fcrepo.server.storage.DefaultDOManager">
-    <comment>The interface to the storage subsystem.  This provides 
-    	context-appropriate DOReaders and DOWriters for reflecting on and 
-    	writing to the objects stored in the repository. It also provides 
-    	methods for reflecting on the contents of the repository as a whole..</comment>
-    <param name="defaultDCControlGroup" value="X">
-      <comment>The control group to use for the system-generated DC datastream
-            if no DC datastream is present on ingest.  Must be &quot;X&quot; or &quot;M&quot;.</comment>
-    </param>
-    <param name="gSearchPassword" value="examplePassword">
-      <comment>The associated password for accessing the REST endpoint
-            of the Fedora Generic Search service.  This parameter is only 
-            required if GSearchDOManager is used, and the service requires 
-            authentication.</comment>
-    </param>
-    <param name="storageCharacterEncoding" value="UTF-8">
-      <comment>If the serialization format is text-based, this is the 
-	    	character encoding that should be used. Default is UTF-8.</comment>
-    </param>
-    <param name="gSearchUsername" value="exampleUsername">
-      <comment>The username for accessing the REST endpoint of the
-            Fedora Generic Search service.  This parameter is only required if
-            GSearchDOManager is used, and the service requires 
-            authentication.</comment>
-    </param>
-    <param name="storagePool" value="localDerbyPool">
-      <comment>The named connection pool from which read/write database 
-	    	connections are to be provided for the storage subsystem (see the 
-	    	ConnectionPoolManager module). Default is the default provided by the 
-	    	ConnectionPoolManager.</comment>
-    </param>
-    <param name="fedoraStorageHintProvider" value="org.fcrepo.server.storage.NullStorageHintsProvider">
-      <comment>Hints are gathered and passed to the underline storage systems (only Akubra for now).
-            These are meta data or contextual information about object or datastream to be added or updated.
-            The default implementation is NullStorageHintsProvider; it provides no hints. You you can implement
-            your own FedoraStorageHintProvider and drop your implementation to the $CATALINA_HOME/webapps/fedora/WEB_INF/classes
-            directory (unpackaged), or the $CATALINA_HOME/webapps/fedora/WEB_INF/lib director (packaged).</comment>
-    </param>
-    <param name="gSearchRESTURL" value="http://localhost:8080/fedoragsearch/rest">
-      <comment>The REST endpoint of the Fedora Generic Search service.
-            This parameter is only required if GSearchDOManager is 
-            used.</comment>
-    </param>
-    <param name="defaultExportFormat" value="info:fedora/fedora-system:FOXML-1.1"/>
-    <param name="defaultRELSControlGroup" value="X">
-      <comment>The control group to use for system-generated RELS-EXT and 
-            RELS-INT datastreams where these are not already present when
-            adding relationships via addRelationship.  Must be &quot;X&quot; or &quot;M&quot;.</comment>
-    </param>
-    <param name="pidNamespace" value="changeme">
-      <comment>This is the namespace id for pids of newly-created objects. 
-	    	This should be unique for a repository. It can be from 1 to 17 
-	    	characters, and may only contain A-Z, a-z, 0-9, &apos;.&apos;, or &apos;-&apos; (dash).</comment>
-    </param>
-  </module>
-  <module role="org.fcrepo.server.management.Management" class="org.fcrepo.server.management.ManagementModule">
-    <comment>The management subsystem. This implements the methods necessary 
-		to fulfill API-M requests without regard to:
-                 - how the service is exposed
-                 - how bytestreams and java types might be marshalled/demarshalled over the wire
-                 - how the storage subsystem is implemented.</comment>
-    <param name="purgeDelayInMillis" value="60000">
-      <comment>Optional, default is 60000 (1 minute).
-            This specifies the amount of time between checks to remove
-            temporary files uploaded via the API-M upload interface.  During
-            each check, old files whose age exceeds uploadStorageMinutes
-            will be removed.</comment>
-    </param>
-    <param name="decorator1" value="org.fcrepo.server.messaging.NotificationInvocationHandler"/>
-    <param name="checksumAlgorithm" value="MD5">
-      <comment>Specifies which checksumming algorithm is to be used when 
-			automatically computing checksums as specified by the above 
-			parameter. Valid values are: MD5  SHA-1  SHA-256  SHA-384  SHA-512.</comment>
-    </param>
-    <param name="uploadStorageMinutes" value="5">
-      <comment>Optional, default is 5.
-            This specifies the minimum amount of time that each uploaded
-            file should be kept in temporary storage.</comment>
-    </param>
-    <param name="autoChecksum" value="false">
-      <comment>Controls whether a checksum is automatically computed for 
-			every datastream as the datastream is added to the repository. This 
-			will allow the integrity of datastream contents to be periodically 
-			checked to insure the object is not corrupted.</comment>
-    </param>
-  </module>
-  <module role="org.fcrepo.server.access.Access" class="org.fcrepo.server.access.DefaultAccess">
-    <comment>Description: The access subsystem. This implements the methods 
-    	necessary to fulfill API-A requests without regard to:
-			- how the service is exposed
-			- how bytestreams and java types might be marshalled/demarshalled 
-			  over the wire.</comment>
-    <param name="doMediateDatastreams" value="false">
-      <comment>A boolean switch indicating whether Datastream Mediation is 
-	    	activated or not. Datastream Mediation is required if using basic 
-	    	authentication for API-A. When basic authentication is enabled for 
-	    	API-A, backend services used by custom disseminations may or may not be 
-	    	capable of authenticating with the Fedora server. Datastream mediation 
-	    	coupled with the backend service configuration information in the 
-	    	beSecurity.xml file enables the Fedora server to determine which backend 
-	    	services are required to authenticate and which ones are allowed to 
-	    	connect without authentication. Datastream mediation provides additional 
-	    	repository security by not exposing the physical location of Referenced 
-	    	Content datastreams to external mechanisms(services). Instead of 
-	    	exposing the actual physical location of Referenced Content datastreams, 
-	    	Datastream Mediation functions as a proxy requiring all external 
-	    	services to communicate through the Fedora server to resolve the 
-	    	location of Referenced Content datastreams. 
-	
-			IMPORTANT: For Datastream Mediation to function, the Fedora server must 
-			be internet accessible using the configured name for fedoraServerHost 
-			and fedoraServerPort. For example, using the default fedoraServerHost 
-			value of &quot;localhost&quot; will not work if you have remote backend services 
-			since the hostname of &quot;localhost&quot; will not be resolvable as the Fedora 
-			server by the remote backend services. This requirement can be difficult 
-			to satisfy if the Fedora server is located behind a firewall and you do 
-			not have ready access to the firewall&apos;s configuration to enable the 
-			required access. If the Fedora server is behind a firewall and you have 
-			no access to the firewall&apos;s configuration, you are limited to keeping 
-			Datastream Mediation turned off. Note that this will also prevent you 
-			from using basic authentication with API-A. The default value of 
-			doMediateDatastreams is false.</comment>
-    </param>
-  </module>
-  <module role="org.fcrepo.server.access.DynamicAccess" class="org.fcrepo.server.access.DynamicAccessModule">
-    <comment>The dynamic behavior module for the access subsystem. This 
-		implements the methods necessary to fulfill API-A requests without 
-		regard to:
-	        - dynamically associating a default behavior definition and mechanism with objects
-	        - (Future) dynamically associating other behavior definitions and mechanisms
-	          with objects
-	        - running disseminations of dynamic behaviors</comment>
-    <param name="fedora-system:1" value="org.fcrepo.server.access.internalservices.Bootstrap">
-      <comment>The interface that defines the methods of the bootstrap 
-			disseminator. These methods are &quot;built-in&quot; to the Fedora system, and 
-			are dynamically associated with every behavior definition and 
-			behavior mechanism object.</comment>
-    </param>
-    <param name="fedora-system:2" value="org.fcrepo.server.access.internalservices.BootstrapImpl">
-      <comment>The class that implements the methods of the bootstrap 
-			disseminator. These method implementations are &quot;built-in&quot; to the 
-			Fedora system, and are dynamically associated with every behavior 
-			definition and behavior mechanism object. This class can be thought 
-			of as implementing an &quot;internal service&quot; whereas other disseminators 
-			use external services (described by WSDL) to do their work.</comment>
-    </param>
-    <param name="fedora-system:3" value="org.fcrepo.server.access.defaultdisseminator.DefaultDisseminator">
-      <comment>The interface that defines the methods of the default 
-			disseminator. These methods are &quot;built-in&quot; to the Fedora system, and 
-			are dynamically associated with every object.</comment>
-    </param>
-    <param name="fedora-system:4" value="org.fcrepo.server.access.defaultdisseminator.DefaultDisseminatorImpl">
-      <comment>The class that implements the methods of the default 
-			disseminator. These method implementations are &quot;built-in&quot; to the
-            Fedora system, and are dynamically associated with every object.
-            This class can be though of as implementing an &quot;internal service&quot;
-            whereas other disseminators use external services (described by
-            WSDL) to do their work.</comment>
-    </param>
-  </module>
-  <module role="org.fcrepo.server.search.FieldSearch" class="org.fcrepo.server.search.FieldSearchSQLModule">
-    <comment>Supports the API-A simpleSearch and advancedSearch methods.</comment>
-    <param name="indexDCFields" value="true">
-      <comment>(optional, default is true) Whether the content of the DC 
-	    	datastream should be examined and the contents indexed, for each object.
-	        You may wish to save time and space by disabling DC field indexing, 
-	        particularly if you have an external search service (such as Fedora 
-	        Generic Search) that already fulfills this need. 
-	        Note: If you change this value on a Fedora repository that has been 
-	        running for some time, you will need to perform a SQL rebuild using the 
-	        Fedora Rebuilder tool if you want to change objects that have already 
-	        been ingested.</comment>
-    </param>
-    <param name="connectionPool" value="localDerbyPool">
-      <comment>(optional) To make unspecified, comment out or delete the 
-	    	whole param line as opposed to using an empty string,
-            default=ConnectionPoolManager&apos;s default) The connectionPool
-            providing the connection to the database to be used. Warning: When
-            setting these values, keep in mind that while a session is not timed
-            out (maxSecondsPerSession seconds haven&apos;t elapsed, and not all
-            results have been requested), a connection from the pool is tied up.
-            Therefore, the connectionPool should be at least of size n, large
-            enough to accomodate n simultaneous search sessions. The longer
-            maxSecondsPerSession is, the more chance you have of tying up all
-            available connections from the pool. Therefore, keep
-            maxSecondsPerSession fairly low, but still reasonable for an
-            automated program or user to serially get a long list of results,
-            and make sure you have a connectionPool large enough to accomodate
-            your users.</comment>
-    </param>
-    <param name="maxSecondsPerSession" value="500">
-      <comment>(required, must be &gt; 0) 
-            The maximum number of seconds that the server guarantees subsequent
-            search results may be obtained. This is only used in cases where the
-            number of results is greater than maxResults (as specified by the
-            server [above] or the client [in the search request]).</comment>
-    </param>
-    <param name="maxResults" value="100">
-      <comment>(required, must be &gt; 0) 
-            The maximum number of records to 
-            return as the result of a search. Even if a client requests more 
-            results at a time, this is the cutoff value.</comment>
-    </param>
-  </module>
-  <module role="org.fcrepo.server.resourceIndex.ResourceIndex" class="org.fcrepo.server.resourceIndex.ResourceIndexModule">
-    <comment>Supports the ResourceIndex.</comment>
-    <param name="level" value="1">
-      <comment>(required) 
-            Index level. Currently, only 0, and 1 are supported levels. 
-            0 = off and 1 = on.
-            WARNING: changing the level (except to 0) requires 
-            running the Resource Index Rebuilder.</comment>
-    </param>
-    <param name="syncUpdates" value="false">
-      <comment>(optional, default is false)
-            Whether to flush the triple buffer before
-            returning from object modification operations.
-            Specifying this as true will ensure that RI queries 
-            immediately reflect the latest triples.
-            Specifying false will not provide this guarantee,
-            but can significantly reduce roundtrip time for
-            API-M operations (depending on the triplestore 
-            implementation).</comment>
-    </param>
-    <param name="datastore" value="localMulgaraTriplestore">
-      <comment>(required) 
-            Name of the triplestore to use. WARNING: changing the 
-            triplestore running the Resource Index Rebuilder.</comment>
-    </param>
-    <param name="alias:test" value="http://example.org/terms#">
-      <comment>(optional) Aliases that can be used for queries. The param 
-			name of an alias starts with the string &quot;alias:&quot; and is followed by 
-			the name of the alias (shortcut) for the value, which is a URI 
-			prefix. For example: name=&quot;alias:test&quot; 
-			value=&quot;http://example.org/terms#&quot; will allow a query to use 
-			test:apple instead of http://example.org/terms#apple</comment>
-    </param>
-  </module>
-  <module role="org.fcrepo.oai.OAIProvider" class="org.fcrepo.server.oai.FedoraOAIProviderModule">
-    <comment>Description: Exposes the repository for OAI harvesters.</comment>
-    <param name="maxRecords" value="100"/>
-    <param name="friends" value="http://arXiv.org/oai2 http://memory.loc.gov/cgi-bin/oai2_0"/>
-    <param name="adminEmails" value="oai-admin@example.org bob@example.org"/>
-    <param name="repositoryDomainName" value="example.org"/>
-    <param name="maxHeaders" value="100"/>
-    <param name="repositoryName" value="Your Fedora Repository Name Here"/>
-  </module>
-  <module role="org.fcrepo.server.storage.translation.DOTranslator" class="org.fcrepo.server.storage.translation.DOTranslatorModule">
-    <comment>Supports translation from DigitalObject to a stream of some
-		         format, and vice-versa. The parameters below specify
-		         serializer/deserializer classes to be used for a given format. Those
-		         classes must implement the DOSerializer/DODeserializer interfaces.</comment>
-    <param name="serializer_info:fedora/fedora-system:ATOM-1.1" value="org.fcrepo.server.storage.translation.Atom1_1DOSerializer"/>
-    <param name="deserializer_info:fedora/fedora-system:FOXML-1.1" value="org.fcrepo.server.storage.translation.FOXML1_1DODeserializer"/>
-    <param name="serializer_info:fedora/fedora-system:METSFedoraExt-1.0" value="org.fcrepo.server.storage.translation.METSFedoraExt1_0DOSerializer"/>
-    <param name="deserializer_info:fedora/fedora-system:METSFedoraExt-1.1" value="org.fcrepo.server.storage.translation.METSFedoraExt1_1DODeserializer"/>
-    <param name="serializer_info:fedora/fedora-system:METSFedoraExt-1.1" value="org.fcrepo.server.storage.translation.METSFedoraExt1_1DOSerializer"/>
-    <param name="deserializer_info:fedora/fedora-system:METSFedoraExt-1.0" value="org.fcrepo.server.storage.translation.METSFedoraExt1_0DODeserializer"/>
-    <param name="serializer_info:fedora/fedora-system:FOXML-1.0" value="org.fcrepo.server.storage.translation.FOXML1_0DOSerializer"/>
-    <param name="deserializer_info:fedora/fedora-system:ATOMZip-1.1" value="org.fcrepo.server.storage.translation.AtomZip1_1DODeserializer"/>
-    <param name="serializer_info:fedora/fedora-system:FOXML-1.1" value="org.fcrepo.server.storage.translation.FOXML1_1DOSerializer"/>
-    <param name="deserializer_info:fedora/fedora-system:ATOM-1.1" value="org.fcrepo.server.storage.translation.Atom1_1DODeserializer"/>
-    <param name="deserializer_info:fedora/fedora-system:FOXML-1.0" value="org.fcrepo.server.storage.translation.FOXML1_0DODeserializer"/>
-    <param name="serializer_info:fedora/fedora-system:ATOMZip-1.1" value="org.fcrepo.server.storage.translation.AtomZip1_1DOSerializer"/>
-  </module>
-  <module role="org.fcrepo.server.management.PIDGenerator" class="org.fcrepo.server.management.BasicPIDGenerator">
-    <comment>The pid generator.</comment>
-    <param name="pidgen_log_dir" value="pidgen"/>
-  </module>
-  <module role="org.fcrepo.server.messaging.Messaging" class="org.fcrepo.server.messaging.MessagingModule">
-    <comment>Fedora's Java Messaging Service (JMS) Module</comment>
-    <param name="enabled" value="true"/>
-    <param name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
-    <param name="java.naming.provider.url" value="vm:(broker:(tcp://localhost:61616))"/>
-    <param name="datastore1" value="apimUpdateMessages">
-      <comment>A datastore representing a JMS Destination for APIM events which update the repository</comment>
-    </param>
-    <param name="datastore2" value="apimAccessMessages">
-      <comment>A datastore representing a JMS Destination for APIM events which do not update the repository</comment>
-    </param>
-  </module>
-  <module role="org.fcrepo.server.storage.ConnectionPoolManager" class="org.fcrepo.server.storage.ConnectionPoolManagerImpl">
-    <comment>This module facilitates obtaining ConnectionPools</comment>
-    <param name="defaultPoolName" value="localDerbyPool"/>
-    <param name="poolNames" value="localDerbyPool"/>
-  </module>
-  <module role="org.fcrepo.server.validation.DOValidator" class="org.fcrepo.server.validation.DOValidatorModule">
-    <comment>Description: Supports validation of digital objects, including
-             XML Schema validation, Schematron validation (to Fedora Rules schema
-             written in Schematron language), and other programatic validation
-             including referential integrity checking of existence and
-             availability of distributed data and/or services.</comment>
-    <param name="tempDir" value="work">
-      <comment>(required)
-            This is a directory that the validation module can use as a work space, as
-            when it must write a temporary file.</comment>
-    </param>
-    <param name="rules_info:fedora/fedora-system:ATOM-1.1" value="schematron/atom-bogus.xml">
-      <comment>The local path to the Schematron Rules used for 
-            Fedora-specific on Atom XML files.</comment>
-    </param>
-    <param name="schtron_preprocessor" value="schematron/preprocessor.xslt"/>
-    <param name="rules_info:fedora/fedora-system:ATOMZip-1.1" value="schematron/atom-bogus.xml">
-      <comment>The local path to the Schematron Rules used for 
-            Fedora-specific on Atom Zip files.</comment>
-    </param>
-    <param name="rules_info:fedora/fedora-system:FOXML-1.1" value="schematron/foxmlRules1-1.xml">
-      <comment>The local path to the Schematron Rules used for 
-			Fedora-specific validation on FOXML 1.1 XML files.</comment>
-    </param>
-    <param name="rules_info:fedora/fedora-system:FOXML-1.0" value="schematron/foxmlRules1-0.xml">
-      <comment>The local path to the Schematron Rules used for 
-    		Fedora-specific validation on FOXML 1.0 XML files.</comment>
-    </param>
-    <param name="xsd_info:fedora/fedora-system:METSFedoraExt-1.1" value="xsd/mets-fedora-ext1-1.xsd">
-      <comment>The local path for the Fedora-METS XML
-			schema used to do XML schema validation of digital objects.</comment>
-    </param>
-    <param name="xsd_info:fedora/fedora-system:METSFedoraExt-1.0" value="xsd/mets-fedora-ext.xsd">
-      <comment>The local path for the Fedora-METS 1.0 XML
-            schema used to do XML schema validation of digital objects.</comment>
-    </param>
-    <param name="xsd_xacml_policy1.0" value="xsd/cs-xacml-schema-policy-1.0.xsd">
-      <comment>The local path for the OASIS XACML XML policy schema 
-			used to do XML schema validation of XACML policies.</comment>
-    </param>
-    <param name="xsd_info:fedora/fedora-system:FOXML-1.1" value="xsd/foxml1-1.xsd">
-      <comment>The local path for the Fedora FOXML 1.1 XML schema
-             used to do XML schema validation of digital objects</comment>
-    </param>
-    <param name="xsd_info:fedora/fedora-system:FOXML-1.0" value="xsd/foxml1-0.xsd">
-      <comment>The local path for the Fedora FOXML 1.0 XML schema
-             used to do XML schema validation of digital objects</comment>
-    </param>
-    <param name="xsd_info:fedora/fedora-system:ATOM-1.1" value="xsd/atom.xsd">
-      <comment>The local path for the Atom XML schema used to do XML 
-			schema validation of digital objects</comment>
-    </param>
-    <param name="rules_info:fedora/fedora-system:METSFedoraExt-1.0" value="schematron/metsExtRules1-0.xml">
-      <comment>The local path to the Schematron Rules used for 
-			Fedora-specific validation on Fedora-METS 1.0 XML files.</comment>
-    </param>
-    <param name="xsd_info:fedora/fedora-system:ATOMZip-1.1" value="xsd/atom.xsd">
-      <comment>The local path for the Atom XML schema used to do XML 
-			schema validation of digital objects</comment>
-    </param>
-    <param name="rules_info:fedora/fedora-system:METSFedoraExt-1.1" value="schematron/metsExtRules1-1.xml">
-      <comment>The local path to the Schematron Rules used for 
-			Fedora-specific validation on Fedora-METS XML files.</comment>
-    </param>
-  </module>
-  <module role="org.fcrepo.server.storage.ExternalContentManager" class="org.fcrepo.server.storage.DefaultExternalContentManager">
-    <comment>This module facilitates obtaining external content via HTTP</comment>
-  </module>
-  <datastore id="localMySQLPool">
-    <comment>MySQL database on localhost with db name of fedora3. Each
-             connection pool instance has several configuration parameter that
-             can be used to tune the options for the connection pool. It is
-             recommended that you not change the default values unless you are
-             trying to address a specific performance issue. For additional
-             information regarding connection pool options, refer to the Apache
-             Commons Pool API documentation at
-             http://jakarta.apache.org/commons/pool/apidocs/index.html.</comment>
-    <param name="maxIdle" value="10">
-      <comment>The maximum number of idle instances in pool.</comment>
-    </param>
-    <param name="testOnBorrow" value="true">
-      <comment>When true objects are validated before borrowed from the 
-			pool.</comment>
-    </param>
-    <param name="testWhileIdle" value="true">
-      <comment>When true, objects are validated by the idle object evictor 
-			thread.</comment>
-    </param>
-    <param name="validationQuery" value="select 1">
-      <comment>The query to run when validating connections.
-            Connections are validated according to the testOnBorrow,
-            testOnReturn, and testWhileIdle configuration values.
-            If this is specified, it must be a SQL SELECT statement
-            that returns at least one row.  If this is NOT specified,
-            validation tests will not be run.</comment>
-    </param>
-    <param name="ddlConverter" value="org.fcrepo.server.utilities.MySQLDDLConverter"/>
-    <param name="dbUsername" value="fedoraAdmin">
-      <comment>The database user name.</comment>
-    </param>
-    <param name="testOnReturn" value="true">
-      <comment>When true, objects are validated before returned to the 
-			pool.</comment>
-    </param>
-    <param name="maxActive" value="100">
-      <comment>The maximum number of active instances in pool.</comment>
-    </param>
-    <param name="dbPassword" value="fedoraAdmin">
-      <comment>The database password.</comment>
-    </param>
-    <param name="jdbcURL" value="jdbc:mysql://localhost/fedora3?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true">
-      <comment>The JDBC connection URL.</comment>
-    </param>
-    <param name="whenExhaustedAction" value="1">
-      <comment>Action to take when a new object is requested and the the pool has
-            reached maximum number of active objects. Valid values are:
-				0 (fail i.e., throw Exception) 
-				1 (block i.e., wait until pool resources are freed) 
-				2 (grow i.e., increase the size of the pool).</comment>
-    </param>
-    <param name="numTestsPerEvictionRun" value="3">
-      <comment>The number of objects to be examined on each run of idle 
-			evictor thread (if applicable). A value less than zero indicates 
-			that ceil(numIdle)/abs(numTestsPerEvictionRun) will be run.</comment>
-    </param>
-    <param name="jdbcDriverClass" value="com.mysql.jdbc.Driver">
-      <comment>The JDBC driver class name.</comment>
-    </param>
-    <param name="maxWait" value="-1">
-      <comment>The maximum amount of time in milliseconds the 
-			borrowObject() method should wait before throwing an Exception when 
-            whenExhaustedAction is set to WHEN_EXHAUSTED_BLOCK. A value less 
-            than zero indicates block indefinitely.</comment>
-    </param>
-    <param name="minIdle" value="0">
-      <comment>The minimum of idle instances in pool.</comment>
-    </param>
-    <param name="minEvictableIdleTimeMillis" value="1800000">
-      <comment>The minimum amount of time in milliseconds an object can be 
-			idle in pool before eligible for eviction (if applicable). A value 
-            less than zero indicates no object will be evicted due to idle time 
-            alone.</comment>
-    </param>
-    <param name="timeBetweenEvictionRunsMillis" value="-1">
-      <comment>The time in milliseconds to sleep between runs of the idle 
-			object evictor thread. A value less than zero indicates no idle 
-			evictor thread is run.</comment>
-    </param>
-  </datastore>
-  <datastore id="localDerbyPool">
-    <comment>Derby database on localhost running on port 1527 Each
-            connection pool instance has several configuration parameter that
-            can be used to tune the options for the connection pool. It is
-            recommended that you not change the default values unless you are
-            trying to address a specific performance issue. For additional
-            information regarding connection pool options, refer to the Apache
-            Commons Pool API documentation at
-            http://jakarta.apache.org/commons/pool/apidocs/index.html.</comment>
-    <param name="maxIdle" value="10">
-      <comment>The maximum number of idle instances in pool.</comment>
-    </param>
-    <param name="testOnBorrow" value="true">
-      <comment>When true objects are validated before borrowed from the 
-            pool.</comment>
-    </param>
-    <param name="testWhileIdle" value="true">
-      <comment>When true, objects are validated by the idle object evictor 
-            thread.</comment>
-    </param>
-    <param name="ddlConverter" value="org.fcrepo.server.utilities.DerbyDDLConverter"/>
-    <param name="dbUsername" value="fedoraAdmin">
-      <comment>The database user name.</comment>
-    </param>
-    <param name="testOnReturn" value="true">
-      <comment>When true, objects are validated before returned to the 
-            pool.</comment>
-    </param>
-    <param name="maxActive" value="100">
-      <comment>The maximum number of active instances in pool.</comment>
-    </param>
-    <param name="dbPassword" value="fedoraAdmin">
-      <comment>The database password.</comment>
-    </param>
-    <param name="jdbcURL" value="jdbc:derby:@GSDL3SRCHOME@/ext/fedora3/derby/fedora3;create=true">
-      <comment>The JDBC connection URL.</comment>
-    </param>
-    <param name="whenExhaustedAction" value="1">
-      <comment>Action to take when a new object is requested and the the pool has
-            reached maximum number of active objects. Valid values are:
-                0 (fail i.e., throw Exception) 
-                1 (block i.e., wait until pool resources are freed) 
-                2 (grow i.e., increase the size of the pool).</comment>
-    </param>
-    <param name="numTestsPerEvictionRun" value="3">
-      <comment>The number of objects to be examined on each run of idle 
-            evictor thread (if applicable). A value less than zero indicates 
-            that ceil(numIdle)/abs(numTestsPerEvictionRun) will be run.</comment>
-    </param>
-    <param name="jdbcDriverClass" value="org.apache.derby.jdbc.EmbeddedDriver">
-      <comment>The JDBC driver class name.</comment>
-    </param>
-    <param name="maxWait" value="-1">
-      <comment>The maximum amount of time in milliseconds the 
-            borrowObject() method should wait before throwing an Exception when 
-            whenExhaustedAction is set to WHEN_EXHAUSTED_BLOCK. A value less 
-            than zero indicates block indefinitely.</comment>
-    </param>
-    <param name="minIdle" value="0">
-      <comment>The minimum of idle instances in pool.</comment>
-    </param>
-    <param name="minEvictableIdleTimeMillis" value="1800000">
-      <comment>The minimum amount of time in milliseconds an object can be 
-            idle in pool before eligible for eviction (if applicable). A value 
-            less than zero indicates no object will be evicted due to idle time 
-            alone.</comment>
-    </param>
-    <param name="timeBetweenEvictionRunsMillis" value="-1">
-      <comment>The time in milliseconds to sleep between runs of the idle 
-            object evictor thread. A value less than zero indicates no idle 
-            evictor thread is run.</comment>
-    </param>
-  </datastore>
-  <datastore id="localOraclePool">
-    <comment>Oracle database on localhost with SID=fedora3 Each
-            connection pool instance has several configuration parameter that
-            can be used to tune the options for the connection pool. It is
-            recommended that you not change the default values unless you are
-            trying to address a specific performance issue. For additional
-            information regarding connection pool options, refer to the Apache
-            Commons Pool API documentation at
-            http://jakarta.apache.org/commons/pool/apidocs/index.html.</comment>
-    <param name="maxIdle" value="10">
-      <comment>The maximum number of idle instances in pool.</comment>
-    </param>
-    <param name="testOnBorrow" value="true">
-      <comment>When true objects are validated before borrowed from the 
-			pool.</comment>
-    </param>
-    <param name="testWhileIdle" value="true">
-      <comment>When true, objects are validated by the idle object evictor 
-			thread.</comment>
-    </param>
-    <param name="validationQuery" value="select &apos;validationQuery&apos; from dual">
-      <comment>The query to run when validating connections.
-            Connections are validated according to the testOnBorrow,
-            testOnReturn, and testWhileIdle configuration values.
-            If this is specified, it must be a SQL SELECT statement
-            that returns at least one row.  If this is NOT specified,
-            validation tests will not be run.</comment>
-    </param>
-    <param name="ddlConverter" value="org.fcrepo.server.utilities.OracleDDLConverter"/>
-    <param name="dbUsername" value="fedoraAdmin">
-      <comment>The database user name.</comment>
-    </param>
-    <param name="connection.SetBigStringTryClob" value="true"/>
-    <param name="testOnReturn" value="true">
-      <comment>When true, objects are validated before returned to the 
-			pool.</comment>
-    </param>
-    <param name="maxActive" value="100">
-      <comment>The maximum number of active instances in pool.</comment>
-    </param>
-    <param name="dbPassword" value="fedoraAdmin">
-      <comment>The database password.</comment>
-    </param>
-    <param name="jdbcURL" value="jdbc:oracle:thin:@localhost:1521:fedora3">
-      <comment>The JDBC connection URL.</comment>
-    </param>
-    <param name="whenExhaustedAction" value="1">
-      <comment>Action to take when a new object is requested and the the pool has
-            reached maximum number of active objects. Valid values are:
-				0 (fail i.e., throw Exception) 
-				1 (block i.e., wait until pool resources are freed) 
-				2 (grow i.e., increase the size of the pool).</comment>
-    </param>
-    <param name="numTestsPerEvictionRun" value="3">
-      <comment>The number of objects to be examined on each run of idle 
-			evictor thread (if applicable). A value less than zero indicates 
-			that ceil(numIdle)/abs(numTestsPerEvictionRun) will be run.</comment>
-    </param>
-    <param name="jdbcDriverClass" value="oracle.jdbc.OracleDriver">
-      <comment>The JDBC driver class name.</comment>
-    </param>
-    <param name="maxWait" value="-1">
-      <comment>The maximum amount of time in milliseconds the 
-			borrowObject() method should wait before throwing an Exception when 
-            whenExhaustedAction is set to WHEN_EXHAUSTED_BLOCK. A value less 
-            than zero indicates block indefinitely.</comment>
-    </param>
-    <param name="minIdle" value="0">
-      <comment>The minimum of idle instances in pool.</comment>
-    </param>
-    <param name="minEvictableIdleTimeMillis" value="1800000">
-      <comment>The minimum amount of time in milliseconds an object can be 
-			idle in pool before eligible for eviction (if applicable). A value 
-            less than zero indicates no object will be evicted due to idle time 
-            alone.</comment>
-    </param>
-    <param name="timeBetweenEvictionRunsMillis" value="-1">
-      <comment>The time in milliseconds to sleep between runs of the idle 
-			object evictor thread. A value less than zero indicates no idle 
-			evictor thread is run.</comment>
-    </param>
-  </datastore>
-  <datastore id="localPostgreSQLPool">
-    <comment>PostgreSQL database on localhost with db name of fedora3. Each
-             connection pool instance has several configuration parameter that
-             can be used to tune the options for the connection pool. It is
-             recommended that you not change the default values unless you are
-             trying to address a specific performance issue. For additional
-             information regarding connection pool options, refer to the Apache
-             Commons Pool API documentation at
-             http://jakarta.apache.org/commons/pool/apidocs/index.html.</comment>
-    <param name="maxIdle" value="10">
-      <comment>The maximum number of idle instances in pool.</comment>
-    </param>
-    <param name="testOnBorrow" value="true">
-      <comment>When true objects are validated before borrowed from the 
-			pool.</comment>
-    </param>
-    <param name="testWhileIdle" value="true">
-      <comment>When true, objects are validated by the idle object evictor 
-			thread.</comment>
-    </param>
-    <param name="validationQuery" value="select 1">
-      <comment>The query to run when validating connections.
-            Connections are validated according to the testOnBorrow,
-            testOnReturn, and testWhileIdle configuration values.
-            If this is specified, it must be a SQL SELECT statement
-            that returns at least one row.  If this is NOT specified,
-            validation tests will not be run.</comment>
-    </param>
-    <param name="ddlConverter" value="org.fcrepo.server.utilities.PostgresDDLConverter"/>
-    <param name="dbUsername" value="fedoraAdmin">
-      <comment>The database user name.</comment>
-    </param>
-    <param name="testOnReturn" value="true">
-      <comment>When true, objects are validated before returned to the 
-			pool.</comment>
-    </param>
-    <param name="maxActive" value="100">
-      <comment>The maximum number of active instances in pool.</comment>
-    </param>
-    <param name="dbPassword" value="fedoraAdmin">
-      <comment>The database password.</comment>
-    </param>
-    <param name="jdbcURL" value="jdbc:postgresql:fedora3">
-      <comment>The JDBC connection URL.</comment>
-    </param>
-    <param name="whenExhaustedAction" value="1">
-      <comment>Action to take when a new object is requested and the the pool has
-            reached maximum number of active objects. Valid values are:
-				0 (fail i.e., throw Exception) 
-				1 (block i.e., wait until pool resources are freed) 
-				2 (grow i.e., increase the size of the pool).</comment>
-    </param>
-    <param name="numTestsPerEvictionRun" value="3">
-      <comment>The number of objects to be examined on each run of idle 
-			evictor thread (if applicable). A value less than zero indicates 
-			that ceil(numIdle)/abs(numTestsPerEvictionRun) will be run.</comment>
-    </param>
-    <param name="jdbcDriverClass" value="org.postgresql.Driver">
-      <comment>The JDBC driver class name.</comment>
-    </param>
-    <param name="maxWait" value="-1">
-      <comment>The maximum amount of time in milliseconds the 
-			borrowObject() method should wait before throwing an Exception when 
-            whenExhaustedAction is set to WHEN_EXHAUSTED_BLOCK. A value less 
-            than zero indicates block indefinitely.</comment>
-    </param>
-    <param name="minIdle" value="0">
-      <comment>The minimum of idle instances in pool.</comment>
-    </param>
-    <param name="minEvictableIdleTimeMillis" value="1800000">
-      <comment>The minimum amount of time in milliseconds an object can be 
-			idle in pool before eligible for eviction (if applicable). A value 
-            less than zero indicates no object will be evicted due to idle time 
-            alone.</comment>
-    </param>
-    <param name="timeBetweenEvictionRunsMillis" value="-1">
-      <comment>The time in milliseconds to sleep between runs of the idle 
-			object evictor thread. A value less than zero indicates no idle 
-			evictor thread is run.</comment>
-    </param>
-  </datastore>
-  <datastore id="localMulgaraTriplestore">
-    <comment>local Mulgara Triplestore used by the Resource Index</comment>
-    <param name="poolInitialSize" value="3">
-      <comment>The initial size of the session pool used for queries. 
-			Note: A value of 0 will cause the Resource Index to operate in 
-			synchronized mode: concurrent read/write requests are put in a queue 
-			and handled in FIFO order; this will severely impair performance and 
-			is only intended for debugging.</comment>
-    </param>
-    <param name="bufferSafeCapacity" value="40000">
-      <comment>The maximum size the buffer can reach before being forcibly 
-			flushed. If this threshold is reached, flushing will occur in the 
-			foreground and the buffer will be locked for writing until it is 
-			finished. This should be larger than autoFlushBufferSize.</comment>
-    </param>
-    <param name="autoCreate" value="true">
-      <comment>Create the model if it doesn&apos;t already exist. 
-			At startup, the model will be automatically created. In addition, an 
-			XML schema datatyped model named &quot;xsd&quot; will also be automatically 
-			created.</comment>
-    </param>
-    <param name="bufferFlushBatchSize" value="20000">
-      <comment>The number of updates to send to the triplestore at a time. 
-			This should be the same size as, or smaller than 
-			autoFlushBufferSize.</comment>
-    </param>
-    <param name="autoTextIndex" value="false">
-      <comment>Whether to propagate adds/deletes to a full-text 
-			[Full-Text] model automatically. While a very useful feature, 
-			enabling full-text indexing adds significantly to object ingest 
-			times. If true, the text model will be named modelName-fullText. 
-			Note that if this is true and autoCreate is true, the text model 
-			will also be created if it doesn&apos;t already exist.</comment>
-    </param>
-    <param name="poolMaxGrowth" value="-1">
-      <comment>Maximum number of additional sessions the pool may add. If 
-			specified as -1, no limit will be placed on pool growth.</comment>
-    </param>
-    <param name="remote" value="false">
-      <comment>Tells the connector to communicate with Mulgara in remote or 
-			local mode. If true, the host parameter must be defined. If false,
-			the path parameter must be defined.</comment>
-    </param>
-    <param name="autoFlushDormantSeconds" value="5">
-      <comment>Seconds of buffer inactivity that will trigger an 
-			auto-flush. If this threshold is reached, flushing will occur in the 
-			background, during which time the buffer is still available for 
-			writing.</comment>
-    </param>
-    <param name="serverName" value="fedora">
-      <comment>The server name for rmi binding.</comment>
-    </param>
-    <param name="autoFlushBufferSize" value="20000">
-      <comment>The size at which the buffer should be auto-flushed. If 
-			this threshold is reached, flushing will occur in the background, 
-			during which time the buffer is still available for 
-			writing.</comment>
-    </param>
-    <param name="modelName" value="ri">
-      <comment>The name of the model to use.</comment>
-    </param>
-    <param name="readOnly" value="false">
-      <comment>Whether the triplestore should be read-only. Most Fedora 
-			repositories will set this to false.</comment>
-    </param>
-    <param name="path" value="data/resourceIndex" isFilePath="true">
-      <comment>The local path to the main triplestore directory.</comment>
-    </param>
-    <param name="connectorClassName" value="org.trippi.impl.mulgara.MulgaraConnector">
-      <comment>The name of the Trippi Connector class used to communicate 
-			with the triplestore.</comment>
-    </param>
-  </datastore>
-  <datastore id="localPostgresMPTTriplestore">
-    <comment>Example local MPTStore backed by Postgres.
-		  To use this triplestore for the Resource Index:
-		  1) In fedora.fcfg, change the "datastore" parameter of the
-		     ResourceIndex module to localPostgresMPTTriplestore.
-		  2) Login to your Postgres server as an administrative user and
-		     run the following commands:
-		       CREATE ROLE "fedoraAdmin" LOGIN PASSWORD 'fedoraAdmin'
-		         NOINHERIT CREATEDB
-		         VALID UNTIL 'infinity';
-		       CREATE DATABASE "riTriples"
-		         WITH ENCODING='SQL_ASCII'
-		         OWNER="fedoraAdmin";
-		  3) Make sure you can login to your Postgres server as fedoraAdmin.
-		  4) Download the appropriate Postgres JDBC 3 driver from 
-		     http://jdbc.postgresql.org/download.html
-		     and make sure it's accessible to your servlet container.
-		     If you're running Tomcat, putting it in common/lib/ will work.</comment>
-    <param name="fetchSize" value="1000"/>
-    <param name="poolInitialSize" value="3"/>
-    <param name="bufferSafeCapacity" value="2000"/>
-    <param name="bufferFlushBatchSize" value="1000"/>
-    <param name="backslashIsEscape" value="true"/>
-    <param name="autoFlushDormantSeconds" value="5"/>
-    <param name="password" value="fedoraAdmin"/>
-    <param name="autoFlushBufferSize" value="1000"/>
-    <param name="username" value="fedoraAdmin"/>
-    <param name="poolMaxSize" value="10"/>
-    <param name="jdbcURL" value="jdbc:postgresql://localhost/riTriples"/>
-    <param name="ddlGenerator" value="org.nsdl.mptstore.impl.postgres.PostgresDDLGenerator"/>
-    <param name="connectorClassName" value="org.trippi.impl.mpt.MPTConnector"/>
-    <param name="jdbcDriver" value="org.postgresql.Driver"/>
-  </datastore>
-  <datastore id="apimUpdateMessages">
-    <comment>Messaging Destination for API-M events which update the repository</comment>
-    <param name="messageTypes" value="apimUpdate">
-      <comment>A space-separated list of message types that will be 
-            delivered to this Destination. Currently, &quot;apimUpdate&quot; and 
-            &quot;apimAccess&quot; are the only supported message types.</comment>
-    </param>
-    <param name="name" value="fedora.apim.update"/>
-    <param name="type" value="topic">
-      <comment>Optional, defaults to topic.</comment>
-    </param>
-  </datastore>
-  <datastore id="apimAccessMessages">
-    <comment>Messaging Destination for API-M events which did not make changes to the repository</comment>
-    <param name="messageTypes" value="apimAccess">
-      <comment>A space-separated list of message types that will be 
-            delivered to this Destination. Currently, &quot;apimUpdate&quot; and 
-            &quot;apimAccess&quot; are the only supported message types.</comment>
-    </param>
-    <param name="name" value="fedora.apim.access"/>
-    <param name="type" value="topic">
-      <comment>Optional, defaults to topic.</comment>
-    </param>
-  </datastore>
-</server>
Index: gs3-extensions/fedora/fedora-files/install.properties.in
===================================================================
--- gs3-extensions/fedora/fedora-files/install.properties.in	(revision 26412)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#Install Options
-#Fri Oct 19 15:27:22 NZDT 2012
-ri.enabled=true
-messaging.enabled=true
-apia.auth.required=false
-database.jdbcDriverClass=org.apache.derby.jdbc.EmbeddedDriver
-upstream.auth.enabled=false
-ssl.available=false
-database.jdbcURL=jdbc\:derby\:@GSDL3SRCHOME@/ext/fedora3/derby/fedora3;create\=true
-messaging.uri=vm\:(broker\:(tcp\://localhost\:61616))
-database.password=fedoraAdmin
-database.username=fedoraAdmin
-fesl.authz.enabled=false
-tomcat.shutdown.port=@tomcatshutdownport@
-deploy.local.services=true
-xacml.enabled=false
-tomcat.http.port=@tomcatport@
-fedora.serverHost=@tomcatserver@
-database=included
-database.driver=included
-fedora.serverContext=fedora
-llstore.type=akubra-fs
-tomcat.home=@GSDL3SRCHOME@/packages/tomcat
-fedora.home=@FEDORA_HOME@
-install.type=custom
-servlet.engine=existingTomcat
-fedora.admin.pass=@fedorapassw@
Index: gs3-extensions/fedora/fedora.xml.in
===================================================================
--- gs3-extensions/fedora/fedora.xml.in	(revision 26412)
+++ 	(revision )
@@ -1,4 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Context>
-  <Parameter name="fedora.home" value="@GSDL3SRCHOME@/ext/fedora3" />
-</Context>
Index: gs3-extensions/fedora/trunk/src/README
===================================================================
--- gs3-extensions/fedora/trunk/src/README	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/README	(revision 26413)
@@ -0,0 +1,590 @@
+********************************************************************************************************************
+							CONTENTS
+********************************************************************************************************************
+
+A. To install your GS3 Fedora extension from fedora3-gs3ext.tar.gz
+
+B. How to manually build fedora collections
+
+C. The customisations that have been made for the extension
+
+D. How to manually set up Fedora 3.6.1 with Fedora GSearch 2.5 from scratch
+	Installing Fedora
+	Installing Fedora GSearch
+	Debugging
+
+
+Version:
+Greenstone 3.05
+Fedora 3.6.1
+Fedora GSearch 2.5
+
+Web services pages once installed: 
+http://localhost:8383/fedora/services
+http://localhost:8383/fedoragsearch/services
+
+-- ak19, 2012
+
+
+
+********************************************************************************************************************
+	A. To install your Fedora extension for Greenstone 3 from the fedora3-gs3ext.tar.gz distribution file
+********************************************************************************************************************
+
+(Tested to work on Linux machines.)
+
+0. You will need Greenstone 3.05 or a fresh checkout from SVN, already installed.
+
+1. Download the Fedora Extension for Greenstone 3: http://trac.greenstone.org/browser/gs3-extensions/fedora/fedora3-gs3ext.tar.gz
+
+2. Save into your Greenstone3/ext folder
+
+3. Untar and decompress it:
+	$ tar -xvzf fedora3-gs3ext.tar.gz
+
+4. This will create a fedora3 folder in your Greenstone3/ext folder. 
+
+5. Open Greenstone3/build.properties and find the section:
+
+	##These need to be uncommented if using Fedora and Fedora GSearch with Greenstone's tomcat
+	fedora.home=#${basedir}/ext/fedora3
+	#fedora.maxpermsize=-XX:MaxPermSize=128m
+	#fedora.password=pounamu
+
+Uncomment all these properties and change the value for the fedora password if necessary:
+
+	##These need to be uncommented if using Fedora and Fedora GSearch with Greenstone's tomcat
+	fedora.home=${basedir}/ext/fedora3
+	fedora.maxpermsize=-XX:MaxPermSize=128m
+	fedora.password=pounamu		
+
+
+6. Use a terminal to go into this folder:
+	$ cd Greenstone3/ext/fedora3
+
+7. If you type `ant` in the x-term, it will print the Usage message which will display the list of commands available and the order in which to execute them for proper installation. It's a 5 step process (explained in detail further below):
+
+	$ ant -Dgsdl3.home=<type-full-path-to-your-gs3> start-fedora-install
+
+	$ ant start
+
+	$ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> continue-fedora-install
+
+	$ ant stop
+
+	$ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> finish-fedora-install
+
+
+That's it. 
+Now you can start tomcat again and visit http://localhost:8383/fedora and http://localhost:8383/fedoragsearch/rest to check the pages display.
+
+8. You can start creating Greenstone Fedora collections with FLI. Run FLI from the GS3 toplevel folder by typing:
+	$ ./gli/fli.sh
+
+
+
+DETAILS ON STEP 7:
+a. From your Greenstone3/ext/fedora3 folder, run:
+	$ ant -Dgsdl3.home=<type-full-path-to-your-gs3> start-fedora-install
+
+This step prepares the fedora and gsearch war files for deployment (by customising template files) and moves them into Greenstone 3's tomcat.
+
+b. Start tomcat by going into your GS3 toplevel folder and running: 
+	$ ant start
+
+This step gets Greenstone's tomcat to deploy the fedora and fedoragsearch war files.
+You may want to check your Greenstone library is working by visiting http://localhost:8383/greenstone3 in your browser
+
+c. Go back into Greenstone3/ext/fedora3 and run:
+	$ ant -Dgsdl3src.home=<type-full-path-to-your-gs3> continue-fedora-install
+
+This target configures fedora-gsearch now that it has been deployed. It runs a fedora-gsearch ant build file to customise properties files that are internal to fedora-gsearch.
+
+d. Stop tomcat by going back into your GS3 toplevel folder and running: 
+	$ ant stop
+
+You may want to check java instances running tomcat have indeed stopped:
+	$ ps aux | grep tomcat
+
+You will need to kill the process if any tomcat is still running at this stage (this can happen if you accidentally start tomcat several times in succession without stopping it).
+	$ kill -9 <process-id> 
+
+e. Now that tomcat has stopped, go back into Greenstone3/ext/fedora3 and run:
+	ant -Dgsdl3src.home=<Full-Path-To-GS3> finish-fedora-install
+
+This will clean up the extension's war files in tomcat/packages/webapps now that they have already been deployed. (Do not perform this final step when tomcat is still running, else your fedora extension webapps will become undeployed.)
+
+
+
+When installation is completed, there will be a fedora3 folder in Greenstone3/ext, which you should not delete, since the Fedora Digital objects will be stored here, and the FedoraGSearch index will be created here. 
+
+Further, the Fedora extension installation process would have made tomcat deploy several webapps in packages/tomcat/webapps. The resulting folders are:
+- fedora
+- fedora-demo
+- fedoragsearch
+- fop
+- imagemanip
+- saxon
+
+(Note that the installation process will have removed the Fedora extension war files it put into packages/tomcat/webapps during installation.)
+
+
+
+********************************************************************************************************************
+					B. Manual building of fedora collections
+********************************************************************************************************************
+
+You can use FLI to create, build and preview Fedora collections using Greenstone.
+ 
+The same can be done manually by calling the g2f perl scripts from the command line.
+
+1. Fedora needs to be running, so ensure the Greenstone tomcat is running:
+	ant start
+
+2. Set up the GS3 environment:
+	source gs3-setup.bash
+
+3. Create a new collection with mkcol.pl. Call it "fedora1" for example 
+	mkcol.pl -collectdir /<GS3>/web/sites/localsite/collect fedora1
+
+4. Run import and build to ingest the new collection
+
+- First put the documents you want into the import directory of your new collection.
+
+- g2f-import.pl -hostname localhost -port 8383 -password pounamu -removeold -collectdir /<GS3>/web/sites/localsite/collect fedora1
+(password may be optional at this stage, by include it for convenience)
+
+- g2f-buildcol.pl -hostname localhost -port 8383 -password pounamu -removeold -collectdir /<GS3>/web/sites/localsite/collect fedora1
+
+
+5. If building the GS3 demo collection as a fedora collection:
+ 
+- use FLI to transfer dls to dc metadata upon Gathering the documents.
+- then before building, turn on the description_tags in the HTMLPlugin.
+
+
+IMPORTANT NOTE: Fedora GSearch for some reason doesn't like the images in the default GS3 demo collection and is unable to index the documents because of them.
+If using the default GS3 demo collection, all the images -- both png and jpg alike -- need to first be resaved as their respective file types.
+Use Imagemagick to resave the many pngs, by going into each document's subfolder of the import folder and running:
+	mogrify -format png *.png
+
+Also open each folder's jpg document cover image in GIMP and resave under the same name (at 100% quality).
+
+
+6. If you ran FLI, exit it. It should stop the Greenstone server.
+
+With fedora installed, it's always good to check that the java process that launched tomcat has indeed stopped:
+	ps aux | grep "tomcat"
+
+(Since things will fail if multiple instances of this same tomcat are running, kill any java processes that are referring to tomcat.)
+
+7. Create an index folder in the new fedora collection folder. Create a buildConfig.xml file in it containing the following:
+
+<buildConfig> 
+  <metadataList/>
+  <serviceRackList>                                                            
+    <serviceRack name="FedoraServiceProxy" />
+  </serviceRackList>
+</buildConfig>
+
+
+8. Restart the GS3 server.
+	ant start
+
+9. Visit the collection from the Greenstone collections page
+
+10. Deleting a Fedora GS3 collection requires the collection's documents and the collection file to be purged from the Fedora repository and removed from the Fedora Gsearch index. (In the case of a normal GS3 collection, just the GS3 collection's directory will be deleted.) There's now a script to delete a Greenstone Fedora collection which will take care of these additional steps if you are manually managing your collections. (FLI calls this script when a collection is deleted from FLI.)
+
+Deleting a Fedora GS3 collection is accomplished with the following 2 steps:
+- Run the g2f-deletecol.pl script over the collection to be deleted. Assuming the collection is called fedora1, you'd run:
+	g2f-deletecol.pl -hostname localhost -port 8383 -password pounamu -collectdir /<GS3>/web/sites/localsite/collect fedora1
+- manually delete the Greenstone collection directory from the filesystem
+
+
+To run this manually, 
+- first remove the pids from the GSearch index:
+/<GS3>/packages/tomcat/webapps/fedoragsearch/client>/<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex deletePID greenstone:fedora1-HASH010313b14474bc72b296b15f
+
+It will ask for the fedoragsearch username and password, which by default are fedoraAdmin and pounamu, respectively.
+
+- then purge the necessary documents (pids) from the fedora repository:
+/<GS3>/ext/fedora3/client/bin>./fedora-purge.sh localhost:8383 fedoraAdmin pounamu greenstone:fedora1-HASHe14e36cba08bd41c663237 http "purging"
+
+- You can check it's all been deleted by visiting http://localhost:8383/fedora/search 
+and searching for:
+
+greenstone:*
+or greenstone:<colname>*
+
+Visit http://localhost:8383/fedoragsearch/rest?operation=browseIndex
+and browse the PID field
+
+You can also visit http://localhost:8383/fedoragsearch/rest?operation=gfindObjects
+then you can search for a query term by prefixing the index field to it, e.g ds.fulltext:computers 
+
+
+********************************************************************************************************************
+			C. The customisations that have been made for the extension
+********************************************************************************************************************
+
+This section is of use when Fedora or GSearch is updated or if you want to update the fedora3-gs3ext.tar.gz distribution file with further customisations.
+
+The first version of the Fedora extension for Greenstone uses Fedora 3.6.1 and the GSearch 2.5 (which goes with Fedora 3.6.1).
+
+Some template files were added to Fedora and Fedora Gsearch's distribution files in order to customise these for installing them within a Greenstone 3 installation. These files are committed to SVN (without directory structure) at http://trac.greenstone.org/browser/gs3-extensions/fedora/fedora-files and http://trac.greenstone.org/browser/gs3-extensions/fedoragsearch-files
+
+They can be edited there if and when necessary, but they would then need to be included in the extension's distribution file fedora3-gs3ext.tar.gz to update its own existing copies.
+
+That's because these template files are included in the Fedora Extension for GS3 (fedora3-gs3ext.tar.gz). The extension's build.xml modifies these template files when installing the Fedora Extension into Greenstone 3. The template files contain placeholder strings that get updated when ant targets are run over the build.xml file.
+
+
+1. The customisation files for Fedora 3.6.1 are:
+
+- ./install/install.properties.in
+- ./server/config/spring/akubra-llstore.xml.in
+- ./server/config/fedora.fcfg.in
+- ./server/config/fedora-users.xml.in
+
+All these files get converted to filenames without the ".in" suffix upon installation, and placeholder strings in these template files get replaced. The replacements are on the strings 
+- @GSDL3SRCHOME@
+- @FEDORA_HOME@ (set to gsdl3srchome/ext/fedora3)
+- @tomcatserver@
+- @tomcatport@
+- @tomcatshutdownport@
+- @fedorapassw@
+- @indexwritelocktimeout@
+
+Except for the first, which needs to be set when running the Fedora extension's ant targets, all the remaining ones can be specified in Greenstone 3's toplevel build.properties.
+
+
+2. The customisation files for Fedora GSearch 2.6 are located in the "adjust_war_files" subfolder of fedora3-gs3ext.tar.gz file. This custom folder contains the official unpacked fedoragsearch folder, but with the following customisation files:
+
+- adjust_war_files/fedoragsearch/WEB-INF/web.xml
+- adjust_war_files/fedoragsearch/FgsConfig/fgsconfig-basic.properties.in 
+- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLucene.xslt 
+- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLuceneGenerated.xslt
+- adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties
+- adjust_war_files/fedoragsearch/client/runRESTClient.sh
+- adjust_war_files/fedoragsearch/client/runSOAPClient.sh
+- adjust_war_files/fedoragsearch/client/runSOAPClient.bat
+
+
+All these files will get copied into the same locations within <GS3>/packages/tomcat/webapps/fedoragsearch. The file fgsconfig-basic.properties.in will get copied as fgsconfig-basic.properties but with the previously-listed placeholder strings replaced.
+
+
+3. There's also the fedora.xml.in inside the "adjust_war_files" folder of the unpacked extension. This template file will be copied over as <GS3>/packages/tomcat/conf/Catalina/localhost/fedora.xml during the extension installation process, also with placeholder strings replaced.
+
+
+DETAILS TO STEP 2 (Fedora GSearch customisation files):
+
+a. The changes to web.xml are that the authorisation filters are commented out:
+
+<!--
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <servlet-name>AxisServlet</servlet-name>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <servlet-name>GenericSearchREST</servlet-name>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <url-pattern>/index.html</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <url-pattern>/rest</url-pattern>
+    </filter-mapping>
+-->
+
+
+b. The 3 client scripts runRESTClient.bat, runRESTClient.sh and runSOAPClient.sh have been modified to be runnable from any directory, as they will be called by GS3's g2f perl scripts. 
+
+- The bash files have been made executable on extraction of the GS3 Fedora extension and the following has been added to the top of the files:
+
+	# Need to run this script from its own directory instead of whichever directory it may be called from
+	thisdir="`dirname \"$0\"`"
+	thisdir="`cd \"$thisdir\" && pwd`"
+	cd "$thisdir"
+
+
+- Additions to the bat scripts are at the top and bottom:
+
+	@echo off
+
+	::pushd "%CD%"
+	set startdir=%CD%
+	CD /D "%~dp0"
+
+	...
+
+	:: popd
+	cd "%startdir%"
+	set startdir=
+
+
+c. The changes to fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene's foxmlToLucene.xslt and foxmlToLuceneGenerated.xslt are identical. The following xslt has been added:
+
+- Add the following namespaces to the namespace declarations at the top:
+	xmlns:ex="http://www.greenstone.org/namespace/fake/ex"
+	xmlns:dls="http://www.greenstone.org/namespace/fake/dls"
+
+- Add custom indexing for EX and DLS datastreams below the comment on datastreams:
+
+	<!-- a datastream is fetched, if its mimetype 
+	     can be handled, the text becomes the value of the field. 
+	     This is the version using PDFBox,
+	     below is the new version using Apache Tika. -->
+
+	<xsl:for-each select="foxml:datastream[starts-with(@ID,'EX')]/foxml:datastreamVersion[last()]/foxml:xmlContent/ex:ex/ex:metadata">
+	  <IndexField index="TOKENIZED" store="YES" termVector="YES">
+	    <xsl:attribute name="IFname">
+	      <xsl:value-of select="concat('ex.', @name)"/>
+	    </xsl:attribute>
+	    <xsl:value-of select="text()"/>
+	  </IndexField>
+	</xsl:for-each>
+	
+	<xsl:for-each select="foxml:datastream[starts-with(@ID,'DLS')]/foxml:datastreamVersion[last()]/foxml:xmlContent/dls:dls/dls:metadata">
+	  <IndexField index="TOKENIZED" store="YES" termVector="YES">
+	    <xsl:attribute name="IFname">
+	      <xsl:value-of select="concat('dls.', @name)"/>
+	    </xsl:attribute>
+	    <xsl:value-of select="text()"/>
+	  </IndexField>
+	</xsl:for-each>
+
+- Near the end of the XSLT files, just after index for the "foxml.all.text" field, allow just the full text of the documents to be indexed by adding an index for the ds.fulltext field:
+
+	<IndexField IFname="ds.fulltext" index="TOKENIZED" store="YES" termVector="YES">
+	  <xsl:for-each select="//foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
+	    <xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
+	    <xsl:text>Â </xsl:text>
+	  </xsl:for-each>
+	</IndexField>
+
+
+Further datastreams and metadata sets can be indexed by adding similar namespace declarations and xml elements to these 2 XSLT files. 
+If the changes are not meant to apply for all Greenstone users, individual Greenstone users can add fields for indexing by making such changes to just the file fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/foxmlToLuceneGenerated.xslt
+
+
+d. By default, Lucene's lock obtain timeout is set to 0 in its properties file, which is not acceptable for all but the smallest documents. The lock timeout can be customised in build.properties and by default is set to 10000 (or 1000), which can be adjusted before starting the Fedora extension installation process.
+
+The installation process will write out this property into GSearch's FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties: 
+	fgsindex.defaultWriteLockTimeout = 1000
+
+When fedoragsearch then gets deployed, this value will be propagated into: 
+	<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/fgsconfigFinal/index/FgsIndex/index.properties
+
+
+
+********************************************************************************************************************
+			D. To manually set up Fedora with Fedora GSearch 2.5 from scratch
+********************************************************************************************************************
+
+When installing Fedora, you can choose to install it outside Greenstone, and also instruct it to use its own tomcat. However, in the following instructions, Fedora's installation location (FEDORA_HOME) is still taken to be /GS3/ext/fedora3, since it's assumed Fedora is be installed to use Greenstone's tomcat. 
+
+The Fedora GSearch war file will need to be unpacked in the tomcat/webapps folder of whichever tomcat Fedora is using. In the following, this is still Greenstone's tomcat.
+
+In whichever location Fedora is installed, that's where Fedora will store its digital objects and their datastreams, and that's where Fedora GSearch will create its GSearch index.
+
+
+********************************
+INSTALLING FEDORA
+********************************
+1. Set FEDORA_HOME=/<GS3>/ext/fedora3 in .profile (emacs ~/.profile)
+source ~/.profile
+
+2. Run fedora installer:
+	java -jar fcrepo-installer-3.6.1.jar
+
+Install by specifying to use the existing tomcat (existingTomcat), and provide the Greenstone3 tomcat stop and start ports (usually 8383 and 8305).
+Then set the existingTomcat to the Greenstone3 one: /<GS3>/packages/tomcat
+Turn on messaging, as this is necessary for Fedora GSearch.
+
+- Installation options:
+
+custom
+FEDORA_HOME
+pwd: pounamu
+host: <full-tomcat.server-host-name>
+def server context: fedora
+default false for user authentication for APIA-A
+false for SSL availability
+existingTomcat
+path to tomcat: </full-path-to-GS3>/packages/tomcat
+tomcat listen port: 8383
+tomcat shutdown port:8305
+derby:included
+upstream HTTP authentication: (default) false
+FeSL AuthZ: (default) false
+XACML policy enforcement enabled: false
+Low Level Storage: (default) akubra-fs 
+Resource Index: true
+Enable Messaging: true
+Messaging Provider URI: [default is vm:(broker:(tcp://localhost:61616))]
+Deploy local services and demos: (default) true
+
+
+- The Fedora installation options used are to be found (after installation) in fedora3/install/install.properties:
+
+#Install Options
+#Fri Sep 21 15:29:29 NZST 2012
+ri.enabled=true
+messaging.enabled=false
+apia.auth.required=false
+database.jdbcDriverClass=org.apache.derby.jdbc.EmbeddedDriver
+upstream.auth.enabled=false
+ssl.available=false
+database.jdbcURL=jdbc\:derby\:/<GS3>/ext/fedora3/derby/fedora3;create\=true
+database.password=fedoraAdmin
+database.username=fedoraAdmin
+fesl.authz.enabled=false
+tomcat.shutdown.port=8305
+deploy.local.services=true
+xacml.enabled=false
+tomcat.http.port=8383
+fedora.serverHost=<full-tomcat.server-host-name>
+database=included
+database.driver=included
+fedora.serverContext=fedora
+llstore.type=akubra-fs
+tomcat.home=/<GS3>/packages/tomcat
+fedora.home=/<GS3>/ext/fedora3
+install.type=custom
+servlet.engine=existingTomcat
+fedora.admin.pass=pounamu
+
+
+- If trying to turn a custom installation into one for distribution, you would need to modify the following 4 files by inserting placeholder strings where applicable for the tomcatserver name, tomcat listen port and shutdown port, fedorapassword, GSLD3SRCHOME and FEDORA_HOME:
+
+fedora3/install/install.properties
+fedora3/server/config/spring/akubra-llstore.xml
+fedora3/server/config/fedora.fcfg
+fedora3/server/config/fedora-users.xml
+
+Then you would rename these files with the suffix .in 
+
+
+3. Just to confirm there are no differences between the server.xml fedora has generated for fedora, and the server.xml of GS3's tomcat, run a diff:
+
+	diff -w /<GS3>/packages/tomcat/conf/server.xml </GS3/ext/>fedora3/install/server.xml
+
+4. Copy the fedora war files from fedora3/install into packages/tomcat/webapps
+fedora.war, fedora-demo.war, fop.war, imagemanip.war, saxon.war
+
+5. Copy the jar files xalan.jar, serializer.jar (and xsltc.jar) from Greenstone3's web/WEB-INF/lib into Greenstone3's packages/tomcat/lib so that fedora has access to the xalan version of the TransformerFactoryImpl class.
+
+There's also a xalan.jar in /<GS3>/packages/tomcat/webapps/fop/WEB-INF/lib
+So this can be copied into /<GS3>/packages/tomcat/lib/. instead of the Greenstone version.
+
+6. Create the file /<GS3>/packages/tomcat/conf/Catalina/localhost/fedora.xml
+containing:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+  <Parameter name="fedora.home" value="/<GS3>/ext/fedora3" />
+</Context>
+
+
+7. Before running the Greenstone server, make a copy of the fedora3 folder. Because once you start up tomcat, and visit the fedora home page, it will create a lot of files customised to the location of the current installation.
+
+8. Visit http://localhost:8383/greenstone3 and 
+	http://localhost:8383/fedora 
+
+to confirm both work.
+
+
+********************************
+INSTALLING FEDORA GSEARCH
+********************************
+1. Download Fedora GSearch 2.5
+
+2. Stop tomcat. Copy the fedoragsearch.war files into /<GS3>/packages/tomcat/webapps
+
+If Fedora was not installed with messaging turned on, then turn it on in now /<GS3>/ext/fedora3/server/config/fedora.fcfg:
+
+ <module role="org.fcrepo.server.messaging.Messaging" class="org.fcrepo.server.messaging.MessagingModule">
+    <comment>Fedora's Java Messaging Service (JMS) Module</comment>
+    <param name="enabled" value="true"/>
+ ...
+
+3. Update the following properties in /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/fgsconfig-basic.properties
+
+gsearchBase=http://<tomcat.server>:8383
+gsearchUser=fedoraAdmin
+gsearchPass=<fedora.password>
+local.FEDORA_HOME=/<GS3>/ext/fedora3
+finalConfigPath=/<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes
+
+fedoraBase=http://<tomcat.server>:8383
+fedoraPass=<fedora.password>
+
+4. Add the edited foxmlToLucene.xslt & foxmlToLuceneGenerated.xslt files to /<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene
+
+5. Add the edited runRESTClient.sh (and runSOAPClient.sh, runRESTClient.bat) to /<GS3>/packages/tomcat/webapps/fedoragsearch/client
+And give them execute permissions, unless they already have it.
+
+6. In a text editor, open up /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/web.xml
+and comment out the authentication filters (one or two of these is probably all that is necessary):
+
+<!--
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <servlet-name>AxisServlet</servlet-name>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <servlet-name>GenericSearchREST</servlet-name>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <url-pattern>/index.html</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <url-pattern>/rest</url-pattern>
+    </filter-mapping>
+-->
+
+Maybe what I really need to comment out is:
+    <filter>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <filter-class>org.fcrepo.server.security.servletfilters.FilterEnforceAuthn</filter-class>
+    </filter>
+
+7. Start tomcat to have it deploy fedoragsearch.
+This will unpack fedoragsearch.
+
+8. With tomcat running, configure fedoragsearch, which will adjust various config files. You will need to go into the deployed fedoragsearch webapps folder's FgsConfig folder first to be able to run the configuration target:
+
+	<GS3>/packages/tomcat/webapps/fedoragsearch/FgsConfig>ant -f fgsconfig-basic.xml
+
+9. With tomcat still running, run updateIndex once to create the empty index for the first time (by running the runRESTClient.sh script with the command: "host:port updateIndex createEmpty [indexName]")
+
+	./<GS3>/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh localhost:8383 updateIndex createEmpty FgsIndex
+
+10. Check fedoragsearch has been properly installed by visiting:
+http://localhost:8383/fedoragsearch/rest
+
+10. If you wish to remove the various war files from GS3's tomcat webapps folder, you will need to stop tomcat first before deleting the war files, because doing so when tomcat is running will undeploy those webapps.
+
+
+********************************
+DEBUGGING
+********************************
+
+Logs to consult when debugging:
+
+1. Check /<GS3>/packages/tomcat/logs/catalina.out
+
+2. </GS3/ext/>fedora3/server/logs/fedora.log for Fedora error logging.
+
+3. To turn on FedoraGSearch's logging of debug statements (Huge files, can reach 500 Mb in a day if rebuilding the demo collection. So you may want to switch this off when not debugging by setting the debug level to INFO):
+
+- /<GS3>/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes/log4j.xml is already set to output DEBUG statements and higher logging levels
+- So open </GS3/ext/>fedora3/server/logs/fedoragsearch.daily.log to look at debug messages in case fedoragsearch doesn't work as expected.
+
+
+********************************************************************************************************************
Index: gs3-extensions/fedora/trunk/src/build.xml
===================================================================
--- gs3-extensions/fedora/trunk/src/build.xml	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/build.xml	(revision 26413)
@@ -0,0 +1,189 @@
+<?xml version="1.0"?>
+<!-- ====================================================================== 
+     Oct 2012
+
+     Script to install Fedora and Fedora GSearch as extensions within Greenstone3
+     (using Greenstone's tomcat)
+     ak19                                                                
+     ====================================================================== -->
+
+<project name="fedora_for_gs3" default="usage" basedir=".">
+  <echo>
+    Tested for Linux. 
+    Your os.name: ${os.name}
+  </echo>
+
+  <!-- PROPERTIES -->
+
+  <!-- need to have FEDORA_HOME env correctly defined -->
+
+  <!--<property name="gsdl3src.home" value="../..${basedir}"/>-->
+  <!--<property name="gsdl3src.home" location="." relative="true" basedir="../.."/>-->
+  <!--<property name="gsdl3src.home" value="/full/path/to/GS3" />-->
+
+  <!-- load the Greenstone properties file to have access to tomcat and fedora properties. 
+    This assumes they have Greenstone installed (build.properties must exist). -->
+  <property file="${gsdl3src.home}/build.properties"/>
+
+  <available file="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/FgsConfig/build.xml" property="fedoragsearch.deployed"/>   
+
+
+  <!-- TARGETS -->
+  <target name="usage" description="Print a help message">
+    <echo message="  Execute 'ant -projecthelp' for a list of targets."/>
+    <echo message="  Execute 'ant -help' for Ant help."/>
+    
+    <echo>
+      *********************************************************
+      1. ant -Dgsdl3src.home=&lt;Full-Path-To-GS3&gt; start-fedora-install
+
+      2. start tomcat by going into ${gsdl3src.home} and running: ant start
+
+      3. ant -Dgsdl3src.home=&lt;Full-Path-To-GS3&gt; continue-fedora-install
+
+      4. stop tomcat by going back into ${gsdl3src.home} and running: ant stop
+      
+      5. ant -Dgsdl3src.home=&lt;Full-Path-To-GS3&gt; finish-fedora-install
+      
+      The README.txt file will have more information about the Greenstone 
+      Fedora extension's installation process.
+      *********************************************************
+    </echo>
+  </target>
+
+
+
+  <target name="start-fedora-install" description="Prepares the fedora war files and puts them into tomcat">
+
+    <!-- adjust template files -->
+    <filter token="GSDL3SRCHOME" value="${gsdl3src.home}"/>
+    <filter token="FEDORA_HOME" value="${gsdl3src.home}/ext/fedora3"/>
+    <filter token="tomcatserver" value="${tomcat.server}"/>
+    <filter token="tomcatport" value="${tomcat.port}"/>
+    <filter token="tomcatshutdownport" value="${tomcat.shutdown.port}"/>
+    <filter token="fedorapassw" value="${fedora.password}"/>
+    <filter token="indexwritelocktimeout" value="${index.writelock.timeout}"/>
+
+    <copy file="${basedir}/adjust_war_files/fedoragsearch/FgsConfig/fgsconfig-basic.properties.in" tofile="${basedir}/adjust_war_files/fedoragsearch/FgsConfig/fgsconfig-basic.properties" filtering="true" overwrite="true"/>
+    <copy file="${basedir}/adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties.in" tofile="${basedir}/adjust_war_files/fedoragsearch/FgsConfig/FgsConfigIndexTemplate/Lucene/index.properties" filtering="true" overwrite="true"/>
+    <copy file="${basedir}/install/install.properties.in" tofile="${basedir}/install/install.properties" filtering="true" overwrite="true"/>
+    <copy file="${basedir}/server/config/fedora.fcfg.in" tofile="${basedir}/server/config/fedora.fcfg" filtering="true" overwrite="true"/>
+    <copy file="${basedir}/server/config/fedora-users.xml.in" tofile="${basedir}/server/config/fedora-users.xml" filtering="true" overwrite="true"/>
+    <copy file="${basedir}/server/config/spring/akubra-llstore.xml.in" tofile="${basedir}/server/config/spring/akubra-llstore.xml" filtering="true" overwrite="true"/>
+
+    <!-- zip up fedoragsearch, rename as .war file and put it in the install folder-->
+    <zip destfile="${basedir}/install/fedoragsearch.war"
+	 basedir="${basedir}/adjust_war_files/fedoragsearch"	 
+	 />
+
+    <!-- move fedora.xml and war files into tomcat -->
+    <copy file="${basedir}/adjust_war_files/fedora.xml.in" tofile="${gsdl3src.home}/packages/tomcat/conf/Catalina/localhost/fedora.xml" filtering="true" overwrite="true"/>
+
+    <copy todir="${gsdl3src.home}/packages/tomcat/webapps">
+      <fileset dir="${basedir}/install">
+	<include name="**/*.war"/>
+      </fileset>
+    </copy>
+
+    <!-- copy jar files needed by tomcat to run fedora from greenstone/web/WEB-INF/lib -->
+    <copy todir="${gsdl3src.home}/packages/tomcat/lib">
+      <filelist dir="${gsdl3src.home}/web/WEB-INF/lib">
+	<file name="xalan.jar"/>
+	<file name="serializer.jar"/>
+	<file name="xsltc.jar"/>
+      </filelist>
+    </copy>
+
+    <echo>
+      *********************************************************
+      1. Adjust ${gsdl3src.home}/build.properties to set up Fedora.
+      2. Then restart the Greenstone 3 tomcat. This will take some time the first time around. 
+      3. Once tomcat's started up, return to this extension directory and run: ant continue-fedora-install
+      *********************************************************
+    </echo>
+ </target>
+
+
+
+  <!-- Only if fedoragsearch exists inside tomcat/webapps -->
+  <target name="continue-fedora-install" 
+	  description="When tomcat is running and has deployed the fedora war files, this stage configures Fedora GSearch" 
+	  if="fedoragsearch.deployed">
+
+    <!-- call the fgsconfig-basic.xml buildfile in GS3/packages/tomcat/webapps/fedoragsearch/FgsConfig's 
+	 ant -f fgsconfig-basic.xml -->
+    <echo>
+      Configuring Fedora GSearch
+    </echo>
+    <ant dir="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/FgsConfig" antfile="fgsconfig-basic.xml"/>
+    
+    <!-- give read execute permissions to all (755) for the fedoragsearch files -->
+    <echo>
+      Giving executable permissions to Fedora GSearch scripts
+    </echo>
+    <chmod file="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh" perm="755"/>
+    <chmod file="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/client/runSOAPClient.sh" perm="755"/>
+    
+    <!-- call Update EmptyIndex on GSearch to create the initial index (segments) file:
+	 .../webapps/fedoragsearch/client/runRESTClient.sh <host:port> updateIndex createEmpty <indexName>    
+
+	 Where the indexName is FgsIndex. If it is made customisable, then template files need 
+	 to change to contain placeholders wherever the indexName is mentioned.
+	 To run the upateIndex command, need GSearch username and pwd set in the environment. -->
+    <echo>
+      Calling UpdateIndex CreateEmpty on Fedora GSearch to create a new index
+    </echo>
+    <exec osfamily="unix" spawn="false"
+	  executable="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch/client/runRESTClient.sh">	  
+      <env key="fgsUserName" value="fedoraAdmin"/>
+      <env key="fgsPassword" value="${fedora.password}"/>
+      <arg value="${tomcat.server}:${tomcat.port}"/>
+      <arg value="updateIndex"/>
+      <arg value="createEmpty"/>
+      <arg value="FgsIndex"/>
+    </exec>
+    
+    <exec osfamily="windows" spawn="false"
+	  executable="cmd">
+      <env key="fgsUserName" value="fedoraAdmin" />
+      <env key="fgsPassword" value="${fedora.password}" />
+      <arg value="/c"/>
+      <arg value="${gsdl3src.home}\\packages\\tomcat\\webapps\\fedoragsearch\\client\\runRESTClient.bat"/>
+      <arg value="${tomcat.server}:${tomcat.port}" />
+      <arg value="updateIndex" />
+      <arg value="createEmpty" />
+      <arg value="FgsIndex" />
+    </exec>
+
+    <echo>
+      *********************************************************
+      0. Don't worry about the IndexNotFoundException message. It always does this.
+      1. Stop your Greenstone 3 tomcat. (Check it's stopped: ps aux | grep tomcat)
+      2. Then, to complete fedora installation, return to this extension directory and run: ant finish-fedora-install.
+      This will clear the war files, since they have already been deployed by now.
+      *********************************************************
+    </echo>
+    
+  </target>
+
+
+  
+  <target name="finish-fedora-install" 
+	  description="Removes Fedora and GSearch war files from ${basedir}/tomcat/packages/webapps after deployment. Tomcat must not be running.">
+    <!-- clean up the war files -->
+    <delete file="${gsdl3src.home}/packages/tomcat/webapps/fedora.war"/>
+    <delete file="${gsdl3src.home}/packages/tomcat/webapps/fedora-demo.war"/>
+    <delete file="${gsdl3src.home}/packages/tomcat/webapps/fop.war"/>
+    <delete file="${gsdl3src.home}/packages/tomcat/webapps/imagemanip.war"/>
+    <delete file="${gsdl3src.home}/packages/tomcat/webapps/saxon.war"/>
+    <delete file="${gsdl3src.home}/packages/tomcat/webapps/fedoragsearch.war"/>
+    
+    <echo>
+      *********************************************************
+      Fedora installation complete. Try running FLI.
+      *********************************************************
+   </echo>
+    
+  </target>
+  
+</project>
Index: gs3-extensions/fedora/trunk/src/fedora-files/akubra-llstore.xml.in
===================================================================
--- gs3-extensions/fedora/trunk/src/fedora-files/akubra-llstore.xml.in	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedora-files/akubra-llstore.xml.in	(revision 26413)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+  <bean name="org.fcrepo.server.storage.lowlevel.ILowlevelStorage"
+    class="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorageModule">
+    <constructor-arg index="0">
+      <map />
+    </constructor-arg>
+    <constructor-arg index="1" ref="org.fcrepo.server.Server" />
+    <constructor-arg index="2" type="java.lang.String"
+      value="org.fcrepo.server.storage.lowlevel.ILowlevelStorage" />
+    <property name="impl"
+      ref="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorage" />
+  </bean>
+
+  <bean
+    name="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorage"
+    class="org.fcrepo.server.storage.lowlevel.akubra.AkubraLowlevelStorage"
+    singleton="true">
+    <constructor-arg>
+      <description>The store of serialized Fedora objects</description>
+      <ref bean="objectStore" />
+    </constructor-arg>
+    <constructor-arg>
+      <description>The store of datastream content</description>
+      <ref bean="datastreamStore" />
+    </constructor-arg>
+    <constructor-arg value="true">
+      <description>if true, replaceObject calls will be done in a way
+        that
+        ensures the old content is not deleted until the new content is safely
+        written. If the objectStore already does this, this should be
+        given as
+        false</description>
+    </constructor-arg>
+    <constructor-arg value="true">
+      <description>save as above, but for datastreamStore</description>
+    </constructor-arg>
+  </bean>
+
+  <bean name="objectStore" class="org.akubraproject.map.IdMappingBlobStore"
+    singleton="true">
+    <constructor-arg value="urn:example.org:objectStore" />
+    <constructor-arg>
+      <ref bean="fsObjectStore" />
+    </constructor-arg>
+    <constructor-arg>
+      <ref bean="fsObjectStoreMapper" />
+    </constructor-arg>
+  </bean>
+
+  <bean name="fsObjectStore" class="org.akubraproject.fs.FSBlobStore"
+    singleton="true">
+    <constructor-arg value="urn:example.org:fsObjectStore" />
+    <constructor-arg value="@GSDL3SRCHOME@/ext/fedora3/data/objectStore"/>
+  </bean>
+
+  <bean name="fsObjectStoreMapper"
+    class="org.fcrepo.server.storage.lowlevel.akubra.HashPathIdMapper"
+    singleton="true">
+    <constructor-arg value="##" />
+  </bean>
+
+  <bean name="datastreamStore" class="org.akubraproject.map.IdMappingBlobStore"
+    singleton="true">
+    <constructor-arg value="urn:fedora:datastreamStore" />
+    <constructor-arg>
+      <ref bean="fsDatastreamStore" />
+    </constructor-arg>
+    <constructor-arg>
+      <ref bean="fsDatastreamStoreMapper" />
+    </constructor-arg>
+  </bean>
+
+  <bean name="fsDatastreamStore" class="org.akubraproject.fs.FSBlobStore"
+    singleton="true">
+    <constructor-arg value="urn:example.org:fsDatastreamStore" />
+    <constructor-arg value="@GSDL3SRCHOME@/ext/fedora3/data/datastreamStore"/>
+  </bean>
+
+  <bean name="fsDatastreamStoreMapper"
+    class="org.fcrepo.server.storage.lowlevel.akubra.HashPathIdMapper"
+    singleton="true">
+    <constructor-arg value="##" />
+  </bean>
+
+  <bean name="fedoraStorageHintProvider"
+    class="org.fcrepo.server.storage.NullStorageHintsProvider"
+    singleton="true">
+  </bean>
+
+</beans>
Index: gs3-extensions/fedora/trunk/src/fedora-files/fedora-users.xml.in
===================================================================
--- gs3-extensions/fedora/trunk/src/fedora-files/fedora-users.xml.in	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedora-files/fedora-users.xml.in	(revision 26413)
@@ -0,0 +1,14 @@
+<?xml version='1.0' ?>
+  <users>
+    <user name="fedoraAdmin" password="@fedorapassw@">
+      <attribute name="fedoraRole">
+        <value>administrator</value>
+      </attribute>
+    </user>
+    <user name="fedoraIntCallUser" password="changeme">
+      <attribute name="fedoraRole">
+        <value>fedoraInternalCall-1</value>
+        <value>fedoraInternalCall-2</value>
+      </attribute>
+    </user>
+  </users>
Index: gs3-extensions/fedora/trunk/src/fedora-files/fedora.fcfg.in
===================================================================
--- gs3-extensions/fedora/trunk/src/fedora-files/fedora.fcfg.in	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedora-files/fedora.fcfg.in	(revision 26413)
@@ -0,0 +1,953 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server xmlns="http://www.fedora.info/definitions/1/0/config/" class="org.fcrepo.server.BasicServer">
+  <param name="datastreamExtensionMappingSource" value="mime-to-extensions.xml">
+    <comment>Source of mappings from MIMETYPE to file extension</comment>
+  </param>
+  <param name="datastreamExtensionMappingId" value="ifmissing">
+    <comment>Controls filename extension mapping when the datastream ID is used
+		as the source of the filename.  Values are as above.</comment>
+  </param>
+  <param name="httpClientMaxConnectionsPerHost" value="5">
+    <comment>Maximum number of Fedora http client connections allowed to a given host.</comment>
+  </param>
+  <param name="httpClientSocketTimeoutSecs" value="120">
+    <comment>Number of seconds Fedora http client will wait for data coming across an 
+		established http connection.</comment>
+  </param>
+  <param name="fedoraServerHost" value="wharariki.cms.waikato.ac.nz">
+    <comment>Defines the host name for the Fedora server, as seen from the 
+		outside world.</comment>
+  </param>
+  <param name="datastreamExtensionMappingLabel" value="always">
+    <comment>Controls filename extension mapping when the datastream label is used
+		as the source of the filename.  Values are always: always generate an extension
+		based on the MIMETYPE, using the default extension if none can be determined; 
+		ifmissing: generate an extension if the filename obtained from the source does not
+		already contain one (again returning the default if there is no MIMETYPE-to-extension
+		mapping is found); never: never generate an extension, use the filename from the source
+		as-is</comment>
+  </param>
+  <param name="httpClientMaxFollowRedirects" value="3">
+    <comment>Maximun number of redirects the Fedora http client will follow (only if 
+		httpClientFollowRedirects is set to true.)</comment>
+  </param>
+  <param name="httpClientUserAgent" value="Fedora">
+    <comment>The value to be set for the User-Agent HTTP request header.</comment>
+  </param>
+  <param name="httpClientMaxTotalConnections" value="5">
+    <comment>Maximum number of total Fedora http client connections allowed at once.</comment>
+  </param>
+  <param name="datastreamFilenameSource" value="rels label id">
+    <comment>determines the source of the filename generated when download=true
+		on a datastream dissemination.  Value is space separated list of label: use the datastream label;
+		id: use the datastream ID; rels: use the value defined in RELS-INT.  Each
+		source is checked in order, and the first containing a value is used.  Omit
+		any of the sources if that source is never to be used.  If no sources are to be used,
+		and just the default filename and extension below are to be used, specify &quot; &quot;.</comment>
+  </param>
+  <param name="adminEmailList" value="bob@example.org sally@example.org">
+    <comment>Defines one or more email addresses for server administrators; 
+		list is space delimited.</comment>
+  </param>
+  <param name="datastreamMediationLimit" value="5000">
+    <comment>Determines the time interval in which external mechanisms must 
+		respond to requests by the Fedora server. The value is specified in 
+		milliseconds. The value specified should be set high enough to allow 
+		for an average response time from any single external mechanisms. Note 
+		this value must be less than the limit specified for the 
+		datastreamExpirationLimit.</comment>
+  </param>
+  <param name="fedoraServerPort" value="8383">
+    <comment>Defines the port number on which the Fedora server runs; 
+		default is 8080.</comment>
+  </param>
+  <param name="fedoraRedirectPort" value="8443">
+    <comment>Defines the redirect port of the Fedora sever; default is 8443.</comment>
+  </param>
+  <param name="httpClientFollowRedirects" value="true">
+    <comment>Should the Fedora http client follow redirects?</comment>
+  </param>
+  <param name="datastreamExtensionMappingDefault" value="never">
+    <comment>Controls filename extension mapping when no filename can be determined from
+		the sources listed in datastreamFilenameSource.  Values are always: always generate an extension
+		based on the MIMETYPE (using the default if no appropriate mapping is specified);
+		never: never generate an extension.</comment>
+  </param>
+  <param name="datastreamContentDispositionInlineEnabled" value="true">
+    <comment>determines if a content-disposition header specifying &quot;inline&quot; and
+		a filename is added to the response for the REST API getDatastreamDissemination
+		when no query parameter of download=true is specified.  Browser support for 
+		recognising a filename in case of &quot;inline&quot; content disposition is patchy,
+		so you may wish to disable the content disposition header in this case and only
+		have it provided when download=true is specified, in which case the content disposition
+		of &quot;attachment&quot; will be used; which is generally supported.</comment>
+  </param>
+  <param name="fedoraAppServerContext" value="fedora">
+    <comment>Defines the context name for the Fedora server within the 
+		application server. If set to eg &quot;myfedora&quot; the URL for Fedora will result
+		in http[s]://fedoraServerHost[:fedoraServerPort]/myfedora.</comment>
+  </param>
+  <param name="fedoraShutdownPort" value="8305">
+    <comment>Defines the port number used to shutdown the Fedora sever; 
+		default is 8005.</comment>
+  </param>
+  <param name="datastreamDefaultExtension" value="bin">
+    <comment>Extension to use when none can be determined from mappings</comment>
+  </param>
+  <param name="datastreamDefaultFilename" value="download">
+    <comment>Filename to use for datastream downloads when none can be determined from the
+		sources listed in datastreamFilenameSource.</comment>
+  </param>
+  <param name="datastreamExpirationLimit" value="300">
+    <comment>Controls the size of the datastream mediation hash by removing 
+		entries outside the specified threshold. The value is specified in 
+		seconds. Note this value must be greater than the limit specified for 
+		the datastreamMediationLimit.</comment>
+  </param>
+  <param name="datastreamExtensionMappingRels" value="never">
+    <comment>Controls filename extension mapping when RELS-INT is used
+		as the source of the filename.  Values are as above.</comment>
+  </param>
+  <param name="httpClientTimeoutSecs" value="20">
+    <comment>Number of seconds Fedora http client will wait for a connection before timing 
+		out.</comment>
+  </param>
+  <param name="repositoryName" value="Fedora Repository">
+    <comment>Defines a human readable name for the Fedora server; default is 
+		Fedora Repository.</comment>
+  </param>
+  <module role="org.fcrepo.server.security.Authorization" class="org.fcrepo.server.security.DefaultAuthorization">
+    <comment>Builds and manages Fedora's authorization structure.</comment>
+    <param name="REPOSITORY-POLICY-GUITOOL-POLICIES-DIRECTORY" value="data/fedora-xacml-policies/repository-policies-generated-by-policyguitool" isFilePath="true">
+      <comment>This parameter is for future use.</comment>
+    </param>
+    <param name="POLICY-SCHEMA-PATH" value="xsd/cs-xacml-schema-policy-01.xsd"/>
+    <param name="ENFORCE-MODE" value="permit-all-requests"/>
+    <param name="VALIDATE-OBJECT-POLICIES-FROM-DATASTREAM" value="false"/>
+    <param name="XACML-COMBINING-ALGORITHM" value="com.sun.xacml.combine.OrderedDenyOverridesPolicyAlg"/>
+    <param name="VALIDATE-OBJECT-POLICIES-FROM-FILE" value="false"/>
+    <param name="VALIDATE-REPOSITORY-POLICIES" value="true"/>
+    <param name="REPOSITORY-POLICIES-DIRECTORY" value="data/fedora-xacml-policies/repository-policies" isFilePath="true"/>
+  </module>
+  <module role="org.fcrepo.server.security.BackendSecurity" class="org.fcrepo.server.security.DefaultBackendSecurity">
+    <comment>Description: Interface to the backend service security 
+		configuration. This module initializes backend service security 
+		information in the server by parsing the beSecurity configuration file. 
+		This file is located in the distribution in 
+		$FEDORA_HOME/dist/server/config/beSecurity.xml. The configuration file 
+		is read once at server startup.</comment>
+    <param name="beSecurity_char_encoding" value="utf-8">
+      <comment>The character encoding used for the beSecurity 
+			configuration file. The default is &quot;utf-8&quot;. The value 
+			specified must correspond to the character encoding used in the 
+			beSecurity configuration file.</comment>
+    </param>
+    <param name="beSecurity_validation" value="false">
+      <comment>Controls whether beSecurity config file is validated 
+			against the beSecurityDescription schema. The default is 
+			&quot;false&quot;. Valid values are &quot;true&quot; or 
+			&quot;false&quot;.</comment>
+    </param>
+  </module>
+  <module role="org.fcrepo.server.storage.DOManager" class="org.fcrepo.server.storage.DefaultDOManager">
+    <comment>The interface to the storage subsystem.  This provides 
+    	context-appropriate DOReaders and DOWriters for reflecting on and 
+    	writing to the objects stored in the repository. It also provides 
+    	methods for reflecting on the contents of the repository as a whole..</comment>
+    <param name="defaultDCControlGroup" value="X">
+      <comment>The control group to use for the system-generated DC datastream
+            if no DC datastream is present on ingest.  Must be &quot;X&quot; or &quot;M&quot;.</comment>
+    </param>
+    <param name="gSearchPassword" value="examplePassword">
+      <comment>The associated password for accessing the REST endpoint
+            of the Fedora Generic Search service.  This parameter is only 
+            required if GSearchDOManager is used, and the service requires 
+            authentication.</comment>
+    </param>
+    <param name="storageCharacterEncoding" value="UTF-8">
+      <comment>If the serialization format is text-based, this is the 
+	    	character encoding that should be used. Default is UTF-8.</comment>
+    </param>
+    <param name="gSearchUsername" value="exampleUsername">
+      <comment>The username for accessing the REST endpoint of the
+            Fedora Generic Search service.  This parameter is only required if
+            GSearchDOManager is used, and the service requires 
+            authentication.</comment>
+    </param>
+    <param name="storagePool" value="localDerbyPool">
+      <comment>The named connection pool from which read/write database 
+	    	connections are to be provided for the storage subsystem (see the 
+	    	ConnectionPoolManager module). Default is the default provided by the 
+	    	ConnectionPoolManager.</comment>
+    </param>
+    <param name="fedoraStorageHintProvider" value="org.fcrepo.server.storage.NullStorageHintsProvider">
+      <comment>Hints are gathered and passed to the underline storage systems (only Akubra for now).
+            These are meta data or contextual information about object or datastream to be added or updated.
+            The default implementation is NullStorageHintsProvider; it provides no hints. You you can implement
+            your own FedoraStorageHintProvider and drop your implementation to the $CATALINA_HOME/webapps/fedora/WEB_INF/classes
+            directory (unpackaged), or the $CATALINA_HOME/webapps/fedora/WEB_INF/lib director (packaged).</comment>
+    </param>
+    <param name="gSearchRESTURL" value="http://localhost:8080/fedoragsearch/rest">
+      <comment>The REST endpoint of the Fedora Generic Search service.
+            This parameter is only required if GSearchDOManager is 
+            used.</comment>
+    </param>
+    <param name="defaultExportFormat" value="info:fedora/fedora-system:FOXML-1.1"/>
+    <param name="defaultRELSControlGroup" value="X">
+      <comment>The control group to use for system-generated RELS-EXT and 
+            RELS-INT datastreams where these are not already present when
+            adding relationships via addRelationship.  Must be &quot;X&quot; or &quot;M&quot;.</comment>
+    </param>
+    <param name="pidNamespace" value="changeme">
+      <comment>This is the namespace id for pids of newly-created objects. 
+	    	This should be unique for a repository. It can be from 1 to 17 
+	    	characters, and may only contain A-Z, a-z, 0-9, &apos;.&apos;, or &apos;-&apos; (dash).</comment>
+    </param>
+  </module>
+  <module role="org.fcrepo.server.management.Management" class="org.fcrepo.server.management.ManagementModule">
+    <comment>The management subsystem. This implements the methods necessary 
+		to fulfill API-M requests without regard to:
+                 - how the service is exposed
+                 - how bytestreams and java types might be marshalled/demarshalled over the wire
+                 - how the storage subsystem is implemented.</comment>
+    <param name="purgeDelayInMillis" value="60000">
+      <comment>Optional, default is 60000 (1 minute).
+            This specifies the amount of time between checks to remove
+            temporary files uploaded via the API-M upload interface.  During
+            each check, old files whose age exceeds uploadStorageMinutes
+            will be removed.</comment>
+    </param>
+    <param name="decorator1" value="org.fcrepo.server.messaging.NotificationInvocationHandler"/>
+    <param name="checksumAlgorithm" value="MD5">
+      <comment>Specifies which checksumming algorithm is to be used when 
+			automatically computing checksums as specified by the above 
+			parameter. Valid values are: MD5  SHA-1  SHA-256  SHA-384  SHA-512.</comment>
+    </param>
+    <param name="uploadStorageMinutes" value="5">
+      <comment>Optional, default is 5.
+            This specifies the minimum amount of time that each uploaded
+            file should be kept in temporary storage.</comment>
+    </param>
+    <param name="autoChecksum" value="false">
+      <comment>Controls whether a checksum is automatically computed for 
+			every datastream as the datastream is added to the repository. This 
+			will allow the integrity of datastream contents to be periodically 
+			checked to insure the object is not corrupted.</comment>
+    </param>
+  </module>
+  <module role="org.fcrepo.server.access.Access" class="org.fcrepo.server.access.DefaultAccess">
+    <comment>Description: The access subsystem. This implements the methods 
+    	necessary to fulfill API-A requests without regard to:
+			- how the service is exposed
+			- how bytestreams and java types might be marshalled/demarshalled 
+			  over the wire.</comment>
+    <param name="doMediateDatastreams" value="false">
+      <comment>A boolean switch indicating whether Datastream Mediation is 
+	    	activated or not. Datastream Mediation is required if using basic 
+	    	authentication for API-A. When basic authentication is enabled for 
+	    	API-A, backend services used by custom disseminations may or may not be 
+	    	capable of authenticating with the Fedora server. Datastream mediation 
+	    	coupled with the backend service configuration information in the 
+	    	beSecurity.xml file enables the Fedora server to determine which backend 
+	    	services are required to authenticate and which ones are allowed to 
+	    	connect without authentication. Datastream mediation provides additional 
+	    	repository security by not exposing the physical location of Referenced 
+	    	Content datastreams to external mechanisms(services). Instead of 
+	    	exposing the actual physical location of Referenced Content datastreams, 
+	    	Datastream Mediation functions as a proxy requiring all external 
+	    	services to communicate through the Fedora server to resolve the 
+	    	location of Referenced Content datastreams. 
+	
+			IMPORTANT: For Datastream Mediation to function, the Fedora server must 
+			be internet accessible using the configured name for fedoraServerHost 
+			and fedoraServerPort. For example, using the default fedoraServerHost 
+			value of &quot;localhost&quot; will not work if you have remote backend services 
+			since the hostname of &quot;localhost&quot; will not be resolvable as the Fedora 
+			server by the remote backend services. This requirement can be difficult 
+			to satisfy if the Fedora server is located behind a firewall and you do 
+			not have ready access to the firewall&apos;s configuration to enable the 
+			required access. If the Fedora server is behind a firewall and you have 
+			no access to the firewall&apos;s configuration, you are limited to keeping 
+			Datastream Mediation turned off. Note that this will also prevent you 
+			from using basic authentication with API-A. The default value of 
+			doMediateDatastreams is false.</comment>
+    </param>
+  </module>
+  <module role="org.fcrepo.server.access.DynamicAccess" class="org.fcrepo.server.access.DynamicAccessModule">
+    <comment>The dynamic behavior module for the access subsystem. This 
+		implements the methods necessary to fulfill API-A requests without 
+		regard to:
+	        - dynamically associating a default behavior definition and mechanism with objects
+	        - (Future) dynamically associating other behavior definitions and mechanisms
+	          with objects
+	        - running disseminations of dynamic behaviors</comment>
+    <param name="fedora-system:1" value="org.fcrepo.server.access.internalservices.Bootstrap">
+      <comment>The interface that defines the methods of the bootstrap 
+			disseminator. These methods are &quot;built-in&quot; to the Fedora system, and 
+			are dynamically associated with every behavior definition and 
+			behavior mechanism object.</comment>
+    </param>
+    <param name="fedora-system:2" value="org.fcrepo.server.access.internalservices.BootstrapImpl">
+      <comment>The class that implements the methods of the bootstrap 
+			disseminator. These method implementations are &quot;built-in&quot; to the 
+			Fedora system, and are dynamically associated with every behavior 
+			definition and behavior mechanism object. This class can be thought 
+			of as implementing an &quot;internal service&quot; whereas other disseminators 
+			use external services (described by WSDL) to do their work.</comment>
+    </param>
+    <param name="fedora-system:3" value="org.fcrepo.server.access.defaultdisseminator.DefaultDisseminator">
+      <comment>The interface that defines the methods of the default 
+			disseminator. These methods are &quot;built-in&quot; to the Fedora system, and 
+			are dynamically associated with every object.</comment>
+    </param>
+    <param name="fedora-system:4" value="org.fcrepo.server.access.defaultdisseminator.DefaultDisseminatorImpl">
+      <comment>The class that implements the methods of the default 
+			disseminator. These method implementations are &quot;built-in&quot; to the
+            Fedora system, and are dynamically associated with every object.
+            This class can be though of as implementing an &quot;internal service&quot;
+            whereas other disseminators use external services (described by
+            WSDL) to do their work.</comment>
+    </param>
+  </module>
+  <module role="org.fcrepo.server.search.FieldSearch" class="org.fcrepo.server.search.FieldSearchSQLModule">
+    <comment>Supports the API-A simpleSearch and advancedSearch methods.</comment>
+    <param name="indexDCFields" value="true">
+      <comment>(optional, default is true) Whether the content of the DC 
+	    	datastream should be examined and the contents indexed, for each object.
+	        You may wish to save time and space by disabling DC field indexing, 
+	        particularly if you have an external search service (such as Fedora 
+	        Generic Search) that already fulfills this need. 
+	        Note: If you change this value on a Fedora repository that has been 
+	        running for some time, you will need to perform a SQL rebuild using the 
+	        Fedora Rebuilder tool if you want to change objects that have already 
+	        been ingested.</comment>
+    </param>
+    <param name="connectionPool" value="localDerbyPool">
+      <comment>(optional) To make unspecified, comment out or delete the 
+	    	whole param line as opposed to using an empty string,
+            default=ConnectionPoolManager&apos;s default) The connectionPool
+            providing the connection to the database to be used. Warning: When
+            setting these values, keep in mind that while a session is not timed
+            out (maxSecondsPerSession seconds haven&apos;t elapsed, and not all
+            results have been requested), a connection from the pool is tied up.
+            Therefore, the connectionPool should be at least of size n, large
+            enough to accomodate n simultaneous search sessions. The longer
+            maxSecondsPerSession is, the more chance you have of tying up all
+            available connections from the pool. Therefore, keep
+            maxSecondsPerSession fairly low, but still reasonable for an
+            automated program or user to serially get a long list of results,
+            and make sure you have a connectionPool large enough to accomodate
+            your users.</comment>
+    </param>
+    <param name="maxSecondsPerSession" value="500">
+      <comment>(required, must be &gt; 0) 
+            The maximum number of seconds that the server guarantees subsequent
+            search results may be obtained. This is only used in cases where the
+            number of results is greater than maxResults (as specified by the
+            server [above] or the client [in the search request]).</comment>
+    </param>
+    <param name="maxResults" value="100">
+      <comment>(required, must be &gt; 0) 
+            The maximum number of records to 
+            return as the result of a search. Even if a client requests more 
+            results at a time, this is the cutoff value.</comment>
+    </param>
+  </module>
+  <module role="org.fcrepo.server.resourceIndex.ResourceIndex" class="org.fcrepo.server.resourceIndex.ResourceIndexModule">
+    <comment>Supports the ResourceIndex.</comment>
+    <param name="level" value="1">
+      <comment>(required) 
+            Index level. Currently, only 0, and 1 are supported levels. 
+            0 = off and 1 = on.
+            WARNING: changing the level (except to 0) requires 
+            running the Resource Index Rebuilder.</comment>
+    </param>
+    <param name="syncUpdates" value="false">
+      <comment>(optional, default is false)
+            Whether to flush the triple buffer before
+            returning from object modification operations.
+            Specifying this as true will ensure that RI queries 
+            immediately reflect the latest triples.
+            Specifying false will not provide this guarantee,
+            but can significantly reduce roundtrip time for
+            API-M operations (depending on the triplestore 
+            implementation).</comment>
+    </param>
+    <param name="datastore" value="localMulgaraTriplestore">
+      <comment>(required) 
+            Name of the triplestore to use. WARNING: changing the 
+            triplestore running the Resource Index Rebuilder.</comment>
+    </param>
+    <param name="alias:test" value="http://example.org/terms#">
+      <comment>(optional) Aliases that can be used for queries. The param 
+			name of an alias starts with the string &quot;alias:&quot; and is followed by 
+			the name of the alias (shortcut) for the value, which is a URI 
+			prefix. For example: name=&quot;alias:test&quot; 
+			value=&quot;http://example.org/terms#&quot; will allow a query to use 
+			test:apple instead of http://example.org/terms#apple</comment>
+    </param>
+  </module>
+  <module role="org.fcrepo.oai.OAIProvider" class="org.fcrepo.server.oai.FedoraOAIProviderModule">
+    <comment>Description: Exposes the repository for OAI harvesters.</comment>
+    <param name="maxRecords" value="100"/>
+    <param name="friends" value="http://arXiv.org/oai2 http://memory.loc.gov/cgi-bin/oai2_0"/>
+    <param name="adminEmails" value="oai-admin@example.org bob@example.org"/>
+    <param name="repositoryDomainName" value="example.org"/>
+    <param name="maxHeaders" value="100"/>
+    <param name="repositoryName" value="Your Fedora Repository Name Here"/>
+  </module>
+  <module role="org.fcrepo.server.storage.translation.DOTranslator" class="org.fcrepo.server.storage.translation.DOTranslatorModule">
+    <comment>Supports translation from DigitalObject to a stream of some
+		         format, and vice-versa. The parameters below specify
+		         serializer/deserializer classes to be used for a given format. Those
+		         classes must implement the DOSerializer/DODeserializer interfaces.</comment>
+    <param name="serializer_info:fedora/fedora-system:ATOM-1.1" value="org.fcrepo.server.storage.translation.Atom1_1DOSerializer"/>
+    <param name="deserializer_info:fedora/fedora-system:FOXML-1.1" value="org.fcrepo.server.storage.translation.FOXML1_1DODeserializer"/>
+    <param name="serializer_info:fedora/fedora-system:METSFedoraExt-1.0" value="org.fcrepo.server.storage.translation.METSFedoraExt1_0DOSerializer"/>
+    <param name="deserializer_info:fedora/fedora-system:METSFedoraExt-1.1" value="org.fcrepo.server.storage.translation.METSFedoraExt1_1DODeserializer"/>
+    <param name="serializer_info:fedora/fedora-system:METSFedoraExt-1.1" value="org.fcrepo.server.storage.translation.METSFedoraExt1_1DOSerializer"/>
+    <param name="deserializer_info:fedora/fedora-system:METSFedoraExt-1.0" value="org.fcrepo.server.storage.translation.METSFedoraExt1_0DODeserializer"/>
+    <param name="serializer_info:fedora/fedora-system:FOXML-1.0" value="org.fcrepo.server.storage.translation.FOXML1_0DOSerializer"/>
+    <param name="deserializer_info:fedora/fedora-system:ATOMZip-1.1" value="org.fcrepo.server.storage.translation.AtomZip1_1DODeserializer"/>
+    <param name="serializer_info:fedora/fedora-system:FOXML-1.1" value="org.fcrepo.server.storage.translation.FOXML1_1DOSerializer"/>
+    <param name="deserializer_info:fedora/fedora-system:ATOM-1.1" value="org.fcrepo.server.storage.translation.Atom1_1DODeserializer"/>
+    <param name="deserializer_info:fedora/fedora-system:FOXML-1.0" value="org.fcrepo.server.storage.translation.FOXML1_0DODeserializer"/>
+    <param name="serializer_info:fedora/fedora-system:ATOMZip-1.1" value="org.fcrepo.server.storage.translation.AtomZip1_1DOSerializer"/>
+  </module>
+  <module role="org.fcrepo.server.management.PIDGenerator" class="org.fcrepo.server.management.BasicPIDGenerator">
+    <comment>The pid generator.</comment>
+    <param name="pidgen_log_dir" value="pidgen"/>
+  </module>
+  <module role="org.fcrepo.server.messaging.Messaging" class="org.fcrepo.server.messaging.MessagingModule">
+    <comment>Fedora's Java Messaging Service (JMS) Module</comment>
+    <param name="enabled" value="true"/>
+    <param name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+    <param name="java.naming.provider.url" value="vm:(broker:(tcp://localhost:61616))"/>
+    <param name="datastore1" value="apimUpdateMessages">
+      <comment>A datastore representing a JMS Destination for APIM events which update the repository</comment>
+    </param>
+    <param name="datastore2" value="apimAccessMessages">
+      <comment>A datastore representing a JMS Destination for APIM events which do not update the repository</comment>
+    </param>
+  </module>
+  <module role="org.fcrepo.server.storage.ConnectionPoolManager" class="org.fcrepo.server.storage.ConnectionPoolManagerImpl">
+    <comment>This module facilitates obtaining ConnectionPools</comment>
+    <param name="defaultPoolName" value="localDerbyPool"/>
+    <param name="poolNames" value="localDerbyPool"/>
+  </module>
+  <module role="org.fcrepo.server.validation.DOValidator" class="org.fcrepo.server.validation.DOValidatorModule">
+    <comment>Description: Supports validation of digital objects, including
+             XML Schema validation, Schematron validation (to Fedora Rules schema
+             written in Schematron language), and other programatic validation
+             including referential integrity checking of existence and
+             availability of distributed data and/or services.</comment>
+    <param name="tempDir" value="work">
+      <comment>(required)
+            This is a directory that the validation module can use as a work space, as
+            when it must write a temporary file.</comment>
+    </param>
+    <param name="rules_info:fedora/fedora-system:ATOM-1.1" value="schematron/atom-bogus.xml">
+      <comment>The local path to the Schematron Rules used for 
+            Fedora-specific on Atom XML files.</comment>
+    </param>
+    <param name="schtron_preprocessor" value="schematron/preprocessor.xslt"/>
+    <param name="rules_info:fedora/fedora-system:ATOMZip-1.1" value="schematron/atom-bogus.xml">
+      <comment>The local path to the Schematron Rules used for 
+            Fedora-specific on Atom Zip files.</comment>
+    </param>
+    <param name="rules_info:fedora/fedora-system:FOXML-1.1" value="schematron/foxmlRules1-1.xml">
+      <comment>The local path to the Schematron Rules used for 
+			Fedora-specific validation on FOXML 1.1 XML files.</comment>
+    </param>
+    <param name="rules_info:fedora/fedora-system:FOXML-1.0" value="schematron/foxmlRules1-0.xml">
+      <comment>The local path to the Schematron Rules used for 
+    		Fedora-specific validation on FOXML 1.0 XML files.</comment>
+    </param>
+    <param name="xsd_info:fedora/fedora-system:METSFedoraExt-1.1" value="xsd/mets-fedora-ext1-1.xsd">
+      <comment>The local path for the Fedora-METS XML
+			schema used to do XML schema validation of digital objects.</comment>
+    </param>
+    <param name="xsd_info:fedora/fedora-system:METSFedoraExt-1.0" value="xsd/mets-fedora-ext.xsd">
+      <comment>The local path for the Fedora-METS 1.0 XML
+            schema used to do XML schema validation of digital objects.</comment>
+    </param>
+    <param name="xsd_xacml_policy1.0" value="xsd/cs-xacml-schema-policy-1.0.xsd">
+      <comment>The local path for the OASIS XACML XML policy schema 
+			used to do XML schema validation of XACML policies.</comment>
+    </param>
+    <param name="xsd_info:fedora/fedora-system:FOXML-1.1" value="xsd/foxml1-1.xsd">
+      <comment>The local path for the Fedora FOXML 1.1 XML schema
+             used to do XML schema validation of digital objects</comment>
+    </param>
+    <param name="xsd_info:fedora/fedora-system:FOXML-1.0" value="xsd/foxml1-0.xsd">
+      <comment>The local path for the Fedora FOXML 1.0 XML schema
+             used to do XML schema validation of digital objects</comment>
+    </param>
+    <param name="xsd_info:fedora/fedora-system:ATOM-1.1" value="xsd/atom.xsd">
+      <comment>The local path for the Atom XML schema used to do XML 
+			schema validation of digital objects</comment>
+    </param>
+    <param name="rules_info:fedora/fedora-system:METSFedoraExt-1.0" value="schematron/metsExtRules1-0.xml">
+      <comment>The local path to the Schematron Rules used for 
+			Fedora-specific validation on Fedora-METS 1.0 XML files.</comment>
+    </param>
+    <param name="xsd_info:fedora/fedora-system:ATOMZip-1.1" value="xsd/atom.xsd">
+      <comment>The local path for the Atom XML schema used to do XML 
+			schema validation of digital objects</comment>
+    </param>
+    <param name="rules_info:fedora/fedora-system:METSFedoraExt-1.1" value="schematron/metsExtRules1-1.xml">
+      <comment>The local path to the Schematron Rules used for 
+			Fedora-specific validation on Fedora-METS XML files.</comment>
+    </param>
+  </module>
+  <module role="org.fcrepo.server.storage.ExternalContentManager" class="org.fcrepo.server.storage.DefaultExternalContentManager">
+    <comment>This module facilitates obtaining external content via HTTP</comment>
+  </module>
+  <datastore id="localMySQLPool">
+    <comment>MySQL database on localhost with db name of fedora3. Each
+             connection pool instance has several configuration parameter that
+             can be used to tune the options for the connection pool. It is
+             recommended that you not change the default values unless you are
+             trying to address a specific performance issue. For additional
+             information regarding connection pool options, refer to the Apache
+             Commons Pool API documentation at
+             http://jakarta.apache.org/commons/pool/apidocs/index.html.</comment>
+    <param name="maxIdle" value="10">
+      <comment>The maximum number of idle instances in pool.</comment>
+    </param>
+    <param name="testOnBorrow" value="true">
+      <comment>When true objects are validated before borrowed from the 
+			pool.</comment>
+    </param>
+    <param name="testWhileIdle" value="true">
+      <comment>When true, objects are validated by the idle object evictor 
+			thread.</comment>
+    </param>
+    <param name="validationQuery" value="select 1">
+      <comment>The query to run when validating connections.
+            Connections are validated according to the testOnBorrow,
+            testOnReturn, and testWhileIdle configuration values.
+            If this is specified, it must be a SQL SELECT statement
+            that returns at least one row.  If this is NOT specified,
+            validation tests will not be run.</comment>
+    </param>
+    <param name="ddlConverter" value="org.fcrepo.server.utilities.MySQLDDLConverter"/>
+    <param name="dbUsername" value="fedoraAdmin">
+      <comment>The database user name.</comment>
+    </param>
+    <param name="testOnReturn" value="true">
+      <comment>When true, objects are validated before returned to the 
+			pool.</comment>
+    </param>
+    <param name="maxActive" value="100">
+      <comment>The maximum number of active instances in pool.</comment>
+    </param>
+    <param name="dbPassword" value="fedoraAdmin">
+      <comment>The database password.</comment>
+    </param>
+    <param name="jdbcURL" value="jdbc:mysql://localhost/fedora3?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true">
+      <comment>The JDBC connection URL.</comment>
+    </param>
+    <param name="whenExhaustedAction" value="1">
+      <comment>Action to take when a new object is requested and the the pool has
+            reached maximum number of active objects. Valid values are:
+				0 (fail i.e., throw Exception) 
+				1 (block i.e., wait until pool resources are freed) 
+				2 (grow i.e., increase the size of the pool).</comment>
+    </param>
+    <param name="numTestsPerEvictionRun" value="3">
+      <comment>The number of objects to be examined on each run of idle 
+			evictor thread (if applicable). A value less than zero indicates 
+			that ceil(numIdle)/abs(numTestsPerEvictionRun) will be run.</comment>
+    </param>
+    <param name="jdbcDriverClass" value="com.mysql.jdbc.Driver">
+      <comment>The JDBC driver class name.</comment>
+    </param>
+    <param name="maxWait" value="-1">
+      <comment>The maximum amount of time in milliseconds the 
+			borrowObject() method should wait before throwing an Exception when 
+            whenExhaustedAction is set to WHEN_EXHAUSTED_BLOCK. A value less 
+            than zero indicates block indefinitely.</comment>
+    </param>
+    <param name="minIdle" value="0">
+      <comment>The minimum of idle instances in pool.</comment>
+    </param>
+    <param name="minEvictableIdleTimeMillis" value="1800000">
+      <comment>The minimum amount of time in milliseconds an object can be 
+			idle in pool before eligible for eviction (if applicable). A value 
+            less than zero indicates no object will be evicted due to idle time 
+            alone.</comment>
+    </param>
+    <param name="timeBetweenEvictionRunsMillis" value="-1">
+      <comment>The time in milliseconds to sleep between runs of the idle 
+			object evictor thread. A value less than zero indicates no idle 
+			evictor thread is run.</comment>
+    </param>
+  </datastore>
+  <datastore id="localDerbyPool">
+    <comment>Derby database on localhost running on port 1527 Each
+            connection pool instance has several configuration parameter that
+            can be used to tune the options for the connection pool. It is
+            recommended that you not change the default values unless you are
+            trying to address a specific performance issue. For additional
+            information regarding connection pool options, refer to the Apache
+            Commons Pool API documentation at
+            http://jakarta.apache.org/commons/pool/apidocs/index.html.</comment>
+    <param name="maxIdle" value="10">
+      <comment>The maximum number of idle instances in pool.</comment>
+    </param>
+    <param name="testOnBorrow" value="true">
+      <comment>When true objects are validated before borrowed from the 
+            pool.</comment>
+    </param>
+    <param name="testWhileIdle" value="true">
+      <comment>When true, objects are validated by the idle object evictor 
+            thread.</comment>
+    </param>
+    <param name="ddlConverter" value="org.fcrepo.server.utilities.DerbyDDLConverter"/>
+    <param name="dbUsername" value="fedoraAdmin">
+      <comment>The database user name.</comment>
+    </param>
+    <param name="testOnReturn" value="true">
+      <comment>When true, objects are validated before returned to the 
+            pool.</comment>
+    </param>
+    <param name="maxActive" value="100">
+      <comment>The maximum number of active instances in pool.</comment>
+    </param>
+    <param name="dbPassword" value="fedoraAdmin">
+      <comment>The database password.</comment>
+    </param>
+    <param name="jdbcURL" value="jdbc:derby:@GSDL3SRCHOME@/ext/fedora3/derby/fedora3;create=true">
+      <comment>The JDBC connection URL.</comment>
+    </param>
+    <param name="whenExhaustedAction" value="1">
+      <comment>Action to take when a new object is requested and the the pool has
+            reached maximum number of active objects. Valid values are:
+                0 (fail i.e., throw Exception) 
+                1 (block i.e., wait until pool resources are freed) 
+                2 (grow i.e., increase the size of the pool).</comment>
+    </param>
+    <param name="numTestsPerEvictionRun" value="3">
+      <comment>The number of objects to be examined on each run of idle 
+            evictor thread (if applicable). A value less than zero indicates 
+            that ceil(numIdle)/abs(numTestsPerEvictionRun) will be run.</comment>
+    </param>
+    <param name="jdbcDriverClass" value="org.apache.derby.jdbc.EmbeddedDriver">
+      <comment>The JDBC driver class name.</comment>
+    </param>
+    <param name="maxWait" value="-1">
+      <comment>The maximum amount of time in milliseconds the 
+            borrowObject() method should wait before throwing an Exception when 
+            whenExhaustedAction is set to WHEN_EXHAUSTED_BLOCK. A value less 
+            than zero indicates block indefinitely.</comment>
+    </param>
+    <param name="minIdle" value="0">
+      <comment>The minimum of idle instances in pool.</comment>
+    </param>
+    <param name="minEvictableIdleTimeMillis" value="1800000">
+      <comment>The minimum amount of time in milliseconds an object can be 
+            idle in pool before eligible for eviction (if applicable). A value 
+            less than zero indicates no object will be evicted due to idle time 
+            alone.</comment>
+    </param>
+    <param name="timeBetweenEvictionRunsMillis" value="-1">
+      <comment>The time in milliseconds to sleep between runs of the idle 
+            object evictor thread. A value less than zero indicates no idle 
+            evictor thread is run.</comment>
+    </param>
+  </datastore>
+  <datastore id="localOraclePool">
+    <comment>Oracle database on localhost with SID=fedora3 Each
+            connection pool instance has several configuration parameter that
+            can be used to tune the options for the connection pool. It is
+            recommended that you not change the default values unless you are
+            trying to address a specific performance issue. For additional
+            information regarding connection pool options, refer to the Apache
+            Commons Pool API documentation at
+            http://jakarta.apache.org/commons/pool/apidocs/index.html.</comment>
+    <param name="maxIdle" value="10">
+      <comment>The maximum number of idle instances in pool.</comment>
+    </param>
+    <param name="testOnBorrow" value="true">
+      <comment>When true objects are validated before borrowed from the 
+			pool.</comment>
+    </param>
+    <param name="testWhileIdle" value="true">
+      <comment>When true, objects are validated by the idle object evictor 
+			thread.</comment>
+    </param>
+    <param name="validationQuery" value="select &apos;validationQuery&apos; from dual">
+      <comment>The query to run when validating connections.
+            Connections are validated according to the testOnBorrow,
+            testOnReturn, and testWhileIdle configuration values.
+            If this is specified, it must be a SQL SELECT statement
+            that returns at least one row.  If this is NOT specified,
+            validation tests will not be run.</comment>
+    </param>
+    <param name="ddlConverter" value="org.fcrepo.server.utilities.OracleDDLConverter"/>
+    <param name="dbUsername" value="fedoraAdmin">
+      <comment>The database user name.</comment>
+    </param>
+    <param name="connection.SetBigStringTryClob" value="true"/>
+    <param name="testOnReturn" value="true">
+      <comment>When true, objects are validated before returned to the 
+			pool.</comment>
+    </param>
+    <param name="maxActive" value="100">
+      <comment>The maximum number of active instances in pool.</comment>
+    </param>
+    <param name="dbPassword" value="fedoraAdmin">
+      <comment>The database password.</comment>
+    </param>
+    <param name="jdbcURL" value="jdbc:oracle:thin:@localhost:1521:fedora3">
+      <comment>The JDBC connection URL.</comment>
+    </param>
+    <param name="whenExhaustedAction" value="1">
+      <comment>Action to take when a new object is requested and the the pool has
+            reached maximum number of active objects. Valid values are:
+				0 (fail i.e., throw Exception) 
+				1 (block i.e., wait until pool resources are freed) 
+				2 (grow i.e., increase the size of the pool).</comment>
+    </param>
+    <param name="numTestsPerEvictionRun" value="3">
+      <comment>The number of objects to be examined on each run of idle 
+			evictor thread (if applicable). A value less than zero indicates 
+			that ceil(numIdle)/abs(numTestsPerEvictionRun) will be run.</comment>
+    </param>
+    <param name="jdbcDriverClass" value="oracle.jdbc.OracleDriver">
+      <comment>The JDBC driver class name.</comment>
+    </param>
+    <param name="maxWait" value="-1">
+      <comment>The maximum amount of time in milliseconds the 
+			borrowObject() method should wait before throwing an Exception when 
+            whenExhaustedAction is set to WHEN_EXHAUSTED_BLOCK. A value less 
+            than zero indicates block indefinitely.</comment>
+    </param>
+    <param name="minIdle" value="0">
+      <comment>The minimum of idle instances in pool.</comment>
+    </param>
+    <param name="minEvictableIdleTimeMillis" value="1800000">
+      <comment>The minimum amount of time in milliseconds an object can be 
+			idle in pool before eligible for eviction (if applicable). A value 
+            less than zero indicates no object will be evicted due to idle time 
+            alone.</comment>
+    </param>
+    <param name="timeBetweenEvictionRunsMillis" value="-1">
+      <comment>The time in milliseconds to sleep between runs of the idle 
+			object evictor thread. A value less than zero indicates no idle 
+			evictor thread is run.</comment>
+    </param>
+  </datastore>
+  <datastore id="localPostgreSQLPool">
+    <comment>PostgreSQL database on localhost with db name of fedora3. Each
+             connection pool instance has several configuration parameter that
+             can be used to tune the options for the connection pool. It is
+             recommended that you not change the default values unless you are
+             trying to address a specific performance issue. For additional
+             information regarding connection pool options, refer to the Apache
+             Commons Pool API documentation at
+             http://jakarta.apache.org/commons/pool/apidocs/index.html.</comment>
+    <param name="maxIdle" value="10">
+      <comment>The maximum number of idle instances in pool.</comment>
+    </param>
+    <param name="testOnBorrow" value="true">
+      <comment>When true objects are validated before borrowed from the 
+			pool.</comment>
+    </param>
+    <param name="testWhileIdle" value="true">
+      <comment>When true, objects are validated by the idle object evictor 
+			thread.</comment>
+    </param>
+    <param name="validationQuery" value="select 1">
+      <comment>The query to run when validating connections.
+            Connections are validated according to the testOnBorrow,
+            testOnReturn, and testWhileIdle configuration values.
+            If this is specified, it must be a SQL SELECT statement
+            that returns at least one row.  If this is NOT specified,
+            validation tests will not be run.</comment>
+    </param>
+    <param name="ddlConverter" value="org.fcrepo.server.utilities.PostgresDDLConverter"/>
+    <param name="dbUsername" value="fedoraAdmin">
+      <comment>The database user name.</comment>
+    </param>
+    <param name="testOnReturn" value="true">
+      <comment>When true, objects are validated before returned to the 
+			pool.</comment>
+    </param>
+    <param name="maxActive" value="100">
+      <comment>The maximum number of active instances in pool.</comment>
+    </param>
+    <param name="dbPassword" value="fedoraAdmin">
+      <comment>The database password.</comment>
+    </param>
+    <param name="jdbcURL" value="jdbc:postgresql:fedora3">
+      <comment>The JDBC connection URL.</comment>
+    </param>
+    <param name="whenExhaustedAction" value="1">
+      <comment>Action to take when a new object is requested and the the pool has
+            reached maximum number of active objects. Valid values are:
+				0 (fail i.e., throw Exception) 
+				1 (block i.e., wait until pool resources are freed) 
+				2 (grow i.e., increase the size of the pool).</comment>
+    </param>
+    <param name="numTestsPerEvictionRun" value="3">
+      <comment>The number of objects to be examined on each run of idle 
+			evictor thread (if applicable). A value less than zero indicates 
+			that ceil(numIdle)/abs(numTestsPerEvictionRun) will be run.</comment>
+    </param>
+    <param name="jdbcDriverClass" value="org.postgresql.Driver">
+      <comment>The JDBC driver class name.</comment>
+    </param>
+    <param name="maxWait" value="-1">
+      <comment>The maximum amount of time in milliseconds the 
+			borrowObject() method should wait before throwing an Exception when 
+            whenExhaustedAction is set to WHEN_EXHAUSTED_BLOCK. A value less 
+            than zero indicates block indefinitely.</comment>
+    </param>
+    <param name="minIdle" value="0">
+      <comment>The minimum of idle instances in pool.</comment>
+    </param>
+    <param name="minEvictableIdleTimeMillis" value="1800000">
+      <comment>The minimum amount of time in milliseconds an object can be 
+			idle in pool before eligible for eviction (if applicable). A value 
+            less than zero indicates no object will be evicted due to idle time 
+            alone.</comment>
+    </param>
+    <param name="timeBetweenEvictionRunsMillis" value="-1">
+      <comment>The time in milliseconds to sleep between runs of the idle 
+			object evictor thread. A value less than zero indicates no idle 
+			evictor thread is run.</comment>
+    </param>
+  </datastore>
+  <datastore id="localMulgaraTriplestore">
+    <comment>local Mulgara Triplestore used by the Resource Index</comment>
+    <param name="poolInitialSize" value="3">
+      <comment>The initial size of the session pool used for queries. 
+			Note: A value of 0 will cause the Resource Index to operate in 
+			synchronized mode: concurrent read/write requests are put in a queue 
+			and handled in FIFO order; this will severely impair performance and 
+			is only intended for debugging.</comment>
+    </param>
+    <param name="bufferSafeCapacity" value="40000">
+      <comment>The maximum size the buffer can reach before being forcibly 
+			flushed. If this threshold is reached, flushing will occur in the 
+			foreground and the buffer will be locked for writing until it is 
+			finished. This should be larger than autoFlushBufferSize.</comment>
+    </param>
+    <param name="autoCreate" value="true">
+      <comment>Create the model if it doesn&apos;t already exist. 
+			At startup, the model will be automatically created. In addition, an 
+			XML schema datatyped model named &quot;xsd&quot; will also be automatically 
+			created.</comment>
+    </param>
+    <param name="bufferFlushBatchSize" value="20000">
+      <comment>The number of updates to send to the triplestore at a time. 
+			This should be the same size as, or smaller than 
+			autoFlushBufferSize.</comment>
+    </param>
+    <param name="autoTextIndex" value="false">
+      <comment>Whether to propagate adds/deletes to a full-text 
+			[Full-Text] model automatically. While a very useful feature, 
+			enabling full-text indexing adds significantly to object ingest 
+			times. If true, the text model will be named modelName-fullText. 
+			Note that if this is true and autoCreate is true, the text model 
+			will also be created if it doesn&apos;t already exist.</comment>
+    </param>
+    <param name="poolMaxGrowth" value="-1">
+      <comment>Maximum number of additional sessions the pool may add. If 
+			specified as -1, no limit will be placed on pool growth.</comment>
+    </param>
+    <param name="remote" value="false">
+      <comment>Tells the connector to communicate with Mulgara in remote or 
+			local mode. If true, the host parameter must be defined. If false,
+			the path parameter must be defined.</comment>
+    </param>
+    <param name="autoFlushDormantSeconds" value="5">
+      <comment>Seconds of buffer inactivity that will trigger an 
+			auto-flush. If this threshold is reached, flushing will occur in the 
+			background, during which time the buffer is still available for 
+			writing.</comment>
+    </param>
+    <param name="serverName" value="fedora">
+      <comment>The server name for rmi binding.</comment>
+    </param>
+    <param name="autoFlushBufferSize" value="20000">
+      <comment>The size at which the buffer should be auto-flushed. If 
+			this threshold is reached, flushing will occur in the background, 
+			during which time the buffer is still available for 
+			writing.</comment>
+    </param>
+    <param name="modelName" value="ri">
+      <comment>The name of the model to use.</comment>
+    </param>
+    <param name="readOnly" value="false">
+      <comment>Whether the triplestore should be read-only. Most Fedora 
+			repositories will set this to false.</comment>
+    </param>
+    <param name="path" value="data/resourceIndex" isFilePath="true">
+      <comment>The local path to the main triplestore directory.</comment>
+    </param>
+    <param name="connectorClassName" value="org.trippi.impl.mulgara.MulgaraConnector">
+      <comment>The name of the Trippi Connector class used to communicate 
+			with the triplestore.</comment>
+    </param>
+  </datastore>
+  <datastore id="localPostgresMPTTriplestore">
+    <comment>Example local MPTStore backed by Postgres.
+		  To use this triplestore for the Resource Index:
+		  1) In fedora.fcfg, change the "datastore" parameter of the
+		     ResourceIndex module to localPostgresMPTTriplestore.
+		  2) Login to your Postgres server as an administrative user and
+		     run the following commands:
+		       CREATE ROLE "fedoraAdmin" LOGIN PASSWORD 'fedoraAdmin'
+		         NOINHERIT CREATEDB
+		         VALID UNTIL 'infinity';
+		       CREATE DATABASE "riTriples"
+		         WITH ENCODING='SQL_ASCII'
+		         OWNER="fedoraAdmin";
+		  3) Make sure you can login to your Postgres server as fedoraAdmin.
+		  4) Download the appropriate Postgres JDBC 3 driver from 
+		     http://jdbc.postgresql.org/download.html
+		     and make sure it's accessible to your servlet container.
+		     If you're running Tomcat, putting it in common/lib/ will work.</comment>
+    <param name="fetchSize" value="1000"/>
+    <param name="poolInitialSize" value="3"/>
+    <param name="bufferSafeCapacity" value="2000"/>
+    <param name="bufferFlushBatchSize" value="1000"/>
+    <param name="backslashIsEscape" value="true"/>
+    <param name="autoFlushDormantSeconds" value="5"/>
+    <param name="password" value="fedoraAdmin"/>
+    <param name="autoFlushBufferSize" value="1000"/>
+    <param name="username" value="fedoraAdmin"/>
+    <param name="poolMaxSize" value="10"/>
+    <param name="jdbcURL" value="jdbc:postgresql://localhost/riTriples"/>
+    <param name="ddlGenerator" value="org.nsdl.mptstore.impl.postgres.PostgresDDLGenerator"/>
+    <param name="connectorClassName" value="org.trippi.impl.mpt.MPTConnector"/>
+    <param name="jdbcDriver" value="org.postgresql.Driver"/>
+  </datastore>
+  <datastore id="apimUpdateMessages">
+    <comment>Messaging Destination for API-M events which update the repository</comment>
+    <param name="messageTypes" value="apimUpdate">
+      <comment>A space-separated list of message types that will be 
+            delivered to this Destination. Currently, &quot;apimUpdate&quot; and 
+            &quot;apimAccess&quot; are the only supported message types.</comment>
+    </param>
+    <param name="name" value="fedora.apim.update"/>
+    <param name="type" value="topic">
+      <comment>Optional, defaults to topic.</comment>
+    </param>
+  </datastore>
+  <datastore id="apimAccessMessages">
+    <comment>Messaging Destination for API-M events which did not make changes to the repository</comment>
+    <param name="messageTypes" value="apimAccess">
+      <comment>A space-separated list of message types that will be 
+            delivered to this Destination. Currently, &quot;apimUpdate&quot; and 
+            &quot;apimAccess&quot; are the only supported message types.</comment>
+    </param>
+    <param name="name" value="fedora.apim.access"/>
+    <param name="type" value="topic">
+      <comment>Optional, defaults to topic.</comment>
+    </param>
+  </datastore>
+</server>
Index: gs3-extensions/fedora/trunk/src/fedora-files/install.properties.in
===================================================================
--- gs3-extensions/fedora/trunk/src/fedora-files/install.properties.in	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedora-files/install.properties.in	(revision 26413)
@@ -0,0 +1,27 @@
+#Install Options
+#Fri Oct 19 15:27:22 NZDT 2012
+ri.enabled=true
+messaging.enabled=true
+apia.auth.required=false
+database.jdbcDriverClass=org.apache.derby.jdbc.EmbeddedDriver
+upstream.auth.enabled=false
+ssl.available=false
+database.jdbcURL=jdbc\:derby\:@GSDL3SRCHOME@/ext/fedora3/derby/fedora3;create\=true
+messaging.uri=vm\:(broker\:(tcp\://localhost\:61616))
+database.password=fedoraAdmin
+database.username=fedoraAdmin
+fesl.authz.enabled=false
+tomcat.shutdown.port=@tomcatshutdownport@
+deploy.local.services=true
+xacml.enabled=false
+tomcat.http.port=@tomcatport@
+fedora.serverHost=@tomcatserver@
+database=included
+database.driver=included
+fedora.serverContext=fedora
+llstore.type=akubra-fs
+tomcat.home=@GSDL3SRCHOME@/packages/tomcat
+fedora.home=@FEDORA_HOME@
+install.type=custom
+servlet.engine=existingTomcat
+fedora.admin.pass=@fedorapassw@
Index: gs3-extensions/fedora/trunk/src/fedora.xml.in
===================================================================
--- gs3-extensions/fedora/trunk/src/fedora.xml.in	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedora.xml.in	(revision 26413)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Context>
+  <Parameter name="fedora.home" value="@GSDL3SRCHOME@/ext/fedora3" />
+</Context>
Index: gs3-extensions/fedora/trunk/src/fedoragsearch-files/fgsconfig-basic.properties.in
===================================================================
--- gs3-extensions/fedora/trunk/src/fedoragsearch-files/fgsconfig-basic.properties.in	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedoragsearch-files/fgsconfig-basic.properties.in	(revision 26413)
@@ -0,0 +1,97 @@
+# file.name=fgsconfig-basic.properties
+
+# configDisplayName is displayed on the admin pages, so you know, which set of config files is in action.
+# configDisplayName is also used as directory name of the config within the FgsConfigTemplate directory.
+configDisplayName=configDemoOnLucene
+#configDisplayName=configDemoOnSolr
+#configDisplayName=configDemoOnZebra
+#configDisplayName=configProductionOnLucene
+#configDisplayName=configProductionOnSolr
+#configDisplayName=configProductionOnZebra
+#configDisplayName=myConfigExperimentName1
+
+# gsearchBase is used for SOAP deployment.
+
+#gsearchBase=http://localhost:8080
+gsearchBase=http://@tomcatserver@:@tomcatport@
+
+# gsearchAppName is used for SOAP deployment.
+gsearchAppName=fedoragsearch
+
+# gsearchUser is used for SOAP deployment.
+#gsearchUser=fgsAdmin
+gsearchUser=fedoraAdmin
+
+# gsearchPass is used for SOAP deployment.
+#gsearchPass=fgsAdminPassword
+gsearchPass=@fedorapassw@
+
+#local.FEDORA_HOME=/Users/gertschmeltzpedersen/f36
+local.FEDORA_HOME=@GSDL3SRCHOME@/ext/fedora3
+
+# finalConfigPath must be in the classpath of the web server, must be an absolute path.
+#finalConfigPath=${local.FEDORA_HOME}/tomcat/webapps/fedoragsearch/WEB-INF/classes
+finalConfigPath=@GSDL3SRCHOME@/packages/tomcat/webapps/fedoragsearch/WEB-INF/classes
+# finalConfigPath=./test
+
+# At startup, GSearch will find the file log4j.xml in tomcat classpath.
+# logFilePath is where to find the log file.
+logFilePath=${local.FEDORA_HOME}/server/logs
+
+# logLevel can be DEBUG, INFO, WARN, ERROR, FATAL.
+logLevel=DEBUG
+
+# namesOfRepositories separated by space.
+namesOfRepositories=FgsRepos
+
+# namesOfIndexes separated by space.
+namesOfIndexes=FgsIndex
+
+# Assuming there is one repository:
+
+  # fedoraBase is base url of the repository.
+  fedoraBase=http://localhost:8383
+
+  # fedoraAppName is Fedora app name of this repository.
+  fedoraAppName=fedora
+
+  # fedoraUser is the user name to access this repository.
+  fedoraUser=fedoraAdmin
+
+  # fedoraPass is the password to access this repository.
+#  fedoraPass=fedoraAdminPassword
+  fedoraPass=@fedorapassw@
+
+  # fedoraVersion is the Fedora version of this repository.
+  fedoraVersion=3.6
+
+  #objectStoreBase must be the location of the objects of this repository.
+  objectStoreBase=${local.FEDORA_HOME}/data/objectStore
+
+#Assuming there is one index:
+
+  # indexEngine is Lucene, Solr, or Zebra.
+  indexEngine=Lucene
+  #indexEngine=Solr
+  #indexEngine=Zebra
+
+  # FgsIndex: indexBase is the server base url, in case of Solr or Zebra.
+  #indexBase=http://localhost:8983/solr
+  #indexBase=http://localhost:9999/
+
+  # FgsIndex: indexDir is the path to the index.
+  indexDir=${local.FEDORA_HOME}/gsearch/FgsIndex
+
+  # FgsIndex: indexingDocXslt is the name of the indexing stylesheet.
+  #indexingDocXslt=foxmlToLucene
+  #indexingDocXslt=foxmlToLuceneDemo
+  indexingDocXslt=foxmlToLuceneGenerated
+  #indexingDocXslt=foxmlToLuceneZZZ
+  #indexingDocXslt=foxmlToSolr
+  #indexingDocXslt=foxmlToSolrDemo
+  #indexingDocXslt=foxmlToSolrGenerated
+  #indexingDocXslt=foxmlToSolrZZZ
+  #indexingDocXslt=foxmlToZebra
+  #indexingDocXslt=foxmlToZebraDemo
+  #indexingDocXslt=foxmlToZebraGenerated
+  #indexingDocXslt=foxmlToZebraZZZ
Index: gs3-extensions/fedora/trunk/src/fedoragsearch-files/foxmlToLucene.xslt
===================================================================
--- gs3-extensions/fedora/trunk/src/fedoragsearch-files/foxmlToLucene.xslt	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedoragsearch-files/foxmlToLucene.xslt	(revision 26413)
@@ -0,0 +1,224 @@
+<?xml version="1.0" encoding="UTF-8"?> 
+<!-- $Id: foxmlToLucene.xslt $ -->
+<xsl:stylesheet version="1.0"
+		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"   
+    	xmlns:exts="xalan://dk.defxws.fedoragsearch.server.GenericOperationsImpl"
+    		exclude-result-prefixes="exts"
+		xmlns:foxml="info:fedora/fedora-system:def/foxml#"
+		xmlns:dtu_meta="http://www.dtu.dk/dtu_meta/" 
+		xmlns:meta="http://www.dtu.dk/dtu_meta/meta/"
+		xmlns:dc="http://purl.org/dc/elements/1.1/"
+		xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
+		xmlns:ex="http://www.greenstone.org/namespace/fake/ex"
+		xmlns:dls="http://www.greenstone.org/namespace/fake/dls">
+	<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
+		
+	<xsl:param name="REPOSITORYNAME" select="'FgsRepos'"/>
+	<xsl:param name="REPOSBASEURL" select="'http://localhost:8080/fedora'"/>
+	<xsl:param name="FEDORASOAP" select="'http://localhost:8080/fedora/services'"/>
+	<xsl:param name="FEDORAUSER" select="'fedoraAdmin'"/>
+	<xsl:param name="FEDORAPASS" select="'fedoraAdmin'"/>
+	<xsl:param name="TRUSTSTOREPATH" select="'trustStorePath'"/>
+	<xsl:param name="TRUSTSTOREPASS" select="'trustStorePass'"/>
+<!--
+	 This xslt stylesheet generates the IndexDocument consisting of IndexFields
+     from a FOXML record. The IndexFields are:
+       - from the root element = PID
+       - from foxml:property   = type, state, contentModel, ...
+       - from oai_dc:dc        = title, creator, ...
+     The IndexDocument element gets a PID attribute, which is mandatory,
+     while the PID IndexField is optional.
+     Options for tailoring:
+       - IndexField types, see Lucene javadoc for Field.Store, Field.Index, Field.TermVector
+       - IndexField boosts, see Lucene documentation for explanation
+       - IndexDocument boosts, see Lucene documentation for explanation
+       - generation of IndexFields from other XML metadata streams than DC
+         - e.g. as for uvalibdesc included above and called below, the XML is inline
+         - for not inline XML, the datastream may be fetched with the document() function,
+           see the example below (however, none of the demo objects can test this)
+       - generation of IndexFields from other datastream types than XML
+         - from datastream by ID, text fetched, if mimetype can be handled
+         - from datastream by sequence of mimetypes, 
+           text fetched from the first mimetype that can be handled,
+           default sequence given in properties.
+-->
+
+	<xsl:variable name="PID" select="/foxml:digitalObject/@PID"/>
+	<xsl:variable name="docBoost" select="1.4*2.5"/> <!-- or any other calculation, default boost is 1.0 -->
+	
+	<xsl:template match="/">
+		<IndexDocument> 
+		    <!-- The PID attribute is mandatory for indexing to work -->
+			<xsl:attribute name="PID">
+				<xsl:value-of select="$PID"/>
+			</xsl:attribute>
+			<xsl:attribute name="boost"> <!-- example of setting a boost -->
+				<xsl:value-of select="$docBoost"/>
+			</xsl:attribute>
+		<!-- The following allows only active FedoraObjects to be indexed. -->
+		<xsl:if test="foxml:digitalObject/foxml:objectProperties/foxml:property[@NAME='info:fedora/fedora-system:def/model#state' and @VALUE='Active']">
+			<xsl:if test="not(foxml:digitalObject/foxml:datastream[@ID='METHODMAP'] or foxml:digitalObject/foxml:datastream[@ID='DS-COMPOSITE-MODEL'])">
+				<xsl:if test="starts-with($PID,'')">
+					<xsl:apply-templates mode="activeFedoraObject"/>
+				</xsl:if>
+			</xsl:if>
+		</xsl:if>
+		</IndexDocument>
+	</xsl:template>
+
+	<xsl:template match="/foxml:digitalObject" mode="activeFedoraObject">
+		    <!-- The PID index field lets you search on the PID value -->
+			<IndexField IFname="PID" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+				<xsl:value-of select="$PID"/>
+			</IndexField>
+			<IndexField IFname="REPOSITORYNAME" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+				<xsl:value-of select="$REPOSITORYNAME"/>
+			</IndexField>
+			<IndexField IFname="REPOSBASEURL" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+				<xsl:value-of select="substring($FEDORASOAP, 1, string-length($FEDORASOAP)-9)"/>
+			</IndexField>
+			
+			<!-- indexing foxml property fields -->
+			
+			<xsl:for-each select="foxml:objectProperties/foxml:property">
+				<IndexField index="UN_TOKENIZED" store="YES" termVector="NO">
+					<xsl:attribute name="IFname"> 
+						<xsl:value-of select="concat('fgs.', substring-after(@NAME,'#'))"/>
+					</xsl:attribute>
+					<xsl:value-of select="@VALUE"/>
+				</IndexField>
+			</xsl:for-each>
+			
+			<!-- indexing inline dc fields -->
+			
+			<xsl:for-each select="foxml:datastream/foxml:datastreamVersion[last()]/foxml:xmlContent/oai_dc:dc/*">
+				<IndexField index="TOKENIZED" store="YES" termVector="YES">
+					<xsl:attribute name="IFname">
+						<xsl:value-of select="concat('dc.', substring-after(name(),':'))"/>
+					</xsl:attribute>
+					<xsl:value-of select="text()"/>
+				</IndexField>
+			</xsl:for-each>
+			
+			<!-- indexing dc fields for sorting (must be UN_TOKENIZED) -->
+			
+			<IndexField IFname="TITLE_UNTOK" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+				<xsl:value-of select="foxml:datastream/foxml:datastreamVersion[last()]/foxml:xmlContent/oai_dc:dc/dc:title"/>
+			</IndexField>
+			<IndexField IFname="AUTHOR_UNTOK" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+				<xsl:value-of select="foxml:datastream/foxml:datastreamVersion[last()]/foxml:xmlContent/oai_dc:dc/dc:creator"/>
+			</IndexField>
+
+			<!-- a datastream is fetched, if its mimetype 
+			     can be handled, the text becomes the value of the field. 
+			     This is the version using PDFBox,
+			     below is the new version using Apache Tika. -->
+			<xsl:for-each select="foxml:datastream[starts-with(@ID,'EX')]/foxml:datastreamVersion[last()]/foxml:xmlContent/ex:ex/ex:metadata">
+			  <IndexField index="TOKENIZED" store="YES" termVector="YES">
+			    <xsl:attribute name="IFname">
+			      <xsl:value-of select="concat('ex.', @name)"/>
+			    </xsl:attribute>
+			    <xsl:value-of select="text()"/>
+			  </IndexField>
+			</xsl:for-each>
+			
+			<xsl:for-each select="foxml:datastream[starts-with(@ID,'DLS')]/foxml:datastreamVersion[last()]/foxml:xmlContent/dls:dls/dls:metadata">
+			  <IndexField index="TOKENIZED" store="YES" termVector="YES">
+			    <xsl:attribute name="IFname">
+			      <xsl:value-of select="concat('dls.', @name)"/>
+			    </xsl:attribute>
+			    <xsl:value-of select="text()"/>
+			  </IndexField>
+			</xsl:for-each>
+			
+			<!-- 
+			<xsl:for-each select="foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
+				<IndexField index="TOKENIZED" store="YES" termVector="NO">
+					<xsl:attribute name="IFname">
+						<xsl:value-of select="concat('ds.', @ID)"/>
+					</xsl:attribute>
+					<xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
+				</IndexField>
+			</xsl:for-each>
+			 -->
+
+			<!-- Text and metadata extraction using Apache Tika. 
+				Parameters for getDatastreamFromTika, getDatastreamTextFromTika, and getDatastreamMetadataFromTika:
+				- indexFieldTagName		: either "IndexField" (with the Lucene plugin) or "field" (with the Solr plugin)
+				- textIndexField		: fieldSpec for the text index field, null or empty if not to be generated								 (not used with getDatastreamMetadataFromTika)
+				- indexfieldnamePrefix	: optional or empty, prefixed to the metadata indexfield names											 (not used with getDatastreamTextFromTika)
+				- selectedFields		: comma-separated list of metadata fieldSpecs, if empty then all fields are included with default params (not used with getDatastreamTextFromTika)
+				- fieldSpec				: metadataFieldName ['=' indexFieldName] ['/' [index] ['/' [store] ['/' [termVector] ['/' [boost]]]]]
+						metadataFieldName must be exactly as extracted by Tika from the document. 
+										  You may see the available names if you log in debug mode, 
+										  look for "METADATA name=" under "fullDsId=" in the log, when "getFromTika" was called during updateIndex
+						indexFieldName is used as the generated index field name,
+										  if not given, GSearch uses metadataFieldName after replacement of the characters ' ', ':', '/', '=', '(', ')' with '_'
+						the following parameters are used with Lucene (with Solr these values are specified in schema.xml)
+						index			: ['TOKENIZED'|'UN_TOKENIZED']	# first alternative is default
+						store			: ['YES'|'NO']					# first alternative is default
+						termVector		: ['YES'|'NO']					# first alternative is default
+						boost			: <decimal number>				# '1.0' is default
+			-->
+			<xsl:for-each select="foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
+				<xsl:value-of disable-output-escaping="yes" select="exts:getDatastreamFromTika($PID, $REPOSITORYNAME, @ID, 'IndexField', concat('ds.', @ID), concat('dsmd_', @ID, '.'), '', $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
+			</xsl:for-each>
+
+			<!-- example of a dissemination identified in bDefPid, methodName, parameters, asOfDateTime is fetched,  
+			     if its mimetype can be handled, the text becomes the value of the IndexField. 
+			     parameters format is 'name=value name2=value2'-->
+			<!-- 
+			<IndexField IFname="fgs.Diss.text" index="TOKENIZED" store="YES" termVector="NO"
+						bDefPid="demo:19" methodName="getPDF" parameters="" asOfDateTime="" >
+			</IndexField>
+			-->
+
+			<!-- for not inline XML, the datastream may be fetched with the document() function -->
+			<!--  
+			<xsl:call-template name="example-of-xml-not-inline"/>
+			-->
+
+			<!-- This is an example of calling an extension function, see Apache Xalan, may be used for filters.
+			<IndexField IFname="fgs.DS" index="TOKENIZED" store="YES" termVector="NO">
+				<xsl:value-of select="exts:someMethod($PID)"/>
+			</IndexField>
+			-->
+			     
+			<!-- 
+			creating an index field with all text from the foxml record and its datastreams
+			-->
+
+			<IndexField IFname="foxml.all.text" index="TOKENIZED" store="YES" termVector="YES">
+				<xsl:for-each select="//text()">
+					<xsl:value-of select="."/>
+				</xsl:for-each>
+				<xsl:for-each select="//foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
+					<xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
+				</xsl:for-each>
+			</IndexField>
+
+			<IndexField IFname="ds.fulltext" index="TOKENIZED" store="YES" termVector="YES">
+			  <xsl:for-each select="//foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
+			    <xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
+			    <xsl:text>Â </xsl:text>
+			  </xsl:for-each>
+			</IndexField>
+
+	</xsl:template>
+	
+
+	<xsl:template name="example-of-xml-not-inline">
+	
+		<!-- due to Simon Lamb and Steve Bayliss -->
+		<!-- using the test object test:fgs23 -->
+		<!-- namespaces to be included in the stylesheet element -->
+			
+		<xsl:variable name="testMapplXml" select="document('http://localhost:8080/fedora/objects/test:fgs23/datastreams/testMapplXml/content')"/>
+		
+		<IndexField IFname="testMapplXml.meta.title"> 
+			<xsl:value-of select="$testMapplXml//meta:title"/>
+		</IndexField> 
+		
+	</xsl:template>
+	
+</xsl:stylesheet>	
Index: gs3-extensions/fedora/trunk/src/fedoragsearch-files/foxmlToLuceneGenerated.xslt
===================================================================
--- gs3-extensions/fedora/trunk/src/fedoragsearch-files/foxmlToLuceneGenerated.xslt	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedoragsearch-files/foxmlToLuceneGenerated.xslt	(revision 26413)
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="UTF-8"?>
+	
+
+<xsl:stylesheet version="1.0" exclude-result-prefixes="exts" xmlns:audit="info:fedora/fedora-system:def/audit#" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exts="xalan://dk.defxws.fedoragsearch.server.GenericOperationsImpl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dtu_meta="http://www.dtu.dk/dtu_meta/" xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://www.dtu.dk/dtu_meta/meta/" xmlns:ex="http://www.greenstone.org/namespace/fake/ex" xmlns:dls="http://www.greenstone.org/namespace/fake/dls">
+<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
+<xsl:param name="REPOSITORYNAME" select="'FgsRepos'"/>
+<xsl:param name="REPOSBASEURL" select="'http://localhost:8080/fedora'"/>
+<xsl:param name="FEDORASOAP" select="'http://localhost:8080/fedora/services'"/>
+<xsl:param name="FEDORAUSER" select="'fedoraAdmin'"/>
+<xsl:param name="FEDORAPASS" select="'fedoraAdmin'"/>
+<xsl:param name="TRUSTSTOREPATH" select="'trustStorePath'"/>
+<xsl:param name="TRUSTSTOREPASS" select="'trustStorePass'"/>
+<xsl:variable name="PID" select="/foxml:digitalObject/@PID"/>
+<xsl:template match="/">
+<IndexDocument boost="1.0">
+<xsl:attribute name="PID">
+<xsl:value-of select="$PID"/>
+</xsl:attribute>
+<!--The PID attribute is mandatory for indexing to work-->
+<!--The following allows only active FedoraObjects to be indexed.-->
+<xsl:if test="foxml:digitalObject/foxml:objectProperties/foxml:property[@NAME='info:fedora/fedora-system:def/model#state' and @VALUE='Active']">
+<xsl:if test="not(foxml:digitalObject/foxml:datastream[@ID='METHODMAP'] or foxml:digitalObject/foxml:datastream[@ID='DS-COMPOSITE-MODEL'])">
+<xsl:if test="starts-with($PID,'')">
+<xsl:apply-templates mode="activeFedoraObject"/>
+</xsl:if>
+</xsl:if>
+</xsl:if>
+</IndexDocument>
+</xsl:template>
+<xsl:template match="/foxml:digitalObject" mode="activeFedoraObject">
+<!--The PID index field lets you search on the PID value-->
+<IndexField IFname="PID" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+<xsl:value-of select="$PID"/>
+</IndexField>
+<IndexField IFname="REPOSITORYNAME" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+<xsl:value-of select="$REPOSITORYNAME"/>
+</IndexField>
+<IndexField IFname="REPOSBASEURL" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+<xsl:value-of select="substring($FEDORASOAP, 1, string-length($FEDORASOAP)-9)"/>
+</IndexField>
+<IndexField IFname="TITLE_UNTOK" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+<xsl:value-of select="foxml:datastream/foxml:datastreamVersion[last()]/foxml:xmlContent/oai_dc:dc/dc:title"/>
+</IndexField>
+<IndexField IFname="AUTHOR_UNTOK" index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0">
+<xsl:value-of select="foxml:datastream/foxml:datastreamVersion[last()]/foxml:xmlContent/oai_dc:dc/dc:creator"/>
+</IndexField>
+<!--indexing foxml property fields-->
+<xsl:for-each select="foxml:objectProperties/foxml:property">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO">
+<xsl:attribute name="IFname">
+<xsl:value-of select="concat('fgs.', substring-after(@NAME,'#'))"/>
+</xsl:attribute>
+<xsl:value-of select="@VALUE"/>
+</IndexField>
+</xsl:for-each>
+<!--indexing foxml fields-->
+<xsl:for-each select="//audit:action">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="audit.action" displayName="audit.action">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//audit:componentID">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="audit.componentID" displayName="audit.componentID">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//audit:date">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="audit.date" displayName="audit.date">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//audit:justification">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="audit.justification" displayName="audit.justification">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//audit:process">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="audit.process" displayName="audit.process">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//audit:process/@type">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="audit.process_type" displayName="audit.process_type">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//audit:record/@ID">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="audit.record_ID" displayName="audit.record_ID">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//audit:responsibility">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="audit.responsibility" displayName="audit.responsibility">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:creator">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.creator" displayName="dc.creator">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:date">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.date" displayName="dc.date">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:description">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.description" displayName="dc.description">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:format">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.format" displayName="dc.format">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:identifier">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.identifier" displayName="dc.identifier">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:publisher">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.publisher" displayName="dc.publisher">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:relation">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.relation" displayName="dc.relation">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:rights">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.rights" displayName="dc.rights">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:subject">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.subject" displayName="dc.subject">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//dc:title">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="dc.title" displayName="dc.title">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:contentLocation">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="foxml.contentLocation" displayName="foxml.contentLocation">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:contentLocation/@REF">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.contentLocation_REF" displayName="foxml.contentLocation_REF">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:contentLocation/@TYPE">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.contentLocation_TYPE" displayName="foxml.contentLocation_TYPE">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastream/@CONTROL_GROUP">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastream_CONTROL_GROUP" displayName="foxml.datastream_CONTROL_GROUP">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastream/@ID">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastream_ID" displayName="foxml.datastream_ID">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastream/@STATE">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastream_STATE" displayName="foxml.datastream_STATE">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastream/@VERSIONABLE">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastream_VERSIONABLE" displayName="foxml.datastream_VERSIONABLE">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastreamVersion/@CREATED">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastreamVersion_CREATED" displayName="foxml.datastreamVersion_CREATED">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastreamVersion/@FORMAT_URI">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastreamVersion_FORMAT_URI" displayName="foxml.datastreamVersion_FORMAT_URI">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastreamVersion/@ID">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastreamVersion_ID" displayName="foxml.datastreamVersion_ID">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastreamVersion/@LABEL">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastreamVersion_LABEL" displayName="foxml.datastreamVersion_LABEL">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastreamVersion/@MIMETYPE">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastreamVersion_MIMETYPE" displayName="foxml.datastreamVersion_MIMETYPE">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastreamVersion/@SIZE">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.datastreamVersion_SIZE" displayName="foxml.datastreamVersion_SIZE">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:digitalObject/@PID">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.digitalObject_PID" displayName="foxml.digitalObject_PID">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:digitalObject/@VERSION">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.digitalObject_VERSION" displayName="foxml.digitalObject_VERSION">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:digitalObject/@xsi:schemaLocation">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.digitalObject_xsi:schemaLocation" displayName="foxml.digitalObject_xsi:schemaLocation">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:property">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="foxml.property" displayName="foxml.property">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:property/@NAME">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.property_NAME" displayName="foxml.property_NAME">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//foxml:property/@VALUE">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="foxml.property_VALUE" displayName="foxml.property_VALUE">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//meta:creator">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="meta.creator" displayName="meta.creator">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//meta:description">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="meta.description" displayName="meta.description">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//meta:publisher">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="meta.publisher" displayName="meta.publisher">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//meta:subject">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="meta.subject" displayName="meta.subject">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//meta:title">
+<IndexField index="TOKENIZED" store="YES" termVector="YES" boost="1.0" IFname="meta.title" displayName="meta.title">
+<xsl:value-of select="text()"/>
+</IndexField>
+</xsl:for-each>
+<xsl:for-each select="//oai_dc:dc/@xsi:schemaLocation">
+<IndexField index="UN_TOKENIZED" store="YES" termVector="NO" boost="1.0" IFname="oai_dc.dc_xsi:schemaLocation" displayName="oai_dc.dc_xsi:schemaLocation">
+<xsl:value-of select="."/>
+</IndexField>
+</xsl:for-each>
+<!-- a datastream is fetched, if its mimetype 
+			     can be handled, the text becomes the value of the field. 
+			     This is the version using PDFBox,
+			     below is the new version using Apache Tika. -->
+<xsl:for-each select="foxml:datastream[starts-with(@ID,'EX')]/foxml:datastreamVersion[last()]/foxml:xmlContent/ex:ex/ex:metadata">
+  <IndexField index="TOKENIZED" store="YES" termVector="YES">
+    <xsl:attribute name="IFname">
+      <xsl:value-of select="concat('ex.', @name)"/>
+    </xsl:attribute>
+    <xsl:value-of select="text()"/>
+  </IndexField>
+</xsl:for-each>
+
+<xsl:for-each select="foxml:datastream[starts-with(@ID,'DLS')]/foxml:datastreamVersion[last()]/foxml:xmlContent/dls:dls/dls:metadata">
+  <IndexField index="TOKENIZED" store="YES" termVector="YES">
+    <xsl:attribute name="IFname">
+      <xsl:value-of select="concat('dls.', @name)"/>
+    </xsl:attribute>
+    <xsl:value-of select="text()"/>
+  </IndexField>
+</xsl:for-each>
+
+<!---->
+<!-- Text and metadata extraction using Apache Tika. -->
+<xsl:for-each select="foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
+<xsl:value-of disable-output-escaping="yes" select="exts:getDatastreamFromTika($PID, $REPOSITORYNAME, @ID, 'IndexField', concat('ds.', @ID), concat('dsmd.', @ID, '.'), '', $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
+</xsl:for-each>
+<!--creating an index field with all text from the foxml record and its datastreams-->
+<IndexField IFname="foxml.all.text" index="TOKENIZED" store="YES" termVector="YES">
+<xsl:for-each select="//text()">
+<xsl:value-of select="."/>
+<xsl:text>Â </xsl:text>
+</xsl:for-each>
+<xsl:for-each select="//foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
+<xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
+<xsl:text>Â </xsl:text>
+</xsl:for-each>
+</IndexField>
+
+<IndexField IFname="ds.fulltext" index="TOKENIZED" store="YES" termVector="YES">
+  <xsl:for-each select="//foxml:datastream[@CONTROL_GROUP='M' or @CONTROL_GROUP='E' or @CONTROL_GROUP='R']">
+    <xsl:value-of select="exts:getDatastreamText($PID, $REPOSITORYNAME, @ID, $FEDORASOAP, $FEDORAUSER, $FEDORAPASS, $TRUSTSTOREPATH, $TRUSTSTOREPASS)"/>
+    <xsl:text>Â </xsl:text>
+  </xsl:for-each>
+</IndexField>
+</xsl:template>
+</xsl:stylesheet>
Index: gs3-extensions/fedora/trunk/src/fedoragsearch-files/index.properties.in
===================================================================
--- gs3-extensions/fedora/trunk/src/fedoragsearch-files/index.properties.in	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedoragsearch-files/index.properties.in	(revision 26413)
@@ -0,0 +1,140 @@
+# $Id: index.properties $
+
+fgsindex.indexName					= INDEXNAME
+
+fgsindex.operationsImpl				= dk.defxws.fgslucene.OperationsImpl
+
+fgsindex.defaultUpdateIndexDocXslt		= INDEXINGDOCXSLT
+fgsindex.defaultUpdateIndexResultXslt	= updateIndexToResultPage
+fgsindex.defaultGfindObjectsResultXslt	= gfindObjectsToResultPage
+fgsindex.defaultBrowseIndexResultXslt	= browseIndexToResultPage
+fgsindex.defaultGetIndexInfoResultXslt	= copyXml
+
+#fgsindex.indexDir				= <...> 
+fgsindex.indexDir				= INDEXDIR
+
+fgsindex.analyzer				= org.apache.lucene.analysis.standard.StandardAnalyzer
+fgsindex.fieldAnalyzers			= dc.title::org.apache.lucene.analysis.standard.StandardAnalyzer dc.creator::org.apache.lucene.analysis.standard.StandardAnalyzer
+# used to index and query TOKENIZED index fields
+# for UN_TOKENIZED index fields see fgsindex.untokenizedFields further down
+
+#Stopwords file for the analyzer, comment the line if no stopwords
+#fgsindex.stopwordsLocation      = /stopwords.txt
+ 
+fgsindex.defaultQueryFields		= dc.description dc.title
+
+# setting of org.apache.lucene.queryParser.QueryParser setAllowLeadingWildcard()
+# Set to true to allow leading wildcard characters, * or ?
+# Default: false. 
+fgsindex.allowLeadingWildcard	= false
+
+# setting of org.apache.lucene.queryParser.QueryParser setLowercaseExpandedTerms()
+# Whether terms of wildcard, prefix, fuzzy and range queries are to be automatically lower-cased or not. 
+# Default: true. 
+fgsindex.lowercaseExpandedTerms = true
+
+#sortFields may be given as parameter to gfindObjects, or as config default.
+###########
+
+# as parameter:			?operation=gfindObjects&sortFields=[sortFieldsValue]&...
+
+# as config default:
+
+#fgsindex.defaultSortFields			= sortFieldsValue
+
+#examples:
+
+#fgsindex.defaultSortFields			= PID,STRING,true
+
+#fgsindex.defaultSortFields			= sf1,SCORE;sf2,cy-GB-var,true
+
+#    sortFieldsValue	::= [sortField[';'sortField]*]
+#    sortField  		::= sortFieldName[','(sortType | locale | comparatorClass)[','reverse]]]]
+#    sortFieldName		::= #the name of an index field, which is UN_TOKENIZED and contains a single term per document
+#    sortType			::= 'BYTE' | 'DOC' | 'DOUBLE' | 'FLOAT' | 'INT' | 'LONG' | 'SCORE' | 'SHORT' | 'STRING' | 'STRING_VAL'
+#    locale				::= language['-'country['-'variant]]
+#    comparatorClass    ::= package-path'.'className['('param['-'param]*')']
+#    reverse			::= 'false' (default) | 'true' | 'reverse'
+
+#    sortType 'AUTO' is removed in Lucene 3.x
+
+# The test class dk.defxws.fedoragsearch.test.ComparatorSourceTest has been removed in GSearch 2.3,
+# because the interface org.apache.lucene.search.SortComparatorSource is deprecated in Lucene 3.x
+
+# Briefly, one or more sortFields will determine the sequence of search results,
+# as defined either by sortType or by locale, and it may be in reverse.
+
+# If no sortFieldsValue is given, then this code from GSearch is run
+
+#   TopDocs hits = searcher.search(query, numHits); // in dk.defxws.fgslucene.Statement.java
+  
+# where the sequence is by default.
+
+# If a sortFieldsValue is given, then this code is run
+
+#   TopDocs hits = searcher.search(query, numHits, sort); 
+
+# where sort is an instance of org.apache.lucene.search.Sort, see
+
+#   http://lucene.apache.org/java/3_3_0/api/index.html
+
+# See org.apache.lucene.search.SortField for more about sortType, locale and reverse values.
+
+
+#fgsindex.untokenizedFields		= list of index fields created as UN_TOKENIZED
+###########################
+#									Effect: during search the KeywordAnalyzer is used for untokenized fields,
+#									while the fgsindex.analyzer is used for other fields.
+#									Only untokenized fields, which do not occur in every index document,
+#									need be listed here.
+# example:
+
+#fgsindex.untokenizedFields		= fgs.contentModel uf1 uf2
+fgsindex.untokenizedFields		= PID
+
+
+# snippets
+##########
+#fgsindex.snippetBegin	= <span class=\"highlight\">
+fgsindex.snippetBegin	= <span class=\"highlight\">
+## this value is default if not specified
+#fgsindex.snippetEnd	= </span>
+fgsindex.snippetEnd	= </span>
+## this value is default if not specified
+
+
+# optimization  see e.g. http://www.onjava.com/pub/a/onjava/2003/03/05/lucene.html
+##############
+# fgsindex.mergeFactor		= 10
+fgsindex.mergeFactor		= 100
+## 10 is default if not specified
+# fgsindex.maxBufferedDocs	= 10
+fgsindex.maxBufferedDocs	= 100
+## 10 is default if not specified
+# fgsindex.defaultWriteLockTimeout	= 1000
+#fgsindex.defaultWriteLockTimeout	= 0
+fgsindex.defaultWriteLockTimeout	= @indexwritelocktimeout@
+## 0 is default if not specified
+# from http://lucene.apache.org/java/2_3_0/api/IndexWriter.html :
+## mergeFactor
+##   determines how often segment indices are merged by addDocument(). 
+##   With smaller values, less RAM is used while indexing, and searches on unoptimized indices are faster, 
+##   but indexing speed is slower. With larger values, more RAM is used during indexing, 
+##   and while searches on unoptimized indices are slower, indexing is faster. 
+##   Thus larger values (> 10) are best for batch index creation, 
+##   and smaller values (< 10) for indices that are interactively maintained.
+## maxBufferedDocs 
+##   determines the minimal number of documents required 
+##   before the buffered in-memory documents are merged and a new Segment is created. 
+##   Since Documents are merged in a RAMDirectory, large value gives faster indexing. 
+##   At the same time, mergeFactor limits the number of files open in a FSDirectory.
+## defaultWriteLockTimeout 
+##   sets the default maximum time to wait for a write lock (in milliseconds). 
+
+#  ...?operation=updateIndex&action=optimize
+##        will perform IndexWriter.optimize()
+##        which merges all segments together into a single segment, optimizing an index for search.
+
+# custom URIResolver
+####################
+#fgsindex.uriResolver	= dk.defxws.fedoragsearch.server.URIResolverImpl
Index: gs3-extensions/fedora/trunk/src/fedoragsearch-files/runRESTClient.bat
===================================================================
--- gs3-extensions/fedora/trunk/src/fedoragsearch-files/runRESTClient.bat	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedoragsearch-files/runRESTClient.bat	(revision 26413)
@@ -0,0 +1,14 @@
+@echo off
+
+::pushd "%CD%"
+set startdir=%CD%
+CD /D "%~dp0"
+
+set LIB=..\WEB-INF\lib
+set JARS=%LIB%\fedora-client-3.1.jar;%LIB%\log4j-1.2.15.jar;%LIB%\activation-1.1.1.jar;%LIB%\axis.jar;%LIB%\commons-discovery.jar;%LIB%\commons-logging.jar;%LIB%\jaxrpc-api-1.1.jar;%LIB%\mail.jar;%LIB%\saaj-api-1.3.jar;%LIB%\lucene-core-2.4.0.jar;%LIB%\wsdl4j-1.5.1.jar;%LIB%\PDFBox-0.7.2.jar;%LIB%\xml-apis.jar
+
+java -cp ..\WEB-INF\classes;%JARS% dk.defxws.fedoragsearch.client.RESTClient %1 %2 %3 %4 %5 %6 %7 %8
+
+:: popd
+cd "%startdir%"
+set startdir=
Index: gs3-extensions/fedora/trunk/src/fedoragsearch-files/runRESTClient.sh
===================================================================
--- gs3-extensions/fedora/trunk/src/fedoragsearch-files/runRESTClient.sh	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedoragsearch-files/runRESTClient.sh	(revision 26413)
@@ -0,0 +1,35 @@
+#!/bin/sh
+#$Id$
+
+# <p><b>License and Copyright: </b>The contents of this file will be subject to the
+# same open source license as the Fedora Repository System at www.fedora.info
+# It is expected to be released with Fedora version 2.2.
+
+# Copyright &copy; 2006 by The Technical University of Denmark.
+# All rights reserved.</p>
+
+# @author  gsp@dtv.dk
+# @version 
+
+# Need to run this script from its own directory instead of whichever directory it may be called from
+thisdir="`dirname \"$0\"`"
+thisdir="`cd \"$thisdir\" && pwd`"
+cd "$thisdir"
+
+        if [ -z "$fgsUserName" ] ; then 
+            echo -n "GSearch user name: "
+            read fgsUserName
+            echo -n "Password: "
+            stty -echo
+            read fgsPassword
+            stty echo
+            if [ -z "$fgsPassword" ] ; then 
+                fgsPassword=$fgsUserName
+            fi;
+            echo ""
+        fi;
+    
+LIB=../WEB-INF/lib
+JARS=$LIB/log4j-1.2.15.jar:$LIB/activation-1.1.1.jar:$LIB/axis.jar:$LIB/commons-discovery.jar:$LIB/commons-logging.jar:$LIB/jaxrpc-api-1.1.jar:$LIB/mail.jar:$LIB/saaj-api-1.3.jar:$LIB/lucene-core-2.4.0.jar:$LIB/wsdl4j-1.5.1.jar:$LIB/PDFBox-0.7.2.jar:$LIB/xml-apis.jar
+
+java -Xms64m -Xmx96m -Dfedoragsearch.fgsUserName=$fgsUserName -Dfedoragsearch.fgsPassword=$fgsPassword -cp ../WEB-INF/classes:$JARS dk.defxws.fedoragsearch.client.RESTClient $1 $2 $3 $4 $5 $6 $7 $8 $9
Index: gs3-extensions/fedora/trunk/src/fedoragsearch-files/runSOAPClient.sh
===================================================================
--- gs3-extensions/fedora/trunk/src/fedoragsearch-files/runSOAPClient.sh	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedoragsearch-files/runSOAPClient.sh	(revision 26413)
@@ -0,0 +1,35 @@
+#!/bin/sh
+#$Id$
+
+# <p><b>License and Copyright: </b>The contents of this file will be subject to the
+# same open source license as the Fedora Repository System at www.fedora.info
+# It is expected to be released with Fedora version 2.2.
+
+# Copyright &copy; 2006 by The Technical University of Denmark.
+# All rights reserved.</p>
+
+# @author  gsp@dtv.dk
+# @version 
+
+# Need to run this script from its own directory instead of whichever directory it may be called from
+thisdir="`dirname \"$0\"`"
+thisdir="`cd \"$thisdir\" && pwd`"
+cd "$thisdir"
+
+        if [ -z "$fgsUserName" ] ; then 
+            echo -n "GSearch user name: "
+            read fgsUserName
+            echo -n "Password: "
+            stty -echo
+            read fgsPassword
+            stty echo
+            if [ -z "$fgsPassword" ] ; then 
+                fgsPassword=$fgsUserName
+            fi;
+            echo ""
+        fi;
+
+LIB=../WEB-INF/lib
+JARS=$LIB/fedora-client-3.1.jar:$LIB/log4j-1.2.15.jar:$LIB/activation-1.1.1.jar:$LIB/axis.jar:$LIB/commons-discovery.jar:$LIB/commons-logging.jar:$LIB/jaxrpc-api-1.1.jar:$LIB/mail.jar:$LIB/saaj-api-1.3.jar:$LIB/lucene-core-2.4.0.jar:$LIB/wsdl4j-1.5.1.jar:$LIB/PDFBox-0.7.2.jar:$LIB/xml-apis.jar
+USER=
+java -Xms64m -Xmx96m -Dfedoragsearch.fgsUserName=$fgsUserName -Dfedoragsearch.fgsPassword=$fgsPassword -cp ../WEB-INF/classes:$JARS dk.defxws.fedoragsearch.client.SOAPClient $1 $2 $3 $4 $5 $6 $7 $8 $9
Index: gs3-extensions/fedora/trunk/src/fedoragsearch-files/web.xml
===================================================================
--- gs3-extensions/fedora/trunk/src/fedoragsearch-files/web.xml	(revision 26413)
+++ gs3-extensions/fedora/trunk/src/fedoragsearch-files/web.xml	(revision 26413)
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- $Id: web.xml 7814 2008-10-31 13:23:21Z gertsp $ -->
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
+    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
+<web-app>
+	<display-name>Fedora Generic Search REST</display-name>
+	<servlet>
+		<servlet-name>AxisServlet</servlet-name>
+		<display-name>Apache-Axis Servlet</display-name>
+		<servlet-class>
+	        org.apache.axis.transport.http.AxisServlet
+	    </servlet-class>
+	</servlet>
+	<servlet>
+		<servlet-name>AdminServlet</servlet-name>
+		<display-name>Axis Admin Servlet</display-name>
+		<servlet-class>
+	        org.apache.axis.transport.http.AdminServlet
+	    </servlet-class>
+        <init-param>
+          <param-name>enableRemoteAdmin</param-name>
+          <param-value>true</param-value>
+        </init-param>
+        <load-on-startup>100</load-on-startup>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>AxisServlet</servlet-name>
+		<url-pattern>/soap/*</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>AxisServlet</servlet-name>
+		<url-pattern>/services/*</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>AxisServlet</servlet-name>
+		<url-pattern>/AdminService</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>AxisServlet</servlet-name>
+		<url-pattern>*.jws</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>AxisServlet</servlet-name>
+		<url-pattern>/AxisServlet</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>AdminServlet</servlet-name>
+		<url-pattern>/AdminServlet</url-pattern>
+	</servlet-mapping>
+	<servlet>
+		<servlet-name>GenericSearchREST</servlet-name>
+		<display-name>Fedora Generic Search REST</display-name>
+		<servlet-class>
+			dk.defxws.fedoragsearch.server.RESTImpl
+		</servlet-class>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>GenericSearchREST</servlet-name>
+		<url-pattern>/rest/*</url-pattern>
+	</servlet-mapping>
+	<servlet>
+        <servlet-name>UpdateListener</servlet-name>
+        <servlet-class>dk.defxws.fedoragsearch.server.UpdateListener</servlet-class>
+        <load-on-startup>101</load-on-startup>
+    </servlet>
+    <filter>
+      <filter-name>SetupFilter</filter-name>
+      <filter-class>org.fcrepo.server.security.servletfilters.FilterSetup</filter-class>
+    </filter>
+    <filter>
+      <filter-name>XmlUserfileFilter</filter-name>
+      <filter-class>org.fcrepo.server.security.servletfilters.xmluserfile.FilterXmlUserfile</filter-class>
+    </filter>
+    <filter>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <filter-class>org.fcrepo.server.security.servletfilters.FilterEnforceAuthn</filter-class>
+    </filter>
+    <filter>
+      <filter-name>FinalizeFilter</filter-name>
+      <filter-class>org.fcrepo.server.security.servletfilters.FilterFinalize</filter-class>
+    </filter>
+    <filter-mapping>
+      <filter-name>SetupFilter</filter-name>
+      <url-pattern>/*</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>XmlUserfileFilter</filter-name>
+      <url-pattern>/*</url-pattern>
+    </filter-mapping>
+<!--
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <servlet-name>AxisServlet</servlet-name>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <servlet-name>GenericSearchREST</servlet-name>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <url-pattern>/index.html</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+      <filter-name>EnforceAuthnFilter</filter-name>
+      <url-pattern>/rest</url-pattern>
+    </filter-mapping>
+-->
+    <filter-mapping>
+      <filter-name>FinalizeFilter</filter-name>
+      <url-pattern>/*</url-pattern>
+    </filter-mapping>
+	<welcome-file-list id="WelcomeFileList_1">
+		<welcome-file>index.html</welcome-file>
+	</welcome-file-list>
+	<login-config>
+		<auth-method>BASIC</auth-method>
+		<realm-name>Fedora Management Interface</realm-name>
+	</login-config>
+</web-app>
