use of electric.xml.Element in project blue by kunstmusik.
the class Sound method loadFromXML.
/*
* (non-Javadoc)
*
* @see blue.soundObject.SoundObject#loadFromXML(electric.xml.Element)
*/
public static SoundObject loadFromXML(Element data, Map<String, Object> objRefMap) throws Exception {
Sound sObj = new Sound();
SoundObjectUtilities.initBasicFromXML(data, sObj);
Elements nodes = data.getElements();
while (nodes.hasMoreElements()) {
Element node = nodes.next();
String nodeName = node.getName();
switch(nodeName) {
// For backwards compatibility with Blue versions < 2.6.0
case "instrumentText":
sObj.bsbObj.setInstrumentText(node.getTextString());
break;
case "instrument":
sObj.setBlueSynthBuilder((BlueSynthBuilder) BlueSynthBuilder.loadFromXML(node));
break;
case "comment":
sObj.setComment(node.getTextString());
break;
}
}
return sObj;
}
use of electric.xml.Element in project blue by kunstmusik.
the class Constant method saveAsXML.
@Override
public Element saveAsXML() {
Element retVal = new Element("generator");
retVal.setAttribute("type", getClass().getName());
retVal.addElement("value").setText(Double.toString(value));
return retVal;
}
use of electric.xml.Element in project blue by kunstmusik.
the class ScriptCategory method saveAsXML.
public Element saveAsXML() {
Element retVal = new Element("scriptCategory");
retVal.setAttribute("categoryName", this.getCategoryName());
retVal.setAttribute("isRoot", Boolean.toString(this.isRoot()));
for (Iterator iter = subCategories.iterator(); iter.hasNext(); ) {
ScriptCategory tempCat = (ScriptCategory) iter.next();
retVal.addElement(tempCat.saveAsXML());
}
for (Iterator iter = scripts.iterator(); iter.hasNext(); ) {
Script effect = (Script) iter.next();
retVal.addElement(effect.saveAsXML());
}
return retVal;
}
use of electric.xml.Element in project blue by kunstmusik.
the class Script method saveAsXML.
public Element saveAsXML() {
Element retVal = new Element("script");
retVal.addElement("name").setText(name);
retVal.addElement("description").setText(description);
retVal.addElement("code").setText(code);
retVal.addElement("comments").setText(comments);
return retVal;
}
use of electric.xml.Element in project blue by kunstmusik.
the class ScriptLibrary method saveAsXML.
public Element saveAsXML() {
Element retVal = new Element("scriptLibrary");
retVal.addElement(rootScriptCategory.saveAsXML());
return retVal;
}
Aggregations