config_contentServer.xml
In the file config_contentServer.xml
, technical details about the content server used in Goobi are provided. The configuration file can be used for Goobi Workflow and Goobi Viewer in the same way.
The file is usually located at the following location:
For example, this configuration file looks as follows:
Data types
In this configuration file settings are made with different data types. For overview all used types are explained briefly in the following table:
Data type | Examples | Meaning |
---|---|---|
|
| Boolean value: can be true or false |
|
| Text: can contain any characters |
|
| Integer: can contain all positive or negative numbers (or 0) |
|
| Large integer: like |
|
| Floating point number: decimal number with few digits precision |
|
| Floating point number: decimal number with many digits precision |
General settings and default values
Property | Type | Default Value | Description |
---|---|---|---|
| string | /opt/digiverso/config/config_contentServer.xml` | This parameter can be used in the |
| integer |
| This parameter can be used in the |
| integer |
| This value specifies a timeout that must not be exceeded when sending image files. |
| string |
| This element specifies the path to a library to process image files with. |
In addition, the imageToPdfSizeFactor
element can be used to set arbitrary parameters for file types for which a special factor should be used to scale from that file type to a PDF file (see example). In that case the image file extensions are used as parameter names and the scaling factors as values. A scaling of 1.0 means that the image size remains the same. Values below 1.0 or above 1.0 reduce or enlarge the image. The value 0 should not be used.
The size of image files can be limited on the content server. The following parameters can be used in the maxFileLength
element:
Property | Type | Default Value | Description |
---|---|---|---|
| integer |
| This parameter specifies the maximum file size in megabytes. 0 can be specified to deactivate the size limit. |
| string | This parameter specifies a file which can be used as a substitute in case of an error (if the file is too large). |
For different application purposes it may be useful to scale images differently. The following parameters can be used in the scaling
element:
Property | Type | Default Value | Description |
---|---|---|---|
| string |
| This parameter specifies the scaling quality. The values |
| string |
| This parameter specifies the scaling quality for thumbnails. The values |
| integer |
| This parameter additionally specifies a quality factor for scaling image files with the "Java Advanced Imaging" library (JAI). It can be between 0 and 99. Image files have a higher quality the higher this value is. A lower value, on the other hand, speeds up the loading process. Recommended values are between 10 and 50. |
For downloading images generated in the content server, a default file name can be specified here. The following parameters can be used in the image
and pdf
elements within the defaultFileNames
element:
Property | Type | Default Value | Description |
---|---|---|---|
| string |
| This parameter specifies how a file name should be formed. Here |
| boolean |
| This parameter specifies whether an |
Default paths for locations of different file types can be specified for non-complete requests to the content server. The following parameters can be used in the defaultRepositoryPathImages
, defaultRepositoryPathPdf
, defaultRepositoryPathAlto
, and defaultRepositoryPathMets
elements:
Property | Type | Default Value | Description |
---|---|---|---|
| boolean |
| This parameter can be used with the elements |
| string |
| This parameter can be used with all elements and specifies the path to the corresponding folder. |
| string | This parameter can only be used with |
The image
data type initially includes all image file types which are not specified in detail. Therefore, defaultImageConfig
can be used to make settings for image files. The following parameters can be used in the defaultImageConfig
element:
Property | Type | Default Value | Description |
---|---|---|---|
| string |
| This parameter specifies the default image type. |
PDF files are configured separately because they have some special properties unlike other image file formats. The following parameters can be used in the defaultPdfConfig
element:
Property | Type | Default Value | Description |
---|---|---|---|
| string |
| This parameter specifies the page size of the PDF document. Possible values are |
| float |
| This parameter specifies the resolution (pixels per inch / dots per inch). The image file size (in pixels) remains the same. 0 can be specified to disable resolution scaling. |
| float |
| This parameter specifies the image scaling. 1.0 means the original size. A value below 1.0 decreases the image size, a value above 1.0 increases it. This value should not be set to 0, otherwise the image will disappear (0 pixel size). |
| string | This parameter specifies how the image file should be scaled. A combination of two positive numbers (width and height) is expected in this field. Both numbers are separated by an | |
| integer |
| This parameter specifies how much the image file should be compressed. 0 is a default value where a suitable JPEG compression is automatically selected. 0 should normally always be used. |
| boolean |
| This parameter specifies whether the image file should be converted to grayscale. |
| boolean |
| This parameter specifies whether the image file should be of type PDF-A. |
| string |
| This parameter specifies which metadata group should be used. |
| string | This parameter can be used to specify a URL which should not be used as a reference source for meta information when exporting PDF files. |
A color can be specified to mark different image elements. The following parameters can be used in the defaultHighlightColor
element:
Property | Type | Default Value | Description |
---|---|---|---|
| integer |
| This parameter specifies the red value in the range from 0 to 255. |
| integer |
| This parameter specifies the green value in the range from 0 to 255. |
| integer |
| This parameter specifies the blue value in the range from 0 to 255. |
| integer |
| This parameter specifies the alpha (transparency) value in the range from 0 to 255. |
The following table shows some simple color examples:
Configuration | Color |
---|---|
| Black |
| Blue |
| Green |
| Cyan |
| Red |
| Magenta |
| Yellow |
| White |
Where alpha="255"
means full opacity of the color (covers the image area completely) and alpha="0"
means no opacity (invisible).
Image file types
Within the imageTypeSettings
element, settings for any number of image file types can be defined. For each image file type a type
element with the sub-element settings
is specified.
For file types (type
) the following parameters can be used:
Property | Type | Default Value | Description |
---|---|---|---|
| string |
| This parameter specifies the type of the image file. This type corresponds to the associated file extension. |
| double |
| This parameter specifies the minimum size (in bytes) of an image file. |
| double |
| This parameter specifies the maximum size (in bytes) of an image file. |
| string |
| This parameter specifies a compression type. |
| string |
| This parameter specifies the way color values are stored. |
| string |
| This parameter specifies a color profile. |
| boolean | This parameter specifies whether watermarks should be used. |
Note: The minSize
and maxSize
parameters are queried as floating point numbers in the configuration, but later processed as long
-numbers. Therefore, only integers should be specified.
For file type settings (settings
) the following parameters can be used:
Property | Type | Default Value | Description |
---|---|---|---|
| string | This parameter specifies a Java class that can read image files of this file type. | |
| string | This parameter specifies a Java class that can write image files of this file type. | |
| boolean |
| This parameter specifies whether the "Java Advanced Imaging" library (JAI) should be used. |
| boolean |
| This parameter specifies whether images should be rendered using the "Java Advanced Imaging" library (JAI). |
| boolean |
| This parameter specifies whether images should be scaled using the "Scalr" algorithm. This gives even better results, but is slower. Normally this value should be |
| boolean |
| This parameter specifies whether images should be buffered during processing. |
| boolean |
| This parameter specifies whether images should be converted to the |
| boolean |
| This parameter specifies whether images that do not need further processing should be taken directly from the raw data. If this option is set to |
| boolean |
| This parameter specifies whether to use "SubSampling". |
Water marks
When automatically processing and checking image files, the content server can set watermarks. These are images or parts of images that are inserted into the processed image as a kind of identity information (of the author). Watermarks can be configured with the watermark
element and contain the following parameters:
Property | Type | Default Value | Description |
---|---|---|---|
| boolean |
| This parameter specifies whether watermarks should be used. |
| string | This parameter specifies the path to another configuration file for the information in the watermark. | |
| boolean |
| This parameter specifies whether watermarks should be scaled. |
| integer |
| This parameter specifies to which size (in percent) the watermark should be scaled. |
| boolean |
| This parameter can be set to |
Error watermarks can be used not to display errors in documents on a subsequent error web page, but to use them as watermarks (=overlay) directly in the image files. These can be configured with the errorWaterMark
element and contain the following parameters:
Property | Type | Default Value | Description |
---|---|---|---|
| string | This parameter specifies the title to be included in an error watermark. | |
| integer | This parameter specifies the font size to use for the title of an error watermark. | |
| integer |
| This parameter specifies which font size the error message ( |
| integer |
| This parameter specifies the maximum number of characters that should be in one line of the error message of an error watermark. |
PDF title pages
The content server can generate three different types of artificial title pages and insert them at appropriate places in multi-page PDF files. Artificial title pages are pages that contain some meta information about the document or chapter or document section that follows. Metadata is read from METS files of the corresponding process. Additionally, it is also possible to display image content linked in the METS file. The layout as well as static contents of the metadata pages are specified by XML documents, so-called templates, which can be customized according to individual needs.
With pdfTitlePage
a unique title page can be generated for the entire PDF document. It is inserted before the first page and can only contain information about the entire work and the top structural element contained in the PDF file.
The pdfChapterTitlePages
element can be used to insert title pages before each chapter or structure element and can contain information about the respective structure element and the overall work. For example, these pages can contain information about the document structure (tables of contents, chapters, subchapters, appendices, etc.).
The 'singlePdfTitlePage' element can be used to include additional, individual title pages in the PDF document, which provide information about special places in a book, for example. It can contain only information about the whole work.
.fo` template files can be used to generate additional PDF title pages. These can either be specified in server requests or specified in the following XML elements.
The specified folders (templateFolder
) must contain at least for each active metadata page the XML file with file extension .fo
specified in defaultTemplate
, and the file fop.xconf
which contains further settings for conversion to PDF using "Apache fop". Details about "Apache fop" can be found at this location .
Property | Type | Default Value | Description |
---|---|---|---|
| boolean |
| This parameter can be used with all types of title pages and specifies whether they should be used. |
| string |
| This parameter can be used with all types of title pages and specifies a folder where a template file is located. |
| string |
| This parameter can be used with all types of title pages and specifies a (non-default) template to use. A template file has the file extension |
| string | This parameter can only be used with | |
| string | This parameter can only be used with |
REST API
The REST API can be used to retrieve information about image files at the content server. The parameters attribution
, logo
and license
are additional specifications that can optionally be set in the image metadata of the returned image files.
Property | Type | Default Value | Description |
---|---|---|---|
| boolean |
| This parameter can be used to specify whether the REST API should be used. |
| string | This value contains information about an IIIF attribution. | |
| string | This value contains information about an IIIF logo. | |
| string | This value contains information about an IIIF license. | |
| boolean |
| This value can be set to |
Cache storage
Caches can be used to temporarily store image data so that it is not necessary to recalculate all data for each (possibly identical) request. Different caches are used for processing different file types, which can be configured in more detail with the following XML elements. The contentCache
element can be used for a general cache for image files, the pdfCache
element for a cache for PDF files, and the thumbnailCache
element for a cache for thumbnails.
Property | Type | Default Value | Description |
---|---|---|---|
| boolean |
| This parameter can be used with all cache types and specifies whether the respective cache should be used. |
| long |
| This parameter can be used with all cache types and specifies the maximum size in megabytes of the respective cache. |
| boolean |
| This parameter can be used with all cache types and specifies whether to use shortened file names. These will then only contain differing parts of the file path, but are not recommended. |
| string | This parameter can be used with | |
| boolean |
| This parameter can only be used with |
Performance
The memoryUsage
element can be used to specify some memory and runtime constraints for the content server. The memoryUsage
element contains general settings and further subelements for specific file types. The following parameters can be used for memoryUsage
:
Property | Type | Default Value | Description |
---|---|---|---|
| integer |
| This parameter specifies how many requests may be sent simultaneously for image files. |
| integer |
| This parameter specifies how many requests may be sent simultaneously for PDF files. |
| long |
| This parameter specifies the maximum data transfer time for all file types. |
| string |
| This parameter specifies the unit of measurement for the memory size specifications in all |
| string |
| This parameter specifies the unit of measure for the time information in all |
| boolean |
| This parameter can be set to |
For the parameter memoryUnit
there are some, partly misleading, values. The following table shows in each case which values can be used and which exact numeric values they correspond to internally.
Unit | Factor | Designation |
---|---|---|
|
| Byte |
|
| Kilobyte |
|
| Kibibyte |
|
| Megabyte |
|
| Mebibyte |
|
| Gigabyte |
|
| Gibibyte |
|
| Terabyte |
|
| Tebibyte |
There are also several possible values for the timeoutUnit
parameter. The following table shows in each case how these are interpreted internally:
Unit | Factor | Designation |
---|---|---|
|
| One second |
|
| One millisecond |
|
| One microsecond |
|
| One nanosecond |
With the sub-elements image
, pdf
and metsPdf
special settings can be made for the corresponding file types. The following parameters can be used equally for all subelements:
Property | Type | Default Value | Description |
---|---|---|---|
| integer |
| This value specifies the maximum number of parallel requests that may be made simultaneously. |
| long |
| This value specifies the maximum amount of data that should be sent simultaneously. This value must be configured to match the |
| long |
| This value specifies the maximum data transfer time. This value must be configured to match the |
S3 storage
The S3
element can optionally be used to include S3 cloud storage to offload data.
Property | Type | Default Value | Description |
---|---|---|---|
| boolean | This value can be used to specify whether S3 storage should be used. | |
| string | This value specifies the address (URL) of the S3 server. If necessary, the protocol ( | |
| string | This value specifies the ID of the account on the S3 service. | |
| string | This value specifies the key / password of the S3 account. |
Zuletzt aktualisiert