utils
Class XmlManager

java.lang.Object
  extended by utils.XmlManager

public class XmlManager
extends java.lang.Object

Author:
Thiago Ribeiro

Constructor Summary
XmlManager()
           
 
Method Summary
static void generateXMLFile(org.jdom.Document doc, java.lang.String fileAddress)
          Gererates XML file from XML Document
static java.lang.String generateXMLString(org.jdom.Document doc)
          Generate XML String from Document
static java.lang.String getDeviceIP(java.lang.String location)
           
static java.util.ArrayList<BrisaCPDevice> getDeviceList(org.jdom.Element deviceXml, java.lang.String location)
           
static org.jdom.Element getDeviceXmlElement(java.lang.String location)
           
static org.jdom.Element getElementFromRoot(org.jdom.Element root, java.lang.String string, org.jdom.Namespace namespace)
           
static java.util.ArrayList<BrisaCPIcon> getIconList(org.jdom.Element deviceXml)
           
static java.lang.String getLocationFromSSDP(java.lang.String ssdp)
           
static java.lang.Integer getMaxAgeFromSSDP(java.lang.String ssdp)
           
static org.jdom.Element getScdpXml(java.lang.String location)
           
static java.util.ArrayList<BrisaCPService> getServiceList(org.jdom.Element root, java.lang.String location)
           
static java.lang.String getUrlBaseFromLocation(java.lang.String location)
           
static java.lang.String getUUIDFromSSDP(java.lang.String ssdp)
           
static java.lang.String getXmlNodeValue(org.jdom.Element root, java.lang.String node)
           
static org.jdom.Element parseStringToXmlElement(java.lang.String xmlString)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlManager

public XmlManager()
Method Detail

generateXMLFile

public static void generateXMLFile(org.jdom.Document doc,
                                   java.lang.String fileAddress)
Gererates XML file from XML Document

Parameters:
doc -
fileAddress -

generateXMLString

public static java.lang.String generateXMLString(org.jdom.Document doc)
Generate XML String from Document

Parameters:
doc -
Returns:

parseStringToXmlElement

public static org.jdom.Element parseStringToXmlElement(java.lang.String xmlString)

getDeviceXmlElement

public static org.jdom.Element getDeviceXmlElement(java.lang.String location)

getScdpXml

public static org.jdom.Element getScdpXml(java.lang.String location)

getXmlNodeValue

public static java.lang.String getXmlNodeValue(org.jdom.Element root,
                                               java.lang.String node)

getServiceList

public static java.util.ArrayList<BrisaCPService> getServiceList(org.jdom.Element root,
                                                                 java.lang.String location)

getIconList

public static java.util.ArrayList<BrisaCPIcon> getIconList(org.jdom.Element deviceXml)

getDeviceList

public static java.util.ArrayList<BrisaCPDevice> getDeviceList(org.jdom.Element deviceXml,
                                                               java.lang.String location)

getUrlBaseFromLocation

public static java.lang.String getUrlBaseFromLocation(java.lang.String location)

getLocationFromSSDP

public static java.lang.String getLocationFromSSDP(java.lang.String ssdp)

getMaxAgeFromSSDP

public static java.lang.Integer getMaxAgeFromSSDP(java.lang.String ssdp)

getUUIDFromSSDP

public static java.lang.String getUUIDFromSSDP(java.lang.String ssdp)

getDeviceIP

public static java.lang.String getDeviceIP(java.lang.String location)

getElementFromRoot

public static org.jdom.Element getElementFromRoot(org.jdom.Element root,
                                                  java.lang.String string,
                                                  org.jdom.Namespace namespace)