use of blue.tools.blueShare.soundObjects.SoundObjectOption in project blue by kunstmusik.
the class BlueShareRemoteCaller method getSoundObjectOptions.
public static SoundObjectOption[] getSoundObjectOptions(BlueShareSoundObjectCategory iCategory) throws IOException, XmlRpcException, ParseException {
Vector v = new Vector();
String result;
Document doc;
v.add(new Integer(iCategory.getCategoryId()));
result = (String) xrpc.execute("blueShare.getSoundObjectList", v);
doc = new Document(result);
Element root = doc.getRoot();
Elements soundObjects = root.getElements("soundObject");
SoundObjectOption[] iOptions = new SoundObjectOption[soundObjects.size()];
int i = 0;
int soundObjectId;
String screenName, name, type, description, category;
Element temp;
while (soundObjects.hasMoreElements()) {
temp = soundObjects.next();
soundObjectId = Integer.parseInt(temp.getAttribute("soundObjectId").getValue());
screenName = temp.getElement("screenName").getTextString();
name = temp.getElement("name").getTextString();
type = temp.getElement("type").getTextString();
description = temp.getElement("description").getTextString();
category = temp.getElement("category").getTextString();
iOptions[i] = new SoundObjectOption(soundObjectId, checkNullString(screenName), checkNullString(name), checkNullString(type), checkNullString(description), checkNullString(category));
i++;
}
return iOptions;
}
use of blue.tools.blueShare.soundObjects.SoundObjectOption in project blue by kunstmusik.
the class BlueShareRemoteCaller method getSoundObjectOptionsForUser.
public static SoundObjectOption[] getSoundObjectOptionsForUser(String username, String password) throws IOException, XmlRpcException, ParseException {
Vector v = new Vector();
String result;
Document doc;
v.add(username);
v.add(password);
result = (String) xrpc.execute("blueShare.getSoundObjectListForUser", v);
doc = new Document(result);
Element root = doc.getRoot();
Elements soundObjects = root.getElements("soundObject");
SoundObjectOption[] iOptions = new SoundObjectOption[soundObjects.size()];
int i = 0;
int soundObjectId;
String screenName, name, type, description, category;
Element temp;
while (soundObjects.hasMoreElements()) {
temp = soundObjects.next();
soundObjectId = Integer.parseInt(temp.getAttribute("soundObjectId").getValue());
screenName = temp.getElement("screenName").getTextString();
name = temp.getElement("name").getTextString();
type = temp.getElement("type").getTextString();
description = temp.getElement("description").getTextString();
category = temp.getElement("category").getTextString();
iOptions[i] = new SoundObjectOption(soundObjectId, checkNullString(screenName), checkNullString(name), checkNullString(type), checkNullString(description), checkNullString(category));
i++;
}
return iOptions;
}
use of blue.tools.blueShare.soundObjects.SoundObjectOption in project blue by kunstmusik.
the class BlueShareRemoteCaller method getLatestTenSoundObjects.
public static SoundObjectOption[] getLatestTenSoundObjects() throws XmlRpcException, IOException, ParseException {
String result = (String) xrpc.execute("blueShare.getLatestTenSoundObjects", new Vector());
Document doc = new Document(result);
Element root = doc.getRoot();
Elements soundObjects = root.getElements("soundObject");
SoundObjectOption[] iOptions = new SoundObjectOption[soundObjects.size()];
int i = 0;
int soundObjectId;
String screenName, name, type, description, category;
Element temp;
while (soundObjects.hasMoreElements()) {
temp = soundObjects.next();
soundObjectId = Integer.parseInt(temp.getAttribute("soundObjectId").getValue());
screenName = temp.getElement("screenName").getTextString();
name = temp.getElement("name").getTextString();
type = temp.getElement("type").getTextString();
description = temp.getElement("description").getTextString();
category = temp.getElement("category").getTextString();
iOptions[i] = new SoundObjectOption(soundObjectId, checkNullString(screenName), checkNullString(name), checkNullString(type), checkNullString(description), checkNullString(category));
i++;
}
return iOptions;
}
Aggregations