diff --git a/ocfl-java-core/src/main/java/edu/wisc/library/ocfl/core/extension/storage/layout/config/NTupleOmitPrefixStorageLayoutConfig.java b/ocfl-java-core/src/main/java/edu/wisc/library/ocfl/core/extension/storage/layout/config/NTupleOmitPrefixStorageLayoutConfig.java index fe9c5c38..4957641c 100644 --- a/ocfl-java-core/src/main/java/edu/wisc/library/ocfl/core/extension/storage/layout/config/NTupleOmitPrefixStorageLayoutConfig.java +++ b/ocfl-java-core/src/main/java/edu/wisc/library/ocfl/core/extension/storage/layout/config/NTupleOmitPrefixStorageLayoutConfig.java @@ -26,6 +26,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonValue; +import edu.wisc.library.ocfl.api.exception.OcflExtensionException; import edu.wisc.library.ocfl.api.util.Enforce; import edu.wisc.library.ocfl.core.extension.OcflExtensionConfig; import edu.wisc.library.ocfl.core.extension.storage.layout.NTupleOmitPrefixStorageLayoutExtension; @@ -74,6 +75,13 @@ public String getExtensionName() { return NTupleOmitPrefixStorageLayoutExtension.EXTENSION_NAME; } + public void setExtensionName(String extensionName) { + if (!Objects.equals(getExtensionName(), extensionName)) { + throw new OcflExtensionException(String.format("The extension name for %s must be %s; found %s.", + getClass().getSimpleName(), getExtensionName(), extensionName)); + } + } + @JsonIgnore @Override public boolean hasParameters() {