use of com.xenoage.zong.musicxml.types.choice.MxlLyricContent in project Zong by Xenoage.
the class MxlLyric method read.
/**
* Reads and returns the lyric content of the given element,
* or returns null if unsupported.
*/
@MaybeNull
public static MxlLyric read(XmlReader reader) {
String number = reader.getAttribute("number");
MxlLyricContent content = null;
if (reader.openNextChildElement()) {
String n = reader.getElementName();
if (n.equals("syllabic") || n.equals("text")) {
content = MxlSyllabicText.read(reader);
} else if (n.equals("extend")) {
content = MxlExtend.read();
}
reader.closeElement();
}
if (content != null) {
return new MxlLyric(content, number);
} else {
return null;
}
}
Aggregations