This implementation report explains technical aspects about the implementation of the Reference Implementations of Device Description Technologies.
Table of Contents
This document reports on implementation of W3C’s DDR Simple API that explains technical aspects about it. Key features:
Supports the following vocabularies:
W3C’s Core Vocabulary. The namespace is http://www.w3.org/2008/01/ddr-core-vocabulary.
MyMobileWeb. The namespace is http://morfeo-project.org/mymobileweb.
WURFL. The namespace is http://wurfl.sourceforge.net.
Implementation based on WURFL and UAProf data sources.
Flexible enough to incorporate other data sources if available o vocabularies.
DDR Core Vocabulary is an essential vocabulary of properties for adaptation in the Mobile Web envorionment. Not intended to represent an exhaustive set of properties for content adaptation and the DDR implementations might require additonal properties and vocabularies.
This vocabulary defines two aspects:
device: apparatus through which user can interact with de Web (default aspect).
webBrowser: a user agent for Web pages.
The list of properties in the DDR Core Vocabulary can be to look up from here.
Device Description Repository Simple API is a minimal API for retrieving device properties needed for content and application adaptation. Promote the development of Web content that adapts to its Delivery Context.
From the point of view of the DDR Simple API:
Aspect: represents a category of hardware or software that participates in delivering a Web experience.
Property: characteristic of an aspect that can affect the Web experience.
Vocabulary: set of properties and the aspects with which the properties are associated.
The next chart describes the DDR Simple API

This section describes the modules more important of the implementation:
Implements the identification process of the context. See Section 5.1, “Identification Module”
Represents the core of the Device Information Simple API based on WURFL and UAProf data sources and supports the W3C’s Core Vocabulary, MyMobileWeb and WURFL vocabularies. Furthermore it is flexible enough to incorporate other data sources if available. See Section 5.2, “DDR Service Module”

This section describes the implementation.
The lastest version can be downloaded from here.
For further details about the implementation you can see the Javadoc.
IdentificationMain interface that deals with context identification.
IdentificationImplThis class is the entry point of the implementation. This class tries to recover the WURFL identifier, javax.ccpp.ProfileFragment objects (represents information about UAProf) and the user agent.
ContextKeyRepresents a context key.
ContextKeyImplImplements the ContextKey interface and holds the related information with a context recovered of the identification process.

ServiceFactoryExtThis class extends org.w3c.ddr.simple.ServiceFactory and implements a method to create a new default Service. The default Service is initialized by the implementation, depending on the context, by first checking the value of the environment variable org.w3c.ddr.simple.Service.default. If this environment variable is not defined this method checks the content of the file META_INF/services/org.w3c.ddr.simple.Service. This content is a class that implements the org.w3c.ddr.simple.Service interface.
EvidenceImplHelps implementations to deal with information with which to identify the delivery context.
PropertyNameImplRepresents a org.w3c.ddr.simple.PropertyName (local name and namespace).
PropertyRefImplImplements org.w3c.ddr.simple.PropertyRef interface which represents a property name plus the aspect to which applies.
PropertyValueImplImplements org.w3c.ddr.simple.PropertyValue interface which represents a property value.
PropertyValuesImplImplements org.w3c.ddr.simple.PropertyValues interface which represents a collection of org.w3c.ddr.simple.PropertyValue instances.
ServiceAbstractImplements the common methods for all services.
WURFLServiceThis class implements a DDR service, via which you retrieve property values for different vocabularies based on WURFL data source. It knows the mappings between properties of http://wurfl.sourceforge.net vocabulary an others vocabularies.
See Section 5.2.2, “Vocabulary Descriptor” and Section 5.2.3, “Vocabulary Mappings”.
UAProfServiceThis class implements a DDR service, via which you retrieve property values for different vocabularies based on UAProf data source. It knows the mappings between properties of UAProf an others vocabularies.
See Section 5.2.2, “Vocabulary Descriptor” and Section 5.2.3, “Vocabulary Mappings”.
DeviceAtlasServiceThis class implements a DDR service, via which you retrieve property values for different vocabularies based on DeviceAtlas data source. It knows the mappings between properties of DeviceAtlas an others vocabularies.
See Section 5.2.2, “Vocabulary Descriptor” and Section 5.2.3, “Vocabulary Mappings”.
ServiceImplThis class implements a DDR service based on the previous org.w3c.ddr.simple.Service classes. It knows the data source where to retrive values given a vocabulary, aspect and property (the sources are sorted by priority). If one service can not continue with the request or doesn't know the value of the property, the following service will be query according to the priority.

There is one file for each vocadulary.
Authors might define the namespace of the vocabulary (target attribute).
Authors might enumerate the aspects defined by the vocabulary.
Authors might define all properties with their datatypes, set of aspects for which they're defined and the default aspect.
This implementation supports:
W3C’s Core Vocabulary. The namespace is http://www.w3.org/2008/01/ddr-core-vocabulary.
MyMobileWeb. The namespace is http://morfeo-project.org/mymobileweb.
WURFL. The namespace is http://wurfl.sourceforge.net.
This section is normative.
<?xml version="1.0" encoding="UTF-8" ?>
<!ELEMENT VocabularyDescription (Aspects*, Properties*)>
<!ATTLIST VocabularyDescription
xmlns:xs CDATA #FIXED "http://www.w3.org/2001/XMLSchema"
target CDATA #REQUIRED
>
<!ELEMENT Aspects (Aspect*)>
<!ELEMENT Aspect EMPTY>
<!ATTLIST Aspect
name ID #REQUIRED
>
<!ELEMENT Properties (Property*)>
<!ELEMENT Property EMPTY>
<!ATTLIST Property
name CDATA #REQUIRED
datatype CDATA #REQUIRED
aspects CDATA #REQUIRED
defaultAspect IDREF #REQUIRED
>
These files describe the mappings of properties between the vocabularies that the implementation knows and the vocabulary of the data source. E.g. WURFLService implies three mappings between WURFL's vocabulary and all vocabularies supported by this implementation (W3C’s Core Vocabulary, MyMobileWeb and WURFL (the identity)).
This section is normative.
<?xml version="1.0" encoding="UTF-8" ?>
<!ELEMENT VocabularyMappings (TargetProperty*)>
<!ATTLIST VocabularyMappings
xmlns:xs CDATA #FIXED "http://www.w3.org/2001/XMLSchema"
source CDATA #REQUIRED
target CDATA #REQUIRED
>
<!ELEMENT TargetProperty (Match*)>
<!ATTLIST TargetProperty
name CDATA #REQUIRED
>
<!ELEMENT Match (SourceProperty)>
<!ATTLIST Match
aspect CDATA #REQUIRED
value CDATA #IMPLIED
>
<!ELEMENT SourceProperty EMPTY>
<!ATTLIST SourceProperty
name CDATA #REQUIRED
datatype CDATA #REQUIRED
value CDATA #IMPLIED
decorator CDATA #IMPLIED
>
These files describe which service(s) must be invoked by org.morfeo.devinfo.simple.ServiceImpl to retrive the value of a property given an aspect and vocabulary. There are so many files as the number of vocabularies known by the implementation (target attribute). If one service can not continue with the request or doesn't know the value of the property, the following service will be query according to the assigned order (priority attribute).
This section is normative.
<?xml version="1.0" encoding="UTF-8" ?>
<!ELEMENT VocabularySources (Sources*, Mappings*)>
<!ATTLIST VocabularySources
xmlns:xs CDATA #FIXED "http://www.w3.org/2001/XMLSchema"
target CDATA #REQUIRED
>
<!ELEMENT Sources (Source*)>
<!ELEMENT Source EMPTY>
<!ATTLIST Source
name ID #REQUIRED
class CDATA #REQUIRED
>
<!ELEMENT Mappings (TargetProperty*)>
<!ELEMENT TargetProperty (Match*)>
<!ATTLIST TargetProperty
name CDATA #REQUIRED
>
<!ELEMENT Match (PropertySource*)>
<!ATTLIST Match
aspect CDATA #IMPLIED
>
<!ELEMENT PropertySource EMPTY>
<!ATTLIST PropertySource
name IDREF #REQUIRED
priority CDATA #REQUIRED
>>
For further details about how to use this implementation, you can see the user manual .
This document was produced with the participation of the MyMobileWeb project Consortium: