Search in sources :

Example 16 with NonNull

use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.

the class MxlGroupBarline method read.

@NonNull
public static MxlGroupBarline read(XmlReader reader) {
    MxlColor color = MxlColor.read(reader);
    MxlGroupBarlineValue value = MxlGroupBarlineValue.read(reader);
    return new MxlGroupBarline(value, color);
}
Also used : MxlGroupBarlineValue(com.xenoage.zong.musicxml.types.enums.MxlGroupBarlineValue) MxlColor(com.xenoage.zong.musicxml.types.attributes.MxlColor) NonNull(com.xenoage.utils.annotations.NonNull)

Example 17 with NonNull

use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.

the class MxlGroupSymbol method read.

@NonNull
public static MxlGroupSymbol read(XmlReader reader) {
    MxlPosition position = MxlPosition.read(reader);
    MxlColor color = MxlColor.read(reader);
    MxlGroupSymbolValue value = MxlGroupSymbolValue.read(reader);
    return new MxlGroupSymbol(value, position, color);
}
Also used : MxlColor(com.xenoage.zong.musicxml.types.attributes.MxlColor) MxlPosition(com.xenoage.zong.musicxml.types.attributes.MxlPosition) MxlGroupSymbolValue(com.xenoage.zong.musicxml.types.enums.MxlGroupSymbolValue) NonNull(com.xenoage.utils.annotations.NonNull)

Example 18 with NonNull

use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.

the class MxlBeam method read.

@NonNull
public static MxlBeam read(XmlReader reader) {
    int number = notNull(reader.getAttributeInt("number"), defaultNumber);
    MxlBeamValue value = MxlBeamValue.read(reader);
    return new MxlBeam(value, number);
}
Also used : MxlBeamValue(com.xenoage.zong.musicxml.types.enums.MxlBeamValue) NonNull(com.xenoage.utils.annotations.NonNull)

Example 19 with NonNull

use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.

the class MxlMeasure method read.

@NonNull
public static MxlMeasure read(XmlReader reader) {
    String number = reader.getAttributeNotNull("number");
    MxlMusicData musicData = new MxlMusicData();
    while (reader.openNextChildElement()) {
        musicData.readElement(reader);
        reader.closeElement();
    }
    return new MxlMeasure(musicData, number);
}
Also used : MxlMusicData(com.xenoage.zong.musicxml.types.groups.MxlMusicData) NonNull(com.xenoage.utils.annotations.NonNull)

Example 20 with NonNull

use of com.xenoage.utils.annotations.NonNull in project Zong by Xenoage.

the class CompressedFileInput method readRootFilePath.

@NonNull
private String readRootFilePath(XmlReader containerReader) throws IOException {
    XmlReader r = containerReader;
    // root element
    r.openNextChildElement();
    while (r.openNextChildElement()) {
        if (r.getElementName().equals("rootfiles")) {
            // rootfiles element
            while (r.openNextChildElement()) {
                if (r.getElementName().equals("rootfile")) {
                    // rootfile element
                    String fullPath = r.getAttribute("full-path");
                    if (fullPath == null)
                        throw new IOException("full-path of rootfile not found");
                    return fullPath;
                }
                r.closeElement();
            }
        }
        r.closeElement();
    }
    throw new IOException("rootfile not found");
}
Also used : XmlReader(com.xenoage.utils.xml.XmlReader) IOException(java.io.IOException) NonNull(com.xenoage.utils.annotations.NonNull)

Aggregations

NonNull (com.xenoage.utils.annotations.NonNull)20 MxlColor (com.xenoage.zong.musicxml.types.attributes.MxlColor)4 MxlPrintStyle (com.xenoage.zong.musicxml.types.attributes.MxlPrintStyle)4 MxlPosition (com.xenoage.zong.musicxml.types.attributes.MxlPosition)2 MxlEditorialVoice (com.xenoage.zong.musicxml.types.groups.MxlEditorialVoice)2 Color (com.xenoage.utils.color.Color)1 FontInfo (com.xenoage.utils.font.FontInfo)1 Size2f (com.xenoage.utils.math.geom.Size2f)1 XmlReader (com.xenoage.utils.xml.XmlReader)1 ScoreFormat (com.xenoage.zong.core.format.ScoreFormat)1 FormattedTextStyle (com.xenoage.zong.core.text.FormattedTextStyle)1 MxlCreditContent (com.xenoage.zong.musicxml.types.choice.MxlCreditContent)1 MxlAccidentalText (com.xenoage.zong.musicxml.types.enums.MxlAccidentalText)1 MxlBarStyle (com.xenoage.zong.musicxml.types.enums.MxlBarStyle)1 MxlBeamValue (com.xenoage.zong.musicxml.types.enums.MxlBeamValue)1 MxlGroupBarlineValue (com.xenoage.zong.musicxml.types.enums.MxlGroupBarlineValue)1 MxlGroupSymbolValue (com.xenoage.zong.musicxml.types.enums.MxlGroupSymbolValue)1 MxlLeftCenterRight (com.xenoage.zong.musicxml.types.enums.MxlLeftCenterRight)1 MxlMarginType (com.xenoage.zong.musicxml.types.enums.MxlMarginType)1 MxlNoteTypeValue (com.xenoage.zong.musicxml.types.enums.MxlNoteTypeValue)1