From de75f82843b00c8a61d500b31c9ac7a14193c2a4 Mon Sep 17 00:00:00 2001 From: Axel Berndt Date: Mon, 4 Nov 2024 17:45:45 +0100 Subject: [PATCH] v0.11.0 - Added file `/resources/minimal.mei` which is used by constructor `meico.mei.Mei.Mei()` to instantiate an empty Mei object. The object now contains an MEI with no meaningful content, but when writing it to a file it is valid now. Using this constructor will now require exception handling! --- history.md | 4 ++++ src/meico/Meico.java | 2 +- src/meico/mei/Mei.java | 4 ++-- src/resources/minimal.mei | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 src/resources/minimal.mei diff --git a/history.md b/history.md index 87bb3a1f..58d07fbc 100644 --- a/history.md +++ b/history.md @@ -1,6 +1,10 @@ ### Version History +#### v0.11.0 +- Added file `/resources/minimal.mei` which is used by constructor `meico.mei.Mei.Mei()` to instantiate an empty Mei object. The object now contains an MEI with no meaningful content, but when writing it to a file it is valid now. Using this constructor will now require exception handling! + + #### v0.10.0 - Conversion of MEI to MusicXML implemented. Thanks to [Matthias Nowakowski](https://github.com/mnowakow). - `meiHead` nearly completely. diff --git a/src/meico/Meico.java b/src/meico/Meico.java index c8d1e321..a0e429b8 100644 --- a/src/meico/Meico.java +++ b/src/meico/Meico.java @@ -5,7 +5,7 @@ * @author Axel Berndt */ public class Meico { - public static final String version = "0.10.0"; + public static final String version = "0.11.0"; public static void main(String[] args) { System.out.println("meico v" + Meico.version); diff --git a/src/meico/mei/Mei.java b/src/meico/mei/Mei.java index 03777e3e..c9a83d6c 100644 --- a/src/meico/mei/Mei.java +++ b/src/meico/mei/Mei.java @@ -24,8 +24,8 @@ public class Mei extends meico.xml.XmlBase { /** * a default constructor that creates an empty Mei instance */ - public Mei() { - super(); + public Mei() throws ParsingException, IOException { + super(Mei.class.getResourceAsStream("/resources/minimal.mei")); } /** diff --git a/src/resources/minimal.mei b/src/resources/minimal.mei new file mode 100644 index 00000000..cc36604d --- /dev/null +++ b/src/resources/minimal.mei @@ -0,0 +1,14 @@ + + + + + + + + + </titleStmt> + <pubStmt/> + </fileDesc> + </meiHead> + <music/> +</mei> \ No newline at end of file