A powerful feature of fedora 4 is projection or federation, in which large swaths of data from external sources can be treated and exposed as repository content
To easily test this feature during the install fest, we've built a sample war file that exposes a federation over the home directory of the user account under which the application is running.
Currently the configuration (which specifies which files to expose at what path) can only easily be edited before the application is compiled. The following instructions explain the process of configuring, building
Requires Git, Maven 3, Java 7.
Get the source code:
git clone https://github.com/futures/fcrepo4.git |
Update the repository configuration (fcrepo4/fcrepo-http-commons/target/classes/config/rest-sessions/repository.json
) to include the following lines after the node-types definition (add a comma):
"externalSources" : { "home-directory" : { "classname" : "org.modeshape.connector.filesystem.FileSystemConnector", "directoryPath" : "${user.home}", "projections" : [ "default:/home => /" ], "readOnly" : true, "addMimeTypeMixin" : true } } |
directoryPath
parameter specifies the base directory of the filesystem that is accessible to fedora.projections
parameter creates one or more mappings from a repository path to a filesystem path (relative to the base directory specified in directoryPath
).Install the fcrepo-jcr artifacts to your local maven repository:
cd fcrepo4/fcrepo-jcr mvn clean install |
Run the web application in jetty:
cd fcrepo/fcrepo-webapp mvn clean jetty:run |
Browse your home directory through fedora at http://localhost:8080/rest/home