Skip to content

Commit 3750674

Browse files
committed
add mei50 to mei51 conversion
1 parent ea1d1e6 commit 3750674

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

src/main/java/de/edirom/meigarage/mei/Conversion.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,20 @@ public enum Conversion {
231231
9, // "cost"
232232
new HashMap<String, Property>() {}
233233
),
234+
MEI50TO51(
235+
"mei50to51", // "id"
236+
"text/xml", // "input mime type"
237+
"mei50", // "input format id"
238+
"MEI 4.0 (2018) Document", // "input description"
239+
"score", // "input type" (score, audio, image, customization)
240+
"text/xml", // "output format id"
241+
"mei51", // "output format id"
242+
"MEI 5.0 (2023) Document", // "output description"
243+
"score", // "output type" (score, audio, image, customization)
244+
true, // "visible as input"
245+
9, // "cost"
246+
new HashMap<String, Property>() {}
247+
),
234248
MNX2MEI(
235249
"mnx2mei", // "id"
236250
"application/json", // "input mime type"

src/main/java/de/edirom/meigarage/mei/ConverterConfiguration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public class ConverterConfiguration {
4141
CONVERSIONS.add(getConversionActionArgument(Conversion.MEI2MUSICXML));
4242
CONVERSIONS.add(getConversionActionArgument(Conversion.MEI40TO50));
4343
CONVERSIONS.add(getConversionActionArgument(Conversion.MNX2MEI));
44+
CONVERSIONS.add(getConversionActionArgument(Conversion.MEI50TO51));
4445
}
4546

4647
private static ConversionActionArguments getConversionActionArgument(Conversion format) {

src/main/java/de/edirom/meigarage/mei/MEIXSLConverter.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,13 @@ else if(fromDataType.getFormat().equals(Conversion.MNX2MEI.getIFormatId()) &&
245245
properties.put("base", " encoding-tools/mnx2mei/");
246246
performXsltTransformation(inputStream, outputStream, "encoding-tools/mnx2mei/mnx2mei.xsl", properties, tempDir);
247247
}
248+
else if(fromDataType.getFormat().equals(Conversion.MEI50TO51.getIFormatId()) &&
249+
toDataType.getFormat().equals(Conversion.MEI50TO51.getOFormatId())) {
250+
251+
properties.put("extension", "xml");
252+
properties.put("base", " encoding-tools/mei40To50/");
253+
performXsltTransformation(inputStream, outputStream, "encoding-tools/mei50To51/mei50To51.xsl", properties, tempDir);
254+
}
248255
}
249256

250257
/*

0 commit comments

Comments
 (0)