Skip to content

Commit

Permalink
fixed problem with demo10
Browse files Browse the repository at this point in the history
  • Loading branch information
markoscalderon committed Nov 17, 2011
1 parent d56130a commit 67914cf
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 40 deletions.
3 changes: 3 additions & 0 deletions bbb-api-demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
lib
src/main/webapp/bbb_api_conf.jsp
82 changes: 42 additions & 40 deletions bbb-api-demo/src/main/webapp/bbb_api.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -440,51 +440,53 @@ public String getRecordings(String meetingID) {
for (int i = 0; i < recordingList.getLength(); i++) {
Element recording = (Element) recordingList.item(i);
String recordID = recording.getElementsByTagName("recordID").item(0).getTextContent();
String name = recording.getElementsByTagName("name").item(0).getTextContent();
String description = "";
NodeList metadata = recording.getElementsByTagName("metadata");
if(metadata.getLength()>0){
Element metadataElem = (Element) metadata.item(0);
if(metadataElem.getElementsByTagName("description").getLength() > 0){
description = metadataElem.getElementsByTagName("description").item(0).getTextContent();
}
}
if(recording.getElementsByTagName("recordID").getLength()>0){
String starttime = recording.getElementsByTagName("startTime").item(0).getTextContent();
String published = recording.getElementsByTagName("published").item(0).getTextContent();
String playback = "";
String length = "";
NodeList formats = recording.getElementsByTagName("format");
for (int j = 0; j < formats.getLength(); j++){
Element format = (Element) formats.item(j);
String recordID = recording.getElementsByTagName("recordID").item(0).getTextContent();
String name = recording.getElementsByTagName("name").item(0).getTextContent();
String description = "";
NodeList metadata = recording.getElementsByTagName("metadata");
if(metadata.getLength()>0){
Element metadataElem = (Element) metadata.item(0);
if(metadataElem.getElementsByTagName("description").getLength() > 0){
description = metadataElem.getElementsByTagName("description").item(0).getTextContent();
}
}
String typeP = format.getElementsByTagName("type").item(0).getTextContent();
String urlP = format.getElementsByTagName("url").item(0).getTextContent();
String lengthP = format.getElementsByTagName("length").item(0).getTextContent();
String starttime = recording.getElementsByTagName("startTime").item(0).getTextContent();
String published = recording.getElementsByTagName("published").item(0).getTextContent();
String playback = "";
String length = "";
NodeList formats = recording.getElementsByTagName("format");
for (int j = 0; j < formats.getLength(); j++){
Element format = (Element) formats.item(j);
String typeP = format.getElementsByTagName("type").item(0).getTextContent();
String urlP = format.getElementsByTagName("url").item(0).getTextContent();
String lengthP = format.getElementsByTagName("length").item(0).getTextContent();
if (j != 0){
playback +=", ";
}
playback += StringEscapeUtils.escapeXml("<a href='" + urlP + "'>" + typeP + "</a>");
if(typeP.equalsIgnoreCase("slides")){
length = lengthP;
}
}
if (j != 0){
playback +=", ";
}
playback += StringEscapeUtils.escapeXml("<a href='" + urlP + "'>" + typeP + "</a>");
newXMLdoc += "<recording>";
if(typeP.equalsIgnoreCase("slides")){
length = lengthP;
}
newXMLdoc += "<recordID>" + recordID + "</recordID>";
newXMLdoc += "<name>" + name + "</name>";
newXMLdoc += "<description>" + description + "</description>";
newXMLdoc += "<startTime>" + starttime + "</startTime>";
newXMLdoc += "<published>" + published + "</published>";
newXMLdoc += "<playback>" + playback + "</playback>";
newXMLdoc += "<length>" + length + "</length>";
newXMLdoc += "</recording>";
}
newXMLdoc += "<recording>";
newXMLdoc += "<recordID>" + recordID + "</recordID>";
newXMLdoc += "<name>" + name + "</name>";
newXMLdoc += "<description>" + description + "</description>";
newXMLdoc += "<startTime>" + starttime + "</startTime>";
newXMLdoc += "<published>" + published + "</published>";
newXMLdoc += "<playback>" + playback + "</playback>";
newXMLdoc += "<length>" + length + "</length>";
newXMLdoc += "</recording>";
}
}catch (Exception e) {
e.printStackTrace(System.out);
Expand Down

0 comments on commit 67914cf

Please sign in to comment.