org.teleal.cling.model.meta
Class Device<DI extends DeviceIdentity,D extends Device,S extends Service>
java.lang.Object
org.teleal.cling.model.meta.Device<DI,D,S>
- All Implemented Interfaces:
- Validatable
- Direct Known Subclasses:
- LocalDevice, RemoteDevice
public abstract class Device<DI extends DeviceIdentity,D extends Device,S extends Service>
- extends java.lang.Object
- implements Validatable
Constructor Summary |
Device(DI identity)
|
Device(DI identity,
DeviceType type,
DeviceDetails details,
Icon[] icons,
DeviceService<S>[] deviceServices)
|
Device(DI identity,
DeviceType type,
DeviceDetails details,
Icon[] icons,
DeviceService<S>[] deviceServices,
D[] embeddedDevices)
|
Device(DI identity,
UDAVersion version,
DeviceType type,
DeviceDetails details,
Icon[] icons,
DeviceService<S>[] deviceServices,
D[] embeddedDevices)
|
Method Summary |
protected abstract Resource[] |
discoverResources()
|
boolean |
equals(java.lang.Object o)
|
protected java.util.Collection<D> |
find(DeviceType deviceType,
D current)
|
protected java.util.Collection<D> |
find(ServiceType serviceType,
D current)
|
protected D |
find(UDN udn,
D current)
|
abstract D |
findDevice(UDN udn)
|
abstract D[] |
findDevices(DeviceType deviceType)
|
abstract D[] |
findDevices(ServiceType serviceType)
|
DeviceService<S> |
findDeviceService(ServiceId serviceId)
|
abstract DeviceService<S>[] |
findDeviceServices()
|
abstract DeviceService<S>[] |
findDeviceServices(ServiceType serviceType)
|
protected java.util.Collection<DeviceService> |
findDeviceServices(ServiceType serviceType,
ServiceId serviceId,
D current)
|
abstract D[] |
findEmbeddedDevices()
|
protected java.util.Collection<D> |
findEmbeddedDevices(D current)
|
DeviceService<S> |
findFirstDeviceService(ServiceType serviceType)
|
ServiceType[] |
findServiceTypes()
|
DeviceDetails |
getDetails()
|
DeviceService<S>[] |
getDeviceServices()
|
java.lang.String |
getDisplayString()
|
D[] |
getEmbeddedDevices()
|
byte[] |
getFirstIcon()
|
Icon[] |
getIcons()
|
DI |
getIdentity()
|
Resource |
getLocalResource(java.net.URI localPathQuery)
|
java.lang.String |
getLocalURIPrefix()
|
D |
getParentDevice()
|
Resource[] |
getResources()
|
abstract D |
getRoot()
|
DeviceType |
getType()
|
UDAVersion |
getVersion()
|
boolean |
hasDeviceServices()
|
boolean |
hasEmbeddedDevices()
|
int |
hashCode()
|
boolean |
hasIcons()
|
boolean |
isRoot()
|
abstract D |
newInstance(UDN udn,
UDAVersion version,
DeviceType type,
DeviceDetails details,
Icon[] icons,
DeviceService<S>[] deviceServices,
java.util.List<D> embeddedDevices)
|
java.net.URI |
prefixLocalURI(java.net.URI uri)
|
java.lang.String |
toString()
|
java.util.List<ValidationError> |
validate()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Device
public Device(DI identity)
throws ValidationException
- Throws:
ValidationException
Device
public Device(DI identity,
DeviceType type,
DeviceDetails details,
Icon[] icons,
DeviceService<S>[] deviceServices)
throws ValidationException
- Throws:
ValidationException
Device
public Device(DI identity,
DeviceType type,
DeviceDetails details,
Icon[] icons,
DeviceService<S>[] deviceServices,
D[] embeddedDevices)
throws ValidationException
- Throws:
ValidationException
Device
public Device(DI identity,
UDAVersion version,
DeviceType type,
DeviceDetails details,
Icon[] icons,
DeviceService<S>[] deviceServices,
D[] embeddedDevices)
throws ValidationException
- Throws:
ValidationException
getIdentity
public DI getIdentity()
getVersion
public UDAVersion getVersion()
getType
public DeviceType getType()
getDetails
public DeviceDetails getDetails()
getIcons
public Icon[] getIcons()
hasIcons
public boolean hasIcons()
getDeviceServices
public DeviceService<S>[] getDeviceServices()
hasDeviceServices
public boolean hasDeviceServices()
getEmbeddedDevices
public D[] getEmbeddedDevices()
hasEmbeddedDevices
public boolean hasEmbeddedDevices()
getParentDevice
public D getParentDevice()
getResources
public Resource[] getResources()
isRoot
public boolean isRoot()
getLocalResource
public Resource getLocalResource(java.net.URI localPathQuery)
getRoot
public abstract D getRoot()
findEmbeddedDevices
public abstract D[] findEmbeddedDevices()
findDevice
public abstract D findDevice(UDN udn)
findDevices
public abstract D[] findDevices(DeviceType deviceType)
findDevices
public abstract D[] findDevices(ServiceType serviceType)
findDeviceServices
public abstract DeviceService<S>[] findDeviceServices()
findDeviceServices
public abstract DeviceService<S>[] findDeviceServices(ServiceType serviceType)
find
protected D find(UDN udn,
D current)
findEmbeddedDevices
protected java.util.Collection<D> findEmbeddedDevices(D current)
find
protected java.util.Collection<D> find(DeviceType deviceType,
D current)
find
protected java.util.Collection<D> find(ServiceType serviceType,
D current)
findDeviceServices
protected java.util.Collection<DeviceService> findDeviceServices(ServiceType serviceType,
ServiceId serviceId,
D current)
findDeviceService
public DeviceService<S> findDeviceService(ServiceId serviceId)
findFirstDeviceService
public DeviceService<S> findFirstDeviceService(ServiceType serviceType)
findServiceTypes
public ServiceType[] findServiceTypes()
getDisplayString
public java.lang.String getDisplayString()
getFirstIcon
public byte[] getFirstIcon()
getLocalURIPrefix
public java.lang.String getLocalURIPrefix()
prefixLocalURI
public java.net.URI prefixLocalURI(java.net.URI uri)
validate
public java.util.List<ValidationError> validate()
- Specified by:
validate
in interface Validatable
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
newInstance
public abstract D newInstance(UDN udn,
UDAVersion version,
DeviceType type,
DeviceDetails details,
Icon[] icons,
DeviceService<S>[] deviceServices,
java.util.List<D> embeddedDevices)
throws ValidationException
- Throws:
ValidationException
discoverResources
protected abstract Resource[] discoverResources()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.