Class CollectionArchiveConfig
java.lang.Object
io.goobi.viewer.model.export.bagit.CollectionArchiveConfig
The resolved set of
content types that a per-collection BagIt archive should contain, as configured in
config_viewer.xml under <collectionArchives>.
A <default field="…"> block defines the baseline for a Solr collection field; a <collection name="…" field="…"> block
defines a sparse override — only the content-type toggles it lists change the effective set, everything else is inherited from the
default. The merge of override onto default is performed while reading the configuration (see
Configuration.getCollectionArchiveConfig(String, String)); this class simply holds the resolved,
effective set of enabled content types.
Instances are immutable.
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionArchiveConfig(String field, String collectionName, Set<ArchiveContentType> enabledTypes) -
Method Summary
Modifier and TypeMethodDescriptiongetField()booleanbooleanisEnabled(ArchiveContentType type) toString()
-
Constructor Details
-
CollectionArchiveConfig
public CollectionArchiveConfig(String field, String collectionName, Set<ArchiveContentType> enabledTypes) - Parameters:
field- the Solr collection field this configuration applies to (e.g.DC)collectionName- the collection name for a per-collection override, ornullfor the<default>blockenabledTypes- the content types explicitly enabled in this block (never null)
-
-
Method Details
-
getField
- Returns:
- the Solr collection field (e.g.
DC)
-
getCollectionName
- Returns:
- the collection name for a per-collection override, or
nullfor the default block
-
getEnabledTypes
- Returns:
- the effective set of enabled content types (unmodifiable, never null)
-
isEnabled
- Parameters:
type- the content type to check- Returns:
- true if the given content type is enabled in this configuration
-
hasEnabledTypes
public boolean hasEnabledTypes()- Returns:
- true if at least one content type is enabled, i.e. an archive would actually contain payload
-
toString
-