Skip to content

Commit 2a7a5a5

Browse files
committed
MIR-1094 get rid of MIRWizardLoadClassifications
1 parent b566058 commit 2a7a5a5

File tree

4 files changed

+30
-121
lines changed

4 files changed

+30
-121
lines changed

mir-wizard/src/main/java/org/mycore/mir/wizard/command/MIRWizardLoadClassifications.java

Lines changed: 0 additions & 117 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<commands>
3+
<command uri="resource:mycore-classifications/XMetaDissPlusThesisLevel.xml">load classification from uri {uri}</command>
4+
<command uri="resource:mycore-classifications/derivate_types.xml">load classification from uri {uri}</command>
5+
<command uri="resource:mycore-classifications/diniPublType.xml">load classification from uri {uri}</command>
6+
<command uri="resource:mycore-classifications/diniPublType2022.xml">load classification from uri {uri}</command>
7+
<command uri="resource:mycore-classifications/marcrelator.xml">load classification from uri {uri}</command>
8+
<command uri="resource:mycore-classifications/marcgt.xml">load classification from uri {uri}</command>
9+
<command uri="resource:mycore-classifications/mcr-roles.xml">load classification from uri {uri}</command>
10+
<command uri="resource:mycore-classifications/mir_access.xml">load classification from uri {uri}</command>
11+
<command uri="resource:mycore-classifications/mir_filetype.xml">load classification from uri {uri}</command>
12+
<command uri="resource:mycore-classifications/mir_genres.xml">load classification from uri {uri}</command>
13+
<command uri="resource:mycore-classifications/mir_institutes.xml">load classification from uri {uri}</command>
14+
<command uri="resource:mycore-classifications/mir_licenses.xml">load classification from uri {uri}</command>
15+
<command uri="resource:mycore-classifications/rfc5646.xml">load classification from uri {uri}</command>
16+
<command uri="resource:mycore-classifications/schemaOrg.xml" >load classification from uri {uri}</command>
17+
<command uri="resource:mycore-classifications/sdnb.xml">load classification from uri {uri}</command>
18+
<command uri="resource:mycore-classifications/state.xml">load classification from uri {uri}</command>
19+
<command uri="resource:mycore-classifications/typeOfResource.xml">load classification from uri {uri}</command>
20+
<command uri="resource:mycore-classifications/nameIdentifier.xml">load classification from uri {uri}</command>
21+
<command uri="resource:mycore-classifications/noteTypes.xml">load classification from uri {uri}</command>
22+
<command uri="resource:mycore-classifications/identifier.xml">load classification from uri {uri}</command>
23+
<command uri="resource:mycore-classifications/author_roles.xml">load classification from uri {uri}</command>
24+
<command uri="resource:mycore-classifications/mir_relateditem.xml">load classification from uri {uri}</command>
25+
</commands>

mir-wizard/src/main/resources/setup/install.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<command class="org.mycore.mir.wizard.command.MIRWizardDownloadDBLib" />
66
<command class="org.mycore.mir.wizard.command.MIRWizardInitDatabase" />
77
<command class="org.mycore.mir.wizard.command.MIRWizardSolr" />
8-
<command class="org.mycore.mir.wizard.command.MIRWizardLoadClassifications" />
8+
<command class="org.mycore.mir.wizard.command.MIRWizardMCRCommand" name="load.classifications" src="resource:setup/classifications-wizard-commands.xml"/>
99
<command class="org.mycore.mir.wizard.command.MIRWizardInitSuperuser" />
1010
<command class="org.mycore.mir.wizard.command.MIRWizardMCRCommand" name="import.acls" src="resource:setup/defaultrules-wizard-commands.xml" />
1111
<command class="org.mycore.mir.wizard.command.MIRWizardMCRCommand" name="import.webacls" src="resource:setup/webacl-wizard-commands.xml" />
1212
<command class="org.mycore.mir.wizard.command.MIRWizardMCRCommand" name="import.restapiacls" src="resource:setup/restapiacl-wizard-commands.xml" />
13-
</install>
13+
</install>

mir-wizard/src/test/java/org/mycore/mir/wizard/TestCommands.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.mycore.common.MCRJPATestCase;
3535
import org.mycore.common.MCRStreamUtils;
3636
import org.mycore.common.xml.MCRURIResolver;
37-
import org.mycore.mir.wizard.command.MIRWizardLoadClassifications;
3837
import org.mycore.mir.wizard.command.MIRWizardMCRCommand;
3938

4039
/**
@@ -46,7 +45,9 @@ public class TestCommands extends MCRJPATestCase {
4645
@Test
4746
public void testLoadClassifications() throws Exception {
4847
MIRWizardCommandChain chain = new MIRWizardCommandChain();
49-
chain.addCommand(new MIRWizardLoadClassifications());
48+
MIRWizardMCRCommand loadClassifications = new MIRWizardMCRCommand("load.classifications");
49+
loadClassifications.setInputXML(MCRURIResolver.instance().resolve("resource:setup/classifications-wizard-commands.xml"));
50+
chain.addCommand(loadClassifications);
5051

5152
endTransaction();
5253
chain.execute(null);

0 commit comments

Comments
 (0)