use of com.xenoage.zong.musicxml.types.choice.MxlTimeContent in project Zong by Xenoage.
the class MxlTime method read.
/**
* Returns null, if the time signature is unsupported.
*/
@MaybeNull
public static MxlTime read(XmlReader reader) {
MxlTimeSymbol symbol = MxlTimeSymbol.read(reader);
MxlTimeContent content = null;
if (reader.openNextChildElement()) {
String n = reader.getElementName();
switch(n) {
case "beats":
content = MxlNormalTime.read(reader);
break;
case "senza-misura":
content = MxlSenzaMisura.read();
reader.closeElement();
break;
default:
reader.closeElement();
break;
}
}
if (content != null)
return new MxlTime(content, symbol);
else
return null;
}
Aggregations