com.free2be.dimensions.device.profile
Class DeviceProfile
java.lang.Object
com.free2be.dimensions.device.simple.SimpleDeviceComponent
com.free2be.dimensions.device.simple.SimpleDevice
com.free2be.dimensions.device.profile.DeviceProfile
- All Implemented Interfaces:
- Device, DeviceComponent, java.io.Serializable
public class DeviceProfile
- extends SimpleDevice
Parse an rdf xml document and expose the corresponding attributes in java types.
- See Also:
- Serialized Form
Fields inherited from interface com.free2be.dimensions.device.Device |
HTML_CONTENT_TYPE, INTERNET_EXPLORER_BROWSER, MIDP, NETSCAPE_BROWSER, PC, PDA, PHONE, SOAP_CONTENT_TYPE, VXML_CONTENT_TYPE, WEB_SERVICES, WML_CONTENT_TYPE, XML_CONTENT_TYPE |
Method Summary |
protected java.lang.String |
buildComponentXpath(java.lang.String ID)
|
java.lang.String |
getAsXml()
Ideally this will always return the CC/PP representation of this device, but until then:
If derived from a valid CC/PP (like UAProf) document then that document will be returned as formatted string. |
java.lang.String |
getContentType()
Indicates the preferred content type as defined in the factory. |
java.lang.String |
getDeviceType()
Indicates the preferred content type as defined in the factory. |
Hardware |
getHardware()
|
Network |
getNetwork()
|
Software |
getSoftware()
|
protected void |
initialize(java.io.InputStream inputStream)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DeviceProfile
public DeviceProfile(java.io.InputStream inputStream)
throws DeviceProfileException
- Throws:
DeviceProfileException
DeviceProfile
public DeviceProfile(java.net.URL deviceProfileUrl)
throws DeviceProfileException
- Throws:
DeviceProfileException
initialize
protected void initialize(java.io.InputStream inputStream)
throws DeviceProfileException
- Throws:
DeviceProfileException
buildComponentXpath
protected java.lang.String buildComponentXpath(java.lang.String ID)
getHardware
public Hardware getHardware()
- Specified by:
getHardware
in interface Device
- Overrides:
getHardware
in class SimpleDevice
getNetwork
public Network getNetwork()
- Specified by:
getNetwork
in interface Device
- Overrides:
getNetwork
in class SimpleDevice
getSoftware
public Software getSoftware()
- Specified by:
getSoftware
in interface Device
- Overrides:
getSoftware
in class SimpleDevice
getContentType
public java.lang.String getContentType()
- Description copied from interface:
Device
- Indicates the preferred content type as defined in the factory. This will return only the subtype of the content mime type (i.e. text/html will return html). All content types is also available from Browser.
- Specified by:
getContentType
in interface Device
- Overrides:
getContentType
in class SimpleDevice
- Returns:
- String subtype of mime type or empty string if not known...null is never o.k.
- See Also:
Browser
getDeviceType
public java.lang.String getDeviceType()
- Description copied from interface:
Device
- Indicates the preferred content type as defined in the factory. This will return only the subtype of the content mime type (i.e. text/html will return html). All content types is also available from Browser.
- Specified by:
getDeviceType
in interface Device
- Overrides:
getDeviceType
in class SimpleDevice
- Returns:
- String enumerated device types or empty string if not known...null is never returned.
- See Also:
Hardware
getAsXml
public java.lang.String getAsXml()
- Description copied from interface:
DeviceComponent
- Ideally this will always return the CC/PP representation of this device, but until then:
-
If derived from a valid CC/PP (like UAProf) document then that document will be returned as formatted string.
-
If not derived from a valid document, this will return simple xml from a bean crawler until a bean/xml mapper
is used to display the device as valid CC/PP document.
- Specified by:
getAsXml
in interface DeviceComponent
- Overrides:
getAsXml
in class SimpleDeviceComponent