...
Code Block |
---|
"externalSources" : { "federated-directory" : { "classname" : "org.fcrepo.connector.file.FedoraFileSystemConnector", "directoryPath" : "/path/to/files", "projections" : [ "default:/federated => /" ], "contentBasedSha1" : "false", "readonly" : true, "extraPropertiesStorage" : "none" , "cacheTtlSeconds" : 5 } }, |
directoryPath
- base directory for all files shared with the repositoryprojections -
lists one or more mappings from the repository to the filesystem. The format is "{workspace}:{repository path} => {path relative todirectoryPath
}". See Multiple Directories below for how to handle multiple mappings.contentBasedSha1 -
controls how internal identifiers are computed for files. By default (contentBaseSha1
= true), Modeshape computes the SHA-1 checksum of a file's content every time the file is accessed. For small files this creates a modest overhead. For large files, however, this dramatically reduces performance, since generating the checksum can take several seconds per gigabyte of data. For this reason, we recommend settingcontentBasedSha1
to false when serving files larger than 100MBreadonly -
controls whether the contents of the filesbase directory for all files shared with the repository are read-onlyextraPropertiesStorage
- sets the format for storing "extra" properties (properties that can't be set using filesystem attributes). Recommended values are "json" for the current JSON properties format, or "none" for disabling extra propertiescacheTtlSeconds
- the maximum time that cached entries are held before being refreshed. Setting to a low value will make changes to the filesystem (like adding new files) show up more quickly in the REST API. Setting to a higher value will improve performance for files that don't change often.
Modeshape's FileSystemConnector documentation and configuration provide additional information about configuring the filesystem connector.
...
Code Block |
---|
"externalSources" : { "federated-1" : { "classname" : "org.fcrepo.connector.file.FedoraFileSystemConnector", "directoryPath" : "/pub", "projections" : [ "default:/pub => /", "default:/project1 => /project1", "default:/project2 => /project2" ], "contentBasedSha1" : "false", "readonly" : true, "extraPropertiesStorage" : "none", "cacheTtlSeconds" : 5 } }, |
This configuration would provide the following mappings:
...