MyMobileWeb - DDR-RI Integration
From Morfeo Wiki
Introduction
The MyMobileWeb team is pleased to announce the availability of an implementation of W3C’s DDR Simple API specification, which has been integrated with MyMobileWeb Platform. This implementation is based on WURFL and UAProf data and supports the W3C’s Core Vocabulary and the MyMobileWeb’s vocabulary.
You can download the integration MyMobileWeb with the API implementation 0.9.4 now and use it. Please test it and give us feedback and report us possible bugs. The integration is on test period so it's very important your help and collaboration.
At the moment folder structure DeviceBBDD is:
- DeviceBBDD/devinfo - Vocabularies description and data sources mappings files
- DeviceBBDD/wurfl - WURFL data source and abstract families definition
- DeviceBBDD/uaprof - CCPP schemas
PD: Remember the nigthly build can not be a stable version.
Examples
- Simple values (xs:string, xs:nonNegativeInteger, xs:boolean,...)
<Property name="displayWidth" datatype="xs:nonNegativeInteger"
aspects="&ALLASPECTS;" defaultAspect="&DEVICE;"/>
ContextUtil.getUserDeviceCapabilityAsInt(DDRCoreVocabulary.DISPLAY_WIDTH, ctx);
<Property name="displayHeight" datatype="xs:nonNegativeInteger"
aspects="&ALLASPECTS;" defaultAspect="&DEVICE;"/>
Device c = (Device) the_context.getElement("_MYMW_DEVICE");
c.getCapabilityValueAsInt(DDRCoreVocabulary.DISPLAY_HEIGHT);
<Property name="rendersTables" datatype="xs:boolean"
aspects="&WEBBROWSER;" defaultAspect="&WEBBROWSER;"/>
ContextUtil.getUserDeviceCapabilityAsBoolean(MyMobileWebVocabulary.TABLE_SUPPORT, ctx);
- Enumeration (xs:enumeration)
<Property name="imageFormatSupport" datatype="xs:enumeration"
aspects="&WEBBROWSER;" defaultAspect="&WEBBROWSER;"/>
Map imageFormatSupport = ContextUtil.getUserDeviceCapabilityGroupValues(DDRCoreVocabulary.IMAGE_FORMAT_SUPPORT, ctx);
if (imageFormatSupport.containsKey(ImageFormatSupportValues.GIF_87)){
Sysmtem.out.println("GIF is supported");
}
<Property name="markupSupport" datatype="xs:enumeration" aspects="&WEBBROWSER;" defaultAspect="&WEBBROWSER;" />
public static boolean isHTML4(Context ctx) {
Map markups = ContextUtil.getUserDeviceCapabilityGroupValues(DDRCoreVocabulary.MARKUP_SUPPORT, ctx);
return markups.containsKey(MarkupSupportValues.HTML_40);
}
- Presentation Layer
<mymw:image id="logo" alt="VLDMovil" display="deliveryContext.imageFormatSupport['gif87']"
src="resources/images/logo.gif"/>
