Search in sources :

Example 1 with MxlCreditContent

use of com.xenoage.zong.musicxml.types.choice.MxlCreditContent in project Zong by Xenoage.

the class MxlCredit method read.

@NonNull
public static MxlCredit read(XmlReader reader) {
    int page = notNull(reader.getAttributeInt("page"), defaultPage);
    MxlCreditContent content = null;
    while (reader.openNextChildElement()) {
        String n = reader.getElementName();
        if (n.equals("credit-image")) {
            content = MxlImage.read(reader);
            reader.closeElement();
            break;
        } else if (n.equals(MxlCreditWords.elemName)) {
            content = MxlCreditWords.read(reader);
            // element is already closed at this point
            break;
        }
        reader.closeElement();
    }
    if (content == null)
        throw reader.dataException("empty " + elemName);
    return new MxlCredit(content, page);
}
Also used : MxlCreditContent(com.xenoage.zong.musicxml.types.choice.MxlCreditContent) NonNull(com.xenoage.utils.annotations.NonNull)

Aggregations

NonNull (com.xenoage.utils.annotations.NonNull)1 MxlCreditContent (com.xenoage.zong.musicxml.types.choice.MxlCreditContent)1