Search in sources :

Example 51 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class Track method loadFromXML.

public static Track loadFromXML(Element data) {
    Track retVal = new Track(false);
    Elements nodes = data.getElements();
    while (nodes.hasMoreElements()) {
        Element node = nodes.next();
        String nodeName = node.getName();
        switch(nodeName) {
            case "name":
                retVal.name = node.getTextString();
                if (retVal.name == null) {
                    retVal.name = "";
                }
                break;
            case "noteTemplate":
                retVal.noteTemplate = node.getTextString();
                if (retVal.noteTemplate == null) {
                    retVal.noteTemplate = "";
                }
                break;
            case "instrumentId":
                retVal.instrumentId = node.getTextString();
                if (retVal.instrumentId == null) {
                    retVal.instrumentId = "";
                }
                break;
            case "columns":
                {
                    Elements nodes2 = node.getElements();
                    while (nodes2.hasMoreElements()) {
                        retVal.addColumn(Column.loadFromXML(nodes2.next()));
                    }
                    break;
                }
            case "trackerNotes":
                {
                    Elements nodes2 = node.getElements();
                    while (nodes2.hasMoreElements()) {
                        retVal.trackerNotes.add(TrackerNote.loadFromXML(nodes2.next()));
                    }
                    break;
                }
        }
    }
    return retVal;
}
Also used : Element(electric.xml.Element) Elements(electric.xml.Elements)

Example 52 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class OpcodeList method loadFromXML.

/* SAVE/LOAD METHODS */
public static OpcodeList loadFromXML(Element data) {
    OpcodeList retVal = new OpcodeList();
    Elements nodes = data.getElements();
    while (nodes.hasMoreElements()) {
        Element node = nodes.next();
        UserDefinedOpcode udo = UserDefinedOpcode.loadFromXML(node);
        retVal.addOpcode(udo);
    }
    return retVal;
}
Also used : Element(electric.xml.Element) Elements(electric.xml.Elements)

Example 53 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class UDOLibrary method saveAsXML.

public Element saveAsXML() {
    Element retVal = new Element("udoLibrary");
    retVal.addElement(rootUDOCategory.saveAsXML());
    return retVal;
}
Also used : Element(electric.xml.Element)

Example 54 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class Field method loadFromXML.

public static Field loadFromXML(Element data) throws Exception {
    Field field = new Field(false);
    Elements nodes = data.getElements();
    while (nodes.hasMoreElements()) {
        Element node = nodes.next();
        String nodeName = node.getName();
        if (nodeName.equals("parameter")) {
            field.parameters.add(Parameter.loadFromXML(node));
        }
    }
    return field;
}
Also used : Element(electric.xml.Element) Elements(electric.xml.Elements)

Example 55 with Element

use of electric.xml.Element in project blue by kunstmusik.

the class Field method saveAsXML.

public Element saveAsXML() {
    Element retVal = new Element("field");
    for (Iterator it = parameters.iterator(); it.hasNext(); ) {
        Parameter param = (Parameter) it.next();
        retVal.addElement(param.saveAsXML());
    }
    return retVal;
}
Also used : Element(electric.xml.Element) Iterator(java.util.Iterator)

Aggregations

Element (electric.xml.Element)310 Elements (electric.xml.Elements)120 Document (electric.xml.Document)22 Vector (java.util.Vector)14 Iterator (java.util.Iterator)12 File (java.io.File)10 BigDecimal (java.math.BigDecimal)10 IOException (java.io.IOException)8 SoundObject (blue.soundObject.SoundObject)7 ParseException (electric.xml.ParseException)7 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)4 EffectOption (blue.tools.blueShare.effects.EffectOption)3 InstrumentOption (blue.tools.blueShare.instruments.InstrumentOption)3 SoundObjectOption (blue.tools.blueShare.soundObjects.SoundObjectOption)3 OpcodeList (blue.udo.OpcodeList)3 Test (org.junit.Test)3 ParameterList (blue.automation.ParameterList)2 LiveObject (blue.blueLive.LiveObject)2 LiveObjectBins (blue.blueLive.LiveObjectBins)2 Line (blue.components.lines.Line)2