public class Device
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
Device[] |
childDevices |
java.lang.String |
deviceType |
java.lang.String |
friendlyName |
java.lang.String |
manufacturer |
java.net.URL |
manufacturerURL |
java.lang.String |
modelDescription |
java.lang.String |
modelName |
java.lang.String |
modelNumber |
java.lang.String |
modelURL |
Device |
parent |
java.net.URL |
presentationURL |
java.lang.String |
serialNumber |
Service[] |
services |
java.lang.String |
UDN |
long |
UPC |
java.lang.String |
USN |
Constructor and Description |
---|
Device(org.w3c.dom.Node deviceCtx,
Device parent,
java.net.URL urlBase) |
Modifier and Type | Method and Description |
---|---|
Device |
getChildDevice(java.lang.String deviceURI)
Looks for a child UPNP device definition file, the whole devices
tree will be searched, starting from the current device node.
|
java.util.List<Device> |
getChildDevices()
Generates a list of all the child ( not only top level, full
childrens hierarchy included ) UPNPDevice objects for this
device.
|
Device |
getDirectParent()
Return the parent UPNPDevice, null if the device is an
UPNPRootDevice
|
Service |
getService(java.lang.String serviceURI)
Looks for a UPNP device service definition object for the given
service URI (Type)
|
Service |
getServiceByID(java.lang.String serviceID)
Looks for a UPNP device service definition object for the given
service ID
|
java.util.List<Service> |
getServices(java.lang.String serviceURI)
Looks for the all the UPNP device service definition object for
the current UPNP device object.
|
static java.net.URL |
getURL(java.lang.String url,
java.net.URL baseURL)
Parsing an URL from the descriptionXML file
|
java.lang.String |
toString() |
public final java.lang.String deviceType
public final java.lang.String friendlyName
public final java.lang.String manufacturer
public final java.net.URL manufacturerURL
public final java.net.URL presentationURL
public final java.lang.String modelDescription
public final java.lang.String modelName
public final java.lang.String modelNumber
public final java.lang.String modelURL
public final java.lang.String serialNumber
public final java.lang.String UDN
public final java.lang.String USN
public final long UPC
public final Service[] services
public final Device[] childDevices
public final Device parent
public Device(org.w3c.dom.Node deviceCtx, Device parent, java.net.URL urlBase)
deviceCtx
- parent
- urlBase
- public static final java.net.URL getURL(java.lang.String url, java.net.URL baseURL) throws java.net.MalformedURLException
url
- the string representation fo the URLbaseURL
- the base device URL, needed if the url param is
relativejava.net.MalformedURLException
- if the url param or baseURL.toExternalForm() + url
cannot be parsed to create an URL objectpublic java.util.List<Device> getChildDevices()
public Device getDirectParent()
public Device getChildDevice(java.lang.String deviceURI)
deviceURI
- the device URI to searchpublic Service getService(java.lang.String serviceURI)
serviceURI
- the URI of the servicepublic Service getServiceByID(java.lang.String serviceID)
serviceID
- the ID of the servicepublic java.util.List<Service> getServices(java.lang.String serviceURI)
serviceURI
- the URI of the servicepublic java.lang.String toString()
toString
in class java.lang.Object