Search in sources :

Example 1 with BlueShareInstrumentCategory

use of blue.tools.blueShare.instruments.BlueShareInstrumentCategory in project blue by kunstmusik.

the class BlueShareRemoteCaller method getSubCategories.

private static BlueShareInstrumentCategory[] getSubCategories(Element parent) {
    Elements categories = parent.getElements();
    BlueShareInstrumentCategory[] iCategories = new BlueShareInstrumentCategory[categories.size()];
    int i = 0;
    int catId;
    String name;
    Element temp;
    BlueShareInstrumentCategory[] tempCategories;
    while (categories.hasMoreElements()) {
        temp = categories.next();
        catId = Integer.parseInt(temp.getAttribute("instrumentCategoryId").getValue());
        name = temp.getAttribute("name").getValue();
        // description = temp.getElement("description").getTextString();
        tempCategories = getSubCategories(temp);
        iCategories[i] = new BlueShareInstrumentCategory(catId, name, null, tempCategories);
        i++;
    }
    return iCategories;
}
Also used : BlueShareInstrumentCategory(blue.tools.blueShare.instruments.BlueShareInstrumentCategory) Element(electric.xml.Element) Elements(electric.xml.Elements)

Aggregations

BlueShareInstrumentCategory (blue.tools.blueShare.instruments.BlueShareInstrumentCategory)1 Element (electric.xml.Element)1 Elements (electric.xml.Elements)1