...
Code Block |
---|
"externalSources" : {
"federated-directory" : {
"classname" : "org.fcrepo.connector.file.FedoraFileSystemConnector",
"directoryPath" : "/path/to/files",
"propertiesDirectoryPath" : "/path/to/external/properties"
"projections" : [ "default:/federated => /" ],
"contentBasedSha1" : "false",
"readonly" : true,
"extraPropertiesStorage" : "none",
"cacheTtlSeconds" : 5
}
}, |
directoryPath
- base directory for all files shared with the repository- propertiesDirectoryPath - (optional) a path, that if specified causes computed properties to be stored in an external file structure
projections -
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-only ( currently read-only is the only supported mode)extraPropertiesStorage
- 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 properties. This property is ignored if "cacheTtlSeconds
- 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.
...
Code Block |
---|
insert data { <> <http://fedora.info/definitions/v4/rels-ext#hasExternalContent> <http://localhost:8080/rest/federated/file/fcr:content> . } |
Anchor external-properties external-properties
external-properties | |
external-properties |
Separate Properties Store
For a connector, even a read-only connector, some properties are computed and stored. These include a modification date and a checksum (if enabled) which is only recomputed when the file is altered. If is not desirable or possible to store these properties on the same file system path that is being projected over you may specify an alternate location (propertiesDirectoryPath) in which those properties will be cached. This is especially important when using checksums in directories of large files.
Transactions
Basic testing has been completed with transactions over a read/write filesystem federation. Content will not be written to the filesystem federation until a transaction is complete. For transactions that are never completed (due to rollback or timeout) content is never written to the filesystem.
...