Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ The docker container has its own install script which uses the environment varia
| ENABLE_SOLR_CLOUD | false | If true the Solr Cloud mode is enabled. (solr cores/collections will be created on install). Sets `MCR.Solr.IndexRegistry.Index.*.Class` to `MCRConfigurableSolrCloudCollection` instead of `MCRConfigurableSolrCore`. |
| SOLR_URL | none | The HTTP URL to the Solr server. In standalone mode sets `MCR.Solr.IndexRegistry.Index.*.SolrUrl`. In cloud mode sets `MCR.Solr.IndexRegistry.Index.*.SolrUrls`. Not required if `SOLR_ZK_HOST` is set in cloud mode. |
| SOLR_ZK_HOST | none | ZooKeeper URL(s) for SolrCloud (comma-separated). Sets `MCR.Solr.IndexRegistry.Index.*.ZkUrls`. Only used when `ENABLE_SOLR_CLOUD=true`. Takes precedence over `SOLR_URL` for the connection when both are set. |
| SOLR_ZK_CHROOT | none | Optional ZooKeeper chroot path for SolrCloud. Sets `MCR.Solr.IndexRegistry.Index.*.ZkChroot`. Only used when `SOLR_ZK_HOST` is set. |
| SOLR_ZK_CHROOT | none | Optional ZooKeeper chroot path for SolrCloud. Sets `MCR.Solr.IndexRegistry.Index.*.ZkChroot`. Only used when `SOLR_ZK_HOST` is set. |
| SOLR_CORE | mir | In standalone mode: the core name (`MCR.Solr.IndexRegistry.Index.main.CoreName`). In cloud mode: the collection name (`MCR.Solr.IndexRegistry.Index.main.CollectionName`). |
| SOLR_CLASSIFICATION_CORE | mir-classifications | In standalone mode: the classification core name (`MCR.Solr.IndexRegistry.Index.classification.CoreName`). In cloud mode: the classification collection name (`MCR.Solr.IndexRegistry.Index.classification.CollectionName`). |
| SOLR_CLASSIFICATION_CORE | mir-classifications | In standalone mode: the classification core name (`MCR.Solr.IndexRegistry.Index.classification.CoreName`). In cloud mode: the classification collection name (`MCR.Solr.IndexRegistry.Index.classification.CollectionName`). |
| SOLR_MAIN_CONFIGSET | mycore_main | The Solr configset template for the main collection. Sets `MCR.Solr.IndexRegistry.Index.main.ConfigSetTemplate`. Only used in cloud mode. |
| SOLR_CLASSIFICATION_CONFIGSET | mycore_classification | The Solr configset template for the classification collection. Sets `MCR.Solr.IndexRegistry.Index.classification.ConfigSetTemplate`. Only used in cloud mode. |
| SOLR_CLASSIFICATION_CONFIGSET | mycore_classification | The Solr configset template for the classification collection. Sets `MCR.Solr.IndexRegistry.Index.classification.ConfigSetTemplate`. Only used in cloud mode. |
| SOLR_ADMIN_USER | none | The username for the Solr Admin. (will be used for admin commands like creating cores). Sets `MCR.Solr.Server.Auth.Admin.*`. |
| SOLR_ADMIN_PASSWORD | none | The password for the Solr Admin. |
| SOLR_INDEX_USER | none | The username for the Solr Indexer. (will be used for indexing). Sets `MCR.Solr.Server.Auth.Index.*`. |
| SOLR_INDEX_PASSWORD | none | The password for the Solr Indexer. |
| SOLR_SEARCH_USER | none | The username for the Solr Searcher. (will be used for searching). Sets `MCR.Solr.Server.Auth.Search.*`. |
| SOLR_SEARCH_PASSWORD | none | The password for the Solr Searcher. |
| TIKASERVER_URL | none | The URL to the Tika Server. Same as `MCR.Solr.Tika.ServerURL` in `mycore.properties`. (also sets `MCR.Solr.FileIndexStrategy` to `org.mycore.solr.index.file.tika.MCRTikaSolrFileStrategy`) |
| TIKASERVER_URL | none | The URL to the Tika Server. Same as `MCR.Solr.Tika.ServerURL` in `mycore.properties`. (also sets `MCR.Solr.FileIndexStrategy.Class` to `org.mycore.solr.index.file.tika.MCRTikaSolrFileStrategy`) |
| JDBC_NAME | none, required | The username for the Database authentication. Same as `javax.persistence.jdbc.user` in `persistence.xml`. |
| JDBC_PASSWORD | none, required | The password for the Database authentication. Same as `javax.persistence.jdbc.password` in `persistence.xml`. |
| JDBC_DRIVER | none, required | The driver for the Database. Same as `javax.persistence.jdbc.driver` in `persistence.xml`. If you use `org.postgresql.Driver`, `org.mariadb.jdbc.Driver`, `org.hsqldb.jdbcDriver`, `org.h2.Driver` or `com.mysql.jdbc.Driver`, the right database drivers get downloaded by the installer script. |
Expand Down
4 changes: 2 additions & 2 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ function setDockerValues() {

if [ -n "${TIKASERVER_URL}" ]; then
setOrAddProperty "MCR.Solr.Tika.ServerURL" "${TIKASERVER_URL}"
setOrAddProperty "MCR.Solr.FileIndexStrategy" "org.mycore.solr.index.file.tika.MCRTikaSolrFileStrategy"
setOrAddProperty "MCR.Solr.FileIndexStrategy.Class" "org.mycore.solr.index.file.tika.MCRTikaSolrFileStrategy"
else
setOrAddProperty "MCR.Solr.Tika.ServerURL"
setOrAddProperty "MCR.Solr.FileIndexStrategy"
setOrAddProperty "MCR.Solr.FileIndexStrategy.Class"
fi

setOrAddProperty "MCR.JPA.Hbm2ddlAuto" "update"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MCR.Viewer.configuration.strategy=MCR.Viewer.configuration.strategy.Class
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MIR.DefaultLayout.CSS=flatly
# MyCoRe Viewer #
##############################################################################
# extra viewer configuration strategy to include the right bootstrap theme files and scripts
MCR.Viewer.configuration.strategy=org.mycore.mir.viewer.MIRViewerConfigurationStrategy
MCR.Viewer.configuration.strategy.Class=org.mycore.mir.viewer.MIRViewerConfigurationStrategy
# empty property means the default bootstrap, popper and Fontawesome and is not included
MCR.Viewer.Bootstrap.Css.URL=
MCR.Viewer.Bootstrap.Css.Integrity=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class MIROwnerStrategy implements MCRAccessCheckStrategy {
private static final String CONFIG_PREFIX = "MIR.OwnerStrategy.";

private static final MCRAccessCheckStrategy BASE_STRATEGY = MCRConfiguration2.getInstanceOfOrThrow(
MCRAccessCheckStrategy.class, CONFIG_PREFIX + "FallbackClass");
MCRAccessCheckStrategy.class, CONFIG_PREFIX + "Fallback.Class");

private static final List<String> OBJECT_TYPES = MCRConfiguration2.getString(CONFIG_PREFIX + "ObjectTypes")
.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
public class MCRSherpaProxyResource {

private static final Logger LOGGER = LogManager.getLogger();
public static final String MIR_SHERPA_CONFIG_KEY = "MIR.Sherpa";
public static final String MIR_SHERPA_CONFIG_KEY = "MIR.Sherpa.Class";

@Path("retrieve/{type}/")
@Produces(MediaType.APPLICATION_JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ MIR.OAS.GraphProviderURL=MIR.ePuSta.GraphProviderURL
MIR.OAS.Prefix=MIR.ePuSta.Prefix
MIR.Strategy.AccessKey.ObjectTypes=MCR.ACL.AccessKey.Strategy.AllowedObjectTypes
MCR.Access.Strategy.SubmittedCategory=MCR.Access.Strategy.SubmittedCategories
MCR.Migration.ChildrenOrder.Strategy=MCR.Migration.ChildrenOrder.Strategy.Class
MIR.OwnerStrategy.FallbackClass=MIR.OwnerStrategy.Fallback.Class
MIR.Sherpa=MIR.Sherpa.Class
24 changes: 12 additions & 12 deletions mir-module/src/main/resources/config/mir/mycore.properties
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ MCR.User.PasswordCheck.SelectedStrategy=argon2

MIR.User.ShowSimpleDetailsOnly=false

MCR.Migration.ChildrenOrder.Strategy=org.mycore.migration.strategy.MCRNeverAddChildrenOrderStrategy
MCR.Migration.ChildrenOrder.Strategy.Class=org.mycore.migration.strategy.MCRNeverAddChildrenOrderStrategy

##############################################################################
# Important overwrites of MyCoRe defaults #
Expand Down Expand Up @@ -105,7 +105,7 @@ MCR.Access.RulesURI=xslTransform:rules-helper:resource:rules/rules.xml
#MIR.Rules.Solr.Protected.RequestHandler=find,select
MIR.Rules.Solr.Protected.RequestHandler=

MCR.Access.Facts.Condition.ip-from-institution=org.mycore.access.facts.condition.fact.MCRIPCondition
MCR.Access.Facts.Condition.ip-from-institution.Class=org.mycore.access.facts.condition.fact.MCRIPCondition
MCR.Access.Facts.Condition.ip-from-institution.IP=127.0.0.1/255.255.255.255

MIR.Rules.ClassificationEditor.EditableClasses=crossrefTypes,dctermsDCMIType,ddc,derivate_types,diniPublType,diniVersion,identifier,itunes-podcast,marcgt,marcrelator,mcr-roles,mir_access,mir_filetype,mir_genres,mir_institutes,mir_licenses,mir_rights,nameIdentifier,noteTypes,rfc4646.xml (depreca,rfc5646,schemaOrg,sdnb,state,typeOfResource,XMetaDissPlusThesisLevel
Expand Down Expand Up @@ -160,7 +160,7 @@ MIR.WebConfig.Editor.TinyMCE.AllowedElements="%MIR.Editor.HTML.AllowedElements%"
# Configure Owner Strategy #
#############################################################################

MIR.OwnerStrategy.FallbackClass=org.mycore.mir.authorization.MIRStrategy
MIR.OwnerStrategy.Fallback.Class=org.mycore.mir.authorization.MIRStrategy
# MIR.OwnerStrategy.ObjectTypes=mods,derivate
# MIR.OwnerStrategy.AllowedPermissions=read,writedb
MIR.OwnerStrategy.AllowedRolesForSearch=admin,editor
Expand All @@ -185,10 +185,10 @@ MCR.URN.Resolver.MasterURL=https://nbn-resolving.org/
# URL of the DOI master resolver
MCR.DOI.Resolver.MasterURL=https://doi.org/

MCR.PI.Service.DNBURN=org.mycore.pi.urn.MCRURNOAIService
MCR.PI.Service.DNBURN.Class=org.mycore.pi.urn.MCRURNOAIService
MCR.PI.Service.DNBURN.Generator=TypeYearCountURN
MCR.PI.Service.DNBURN.MetadataService=MODSURN
MCR.PI.Generator.TypeYearCountURN=org.mycore.pi.MCRGenericPIGenerator
MCR.PI.Generator.TypeYearCountURN.Class=org.mycore.pi.MCRGenericPIGenerator
# CHANGE: Namespace for URN, 'mcr:1-' is for testing only
MCR.PI.Generator.TypeYearCountURN.Namespace=urn:nbn:de:mcr:1-
MCR.PI.Generator.TypeYearCountURN.GeneralPattern=%MCR.PI.Generator.TypeYearCountURN.Namespace%$ObjectType-$ObjectDate-$Count-
Expand Down Expand Up @@ -247,10 +247,10 @@ MCR.Solr.IndexRegistry.Index.classification.CoreName=%MCR.Solr.IndexRegistry.Ind
MCR.Solr.IndexRegistry.Index.main.CollectionName=%MIR.projectid.default%
MCR.Solr.IndexRegistry.Index.classification.CollectionName=%MCR.Solr.IndexRegistry.Index.main.CollectionName%-classifications

MCR.Category.LinkService=org.mycore.solr.classification.MCRSolrCategLinkService
MCR.Category.DAO=org.mycore.solr.classification.MCRSolrCategoryDAO
MCR.Solr.SolrInputDocument.Path.Factory=org.mycore.mir.index.MirPathDocumentFactory
MCR.Solr.FileIndexStrategy=org.mycore.mir.index.MirSolrFileStrategy
MCR.Category.LinkService.Class=org.mycore.solr.classification.MCRSolrCategLinkService
MCR.Category.DAO.Class=org.mycore.solr.classification.MCRSolrCategoryDAO
MCR.Solr.SolrInputDocument.Path.Factory.Class=org.mycore.mir.index.MirPathDocumentFactory
MCR.Solr.FileIndexStrategy.Class=org.mycore.mir.index.MirSolrFileStrategy
MCR.Solr.MimeTypeStrategy.Pattern=((image|video|audio)/.*|(application/(zip|octet-stream|vnd.iccprofile|.*realmedia.*|x-.*)))
MCR.Solr.UpdatePath=/update
#save RAM when running with 4 threads in parallel
Expand Down Expand Up @@ -465,7 +465,7 @@ MIR.shariff.services=['mail', 'twitter', 'facebook', 'whatsapp', 'linkedin', 'xi
MCR.ContentTransformer.mods2csl.Class=org.mycore.csl.MCRCSLTransformer
MCR.ContentTransformer.mods2csl.format=html
MCR.ContentTransformer.mods2csl.style=elsevier-harvard
MCR.ContentTransformer.mods2csl.ItemProviderClass=org.mycore.mods.csl.MCRModsItemDataProvider
MCR.ContentTransformer.mods2csl.ItemProvider.Class=org.mycore.mods.csl.MCRModsItemDataProvider
MCR.ContentTransformer.mods2csl.MIMEType=text/html; charset\="UTF-8"

##############################################################################
Expand Down Expand Up @@ -673,7 +673,7 @@ MCR.ContentTransformer.dummy-json2xml.Stylesheet=xslt/convertjson.xsl
MCR.ContentTransformer.json2xml.Class=org.mycore.mir.importer.JSON2XMLTransformer

# Embargo auto release
MCR.Cronjob.Jobs.MODSEmbargoRelease=org.mycore.mods.MCRMODSEmbargoReleaseCronjob
MCR.Cronjob.Jobs.MODSEmbargoRelease.Class=org.mycore.mods.MCRMODSEmbargoReleaseCronjob
MCR.Cronjob.Jobs.MODSEmbargoRelease.Cron=*/10 * * * *

##############################################################################
Expand Down Expand Up @@ -767,7 +767,7 @@ MIR.FileBrowser.FilesPerPage=10
##############################################################################
# Sherpa Romeo API - details see https://v2.sherpa.ac.uk/api/ #
##############################################################################
MIR.Sherpa=org.mycore.mir.sherpa.MCRSherpaConfig
MIR.Sherpa.Class=org.mycore.mir.sherpa.MCRSherpaConfig
MIR.Sherpa.API.Key=
MIR.Sherpa.API.URL=https://v2.sherpa.ac.uk/

Expand Down
33 changes: 17 additions & 16 deletions mir-module/src/test/java/org/mycore/mir/acl/MIRACLTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,36 +153,37 @@ private void setTestProperties() {
MCRConfiguration2.set("MCR.Metadata.Type.mods", "true");
MCRConfiguration2.set("MCR.Metadata.Type.derivate", "true");

MCRConfiguration2.set("MCR.Access.Facts.Condition.and",
MCRConfiguration2.set("MCR.Access.Facts.Condition.and.Class",
"org.mycore.access.facts.condition.combined.MCRAndCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.or",
MCRConfiguration2.set("MCR.Access.Facts.Condition.or.Class",
"org.mycore.access.facts.condition.combined.MCROrCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.not",
MCRConfiguration2.set("MCR.Access.Facts.Condition.not.Class",
"org.mycore.access.facts.condition.combined.MCRNotCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.id",
MCRConfiguration2.set("MCR.Access.Facts.Condition.id.Class",
"org.mycore.access.facts.condition.fact.MCRStringCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.target",
MCRConfiguration2.set("MCR.Access.Facts.Condition.target.Class",
"org.mycore.access.facts.condition.fact.MCRStringCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.action",
MCRConfiguration2.set("MCR.Access.Facts.Condition.action.Class",
"org.mycore.access.facts.condition.fact.MCRStringCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.user",
MCRConfiguration2.set("MCR.Access.Facts.Condition.user.Class",
"org.mycore.access.facts.condition.fact.MCRUserCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.role",
MCRConfiguration2.set("MCR.Access.Facts.Condition.role.Class",
"org.mycore.access.facts.condition.fact.MCRRoleCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.ip", "org.mycore.access.facts.condition.fact.MCRIPCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.status",
MCRConfiguration2.set("MCR.Access.Facts.Condition.ip.Class",
"org.mycore.access.facts.condition.fact.MCRIPCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.status.Class",
"org.mycore.access.facts.condition.fact.MCRStateCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.createdby",
MCRConfiguration2.set("MCR.Access.Facts.Condition.createdby.Class",
"org.mycore.access.facts.condition.fact.MCRCreatedByCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.regex",
MCRConfiguration2.set("MCR.Access.Facts.Condition.regex.Class",
"org.mycore.access.facts.condition.fact.MCRRegExCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.category",
MCRConfiguration2.set("MCR.Access.Facts.Condition.category.Class",
"org.mycore.access.facts.condition.fact.MCRCategoryCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.collection",
MCRConfiguration2.set("MCR.Access.Facts.Condition.collection.Class",
"org.mycore.mods.access.facts.condition.MCRMODSCollectionCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.genre",
MCRConfiguration2.set("MCR.Access.Facts.Condition.genre.Class",
"org.mycore.mods.access.facts.condition.MCRMODSGenreCondition");
MCRConfiguration2.set("MCR.Access.Facts.Condition.embargo",
MCRConfiguration2.set("MCR.Access.Facts.Condition.embargo.Class",
"org.mycore.mods.access.facts.condition.MCRMODSEmbargoCondition");

MCRConfiguration2.set("MCR.URIResolver.ModuleResolver.property", "org.mycore.common.xml.MCRPropertiesResolver");
Expand Down
4 changes: 2 additions & 2 deletions mir-module/src/test/resources/mycore.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#do not use SOLR for JUnit-Tests
MCR.Category.LinkService=org.mycore.datamodel.classifications2.impl.MCRCategLinkServiceImpl
MCR.Category.DAO=org.mycore.datamodel.classifications2.impl.MCRCategoryDAOImpl
MCR.Category.LinkService.Class=org.mycore.datamodel.classifications2.impl.MCRCategLinkServiceImpl
MCR.Category.DAO.Class=org.mycore.datamodel.classifications2.impl.MCRCategoryDAOImpl
Loading
Loading