You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devicemap.apache.org by bd...@apache.org on 2013/01/11 16:42:58 UTC
svn commit: r1432101 - in /incubator/devicemap/trunk/openddr/java: ./
src/test/ src/test/java/ src/test/java/org/ src/test/java/org/apache/
src/test/java/org/apache/devicemap/
src/test/java/org/apache/devicemap/openddr/
src/test/java/org/apache/devicem...
Author: bdelacretaz
Date: Fri Jan 11 15:42:57 2013
New Revision: 1432101
URL: http://svn.apache.org/viewvc?rev=1432101&view=rev
Log:
DMAP-15 - add some simple tests of the DDR Service
Added:
incubator/devicemap/trunk/openddr/java/src/test/
incubator/devicemap/trunk/openddr/java/src/test/java/
incubator/devicemap/trunk/openddr/java/src/test/java/org/
incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/
incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/
incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/
incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/
incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/ServiceSetup.java (with props)
incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestServiceCreation.java (with props)
incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestSimpleQueries.java (with props)
incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/UserAgentEvidence.java (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/
incubator/devicemap/trunk/openddr/java/src/test/resources/config/
incubator/devicemap/trunk/openddr/java/src/test/resources/config/openddr.properties (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BrowserDataSource.xml (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSource.xml (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSourcePatch.xml (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSource.xml (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSourcePatch.xml (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_OperatingSystemDataSource.xml (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_coreVocabulary.xml (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrLimitedVocabulary.xml (with props)
incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrVocabulary.xml (with props)
Modified:
incubator/devicemap/trunk/openddr/java/pom.xml
Modified: incubator/devicemap/trunk/openddr/java/pom.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/pom.xml?rev=1432101&r1=1432100&r2=1432101&view=diff
==============================================================================
--- incubator/devicemap/trunk/openddr/java/pom.xml (original)
+++ incubator/devicemap/trunk/openddr/java/pom.xml Fri Jan 11 15:42:57 2013
@@ -44,6 +44,13 @@
</scm>
<build>
+ <testResources>
+ <testResource>
+ <targetPath>${project.build.directory}/test-classes</targetPath>
+ <filtering>true</filtering>
+ <directory>${basedir}/src/test/resources</directory>
+ </testResource>
+ </testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -69,6 +76,12 @@
<version>1.6.6</version>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.6.6</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
@@ -80,5 +93,11 @@
<artifactId>DDR-Simple-API</artifactId>
<version>2008-04-04</version>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
Added: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/ServiceSetup.java
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/ServiceSetup.java?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/ServiceSetup.java (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/ServiceSetup.java Fri Jan 11 15:42:57 2013
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.devicemap.openddr.test;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.w3c.ddr.simple.Service;
+import org.w3c.ddr.simple.ServiceFactory;
+
+/** Provides a DeviceMap Service singleton
+ * for tests.
+ */
+public class ServiceSetup {
+ private static String SERVICE_CLASS = "org.openddr.simpleapi.oddr.ODDRService";
+ private static String CFG_RESOURCE_PATH = "config/openddr.properties";
+ public static final Service S;
+
+ static {
+ try {
+ final Properties props = new Properties();
+ final InputStream cfg = ServiceSetup.class.getClassLoader().getResourceAsStream(CFG_RESOURCE_PATH);
+ assertNotNull("Expecting " + CFG_RESOURCE_PATH + " resource to be available", cfg);
+ try {
+ props.load(cfg);
+ } finally {
+ cfg.close();
+ }
+ final String vocabIRI = props.getProperty("oddr.vocabulary.device");
+ S = ServiceFactory.newService(SERVICE_CLASS, vocabIRI, props);
+ } catch(Exception e) {
+ throw new RuntimeException("Failed to initialize Service", e);
+ }
+ }
+
+ /** Do not instantiate, use S instead */
+ private ServiceSetup() {
+ }
+}
Propchange: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/ServiceSetup.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/ServiceSetup.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL
Added: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestServiceCreation.java
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestServiceCreation.java?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestServiceCreation.java (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestServiceCreation.java Fri Jan 11 15:42:57 2013
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.devicemap.openddr.test;
+
+import org.junit.Test;
+import static org.junit.Assert.assertNotNull;
+
+import static org.apache.devicemap.openddr.test.ServiceSetup.S;
+
+/** Verify that our test Service is correctly initialized */
+public class TestServiceCreation {
+
+ @Test
+ public void testServiceFactory() throws Exception {
+ assertNotNull("Expecting non-null API version", S.getAPIVersion());
+ }
+}
\ No newline at end of file
Propchange: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestServiceCreation.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestServiceCreation.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL
Added: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestSimpleQueries.java
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestSimpleQueries.java?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestSimpleQueries.java (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestSimpleQueries.java Fri Jan 11 15:42:57 2013
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.devicemap.openddr.test;
+
+import static org.apache.devicemap.openddr.test.ServiceSetup.S;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.w3c.ddr.simple.PropertyRef;
+import org.w3c.ddr.simple.PropertyValue;
+import org.w3c.ddr.simple.PropertyValues;
+import org.w3c.ddr.simple.exception.NameException;
+import org.w3c.ddr.simple.exception.ValueException;
+
+/** Test a simple DDR query */
+public class TestSimpleQueries {
+
+ public static final String [] PROP_NAMES = { "vendor", "model", "displayWidth", "displayHeight", "playback_3gpp" };
+ public static final PropertyRef [] PROP_REFS = new PropertyRef[PROP_NAMES.length];
+
+ static {
+ try {
+ for(int i=0; i < PROP_NAMES.length; i++) {
+ PROP_REFS[i] = S.newPropertyRef(PROP_NAMES[i]);
+ }
+ } catch(Exception e) {
+ throw new RuntimeException("Exception while creating PropertyRefs", e);
+ }
+ }
+
+ private void assertProperties(String [] expected, PropertyValues actual, PropertyRef [] refs) throws NameException, ValueException {
+ assertNotNull("Expecting non-null PropertyValues", actual);
+ for(int i=0; i < refs.length; i++) {
+ final PropertyValue pv = actual.getValue(PROP_REFS[i]);
+ assertNotNull("Expecting non-null PropertyValue for "
+ + refs[i].getLocalPropertyName(), pv);
+ if(expected[i] == null) {
+ assertFalse("Expecting property to have exist==false: " + PROP_REFS[i].getLocalPropertyName(), pv.exists());
+ } else {
+ assertTrue("Expecting property to exist:" + PROP_REFS[i].getLocalPropertyName(), pv.exists());
+ assertEquals("Expecting value " + expected[i] + " for "
+ + refs[i].getLocalPropertyName(), expected[i], pv.getString());
+ }
+ }
+ }
+
+ @Test
+ public void nexusOneIsFound() throws Exception {
+ final String [] expected = { "Apache DeviceMap", "Nexus One", "245", "324", "true" };
+ final String nexusUA = "Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1";
+
+ final PropertyValues pvs = S.getPropertyValues(new UserAgentEvidence(nexusUA));
+ assertProperties(expected, pvs, PROP_REFS);
+ }
+
+ @Test
+ public void fooIsNotFound() throws Exception {
+ // We still get all PropertyValue for a device that's
+ // not found, but they're all non-existing, not ideal IMO,
+ // but maybe there's a good reason.
+ final String [] expected = new String[PROP_REFS.length];
+
+ final PropertyValues pvs = S.getPropertyValues(new UserAgentEvidence("foo"));
+ assertProperties(expected, pvs, PROP_REFS);
+ }
+}
\ No newline at end of file
Propchange: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestSimpleQueries.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/TestSimpleQueries.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL
Added: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/UserAgentEvidence.java
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/UserAgentEvidence.java?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/UserAgentEvidence.java (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/UserAgentEvidence.java Fri Jan 11 15:42:57 2013
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.devicemap.openddr.test;
+
+import org.w3c.ddr.simple.Evidence;
+
+/** Simple Evidence implementation, we use just User-Agent for now */
+public class UserAgentEvidence implements Evidence {
+ public static final String USER_AGENT = "User-Agent";
+ private final String userAgent;
+
+ public UserAgentEvidence(String userAgent) {
+ this.userAgent = userAgent;
+ }
+
+ public boolean exists(String key) {
+ return USER_AGENT.equalsIgnoreCase(key);
+ }
+
+ public String get(String key) {
+ if(USER_AGENT.equalsIgnoreCase(key)) {
+ return userAgent;
+ }
+ return null;
+ }
+
+ public void put(String key, String value) {
+ throw new UnsupportedOperationException("This Evidence is immutable");
+ }
+}
Propchange: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/UserAgentEvidence.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/devicemap/trunk/openddr/java/src/test/java/org/apache/devicemap/openddr/test/UserAgentEvidence.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/config/openddr.properties
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/config/openddr.properties?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/config/openddr.properties (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/config/openddr.properties Fri Jan 11 15:42:57 2013
@@ -0,0 +1,12 @@
+# Properties used to test the openddr module
+oddr.ua.device.builder.path=${project.build.directory}/test-classes/openddr/TEST_BuilderDataSource.xml
+oddr.ua.device.datasource.path=${project.build.directory}/test-classes/openddr/TEST_DeviceDataSource.xml
+oddr.ua.device.builder.patch.paths=${project.build.directory}/test-classes/openddr/TEST_BuilderDataSourcePatch.xml
+oddr.ua.device.datasource.patch.paths=${project.build.directory}/test-classes/openddr/TEST_DeviceDataSourcePatch.xml
+oddr.ua.browser.datasource.path=${project.build.directory}/test-classes/openddr/TEST_BrowserDataSource.xml
+oddr.ua.operatingSystem.datasource.path=${project.build.directory}/test-classes/openddr/TEST_OperatingSystemDataSource.xml
+ddr.vocabulary.core.path=${project.build.directory}/test-classes/openddr/TEST_coreVocabulary.xml
+oddr.vocabulary.path=${project.build.directory}/test-classes/openddr/TEST_oddrVocabulary.xml
+oddr.limited.vocabulary.path=${project.build.directory}/test-classes/openddr/TEST_oddrLimitedVocabulary.xml
+oddr.vocabulary.device=http://www.openddr.org/oddr-vocabulary
+oddr.threshold=70
\ No newline at end of file
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/config/openddr.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BrowserDataSource.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BrowserDataSource.xml?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BrowserDataSource.xml (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BrowserDataSource.xml Fri Jan 11 15:42:57 2013
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<ODDR>
+ <version>
+ <ver>1.00</ver>
+ <last_updated>2013-01-11 14:00:00</last_updated>
+ <official_url>http://incubator.apache.org/devicemap</official_url>
+ <maintainers></maintainers>
+ <authors></authors>
+ <statement>DeviceMap test data file</statement>
+ </version>
+ <Browsers>
+ <browser id="DeviceMap.test.1.2.4">
+ <property name="cookieSupport" value="True"/>
+ <property name="imageFormatSupport" value="gif87,gif89a,png,jpeg"/>
+ <property name="markupSupport" value="xhtmlBasic10,xhtmlMP10,WML10"/>
+ </browser>
+ </Browsers>
+</ODDR>
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BrowserDataSource.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSource.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSource.xml?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSource.xml (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSource.xml Fri Jan 11 15:42:57 2013
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<ODDR>
+ <version>
+ <ver>1.00</ver>
+ <last_updated>2013-01-11 14:00:00</last_updated>
+ <official_url>http://incubator.apache.org/devicemap
+ </official_url>
+ <maintainers></maintainers>
+ <authors></authors>
+ <statement>DeviceMap test data file</statement>
+ </version>
+ <Builders>
+ <builder
+ class="org.openddr.simpleapi.oddr.builder.device.AndroidDeviceBuilder">
+ <device id="Nexus One">
+ <list>
+ <value>Nexus One</value>
+ </list>
+ </device>
+ </builder>
+ </Builders>
+</ODDR>
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSource.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSourcePatch.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSourcePatch.xml?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSourcePatch.xml (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSourcePatch.xml Fri Jan 11 15:42:57 2013
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<ODDR>
+ <version>
+ <ver>1.00</ver>
+ <last_updated>2013-01-11 14:00:00</last_updated>
+ <official_url>http://incubator.apache.org/devicemap
+ </official_url>
+ <maintainers></maintainers>
+ <authors></authors>
+ <statement>DeviceMap test data file</statement>
+ </version>
+ <Builders>
+ <builder
+ class="org.openddr.simpleapi.oddr.builder.device.SimpleDeviceBuilder">
+ <device id="desktopDevice">
+ <list>
+ <value>Mozilla/5.0; (X11; Linux x86_64; rv:8.0)
+ </value>
+ <value>Mozilla/4.0 (compatible; MSIE 6.0;</value>
+ <value>Mozilla/4.0 (compatible; MSIE 7.0;</value>
+ <value>Mozilla/4.0 (compatible; MSIE 8.0;</value>
+ <value>Firefox</value>
+ <value>Firefox/1.0</value>
+ <value>Firefox/1.5</value>
+ <value>Firefox/2.0</value>
+ <value>Firefox/3.0</value>
+ <value>Firefox/3.5</value>
+ <value>Firefox/4.0</value>
+ <value>Firefox/5.0</value>
+ <value>Firefox/6.0</value>
+ <value>Firefox/7.0</value>
+ <value>Opera</value>
+ <value>Opera/7</value>
+ <value>Opera 7</value>
+ </list>
+ </device>
+ </builder>
+ </Builders>
+</ODDR>
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_BuilderDataSourcePatch.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSource.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSource.xml?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSource.xml (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSource.xml Fri Jan 11 15:42:57 2013
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<ODDR>
+ <version>
+ <ver>1.00</ver>
+ <last_updated>2013-01-11 14:00:00</last_updated>
+ <official_url>http://incubator.apache.org/devicemap
+ </official_url>
+ <maintainers></maintainers>
+ <authors></authors>
+ <statement>DeviceMap test data file</statement>
+ </version>
+ <Devices>
+ <device id="Nexus One" parentId="genericTest">
+ <property name="model" value="Nexus One" />
+ <property name="displayWidth" value="245" />
+ <property name="displayHeight" value="324" />
+ <property name="vendor" value="Apache DeviceMap" />
+ </device>
+ <device id="deviceMapPhone" parentId="genericTest">
+ <property name="model" value="DeviceMapPhone" />
+ <property name="displayWidth" value="240" />
+ <property name="displayHeight" value="320" />
+ </device>
+ <device id="genericTest" parentId="root">
+ <property name="jpg" value="true" />
+ <property name="can_skip_aligned_link_row" value="true" />
+ <property name="png" value="true" />
+ <property name="vendor" value="Generic Vendor" />
+ <property name="playback_3gpp" value="true" />
+ <property name="max_url_length_in_requests" value="256" />
+ <property name="xhtml_table_support" value="true" />
+ <property name="cookieSupport" value="true" />
+ <property name="playback_acodec_amr" value="nb" />
+ </device>
+ </Devices>
+</ODDR>
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSource.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSourcePatch.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSourcePatch.xml?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSourcePatch.xml (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSourcePatch.xml Fri Jan 11 15:42:57 2013
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<ODDR>
+ <version>
+ <ver>1.00</ver>
+ <last_updated>2013-01-11 14:00:00</last_updated>
+ <official_url>http://incubator.apache.org/devicemap
+ </official_url>
+ <maintainers></maintainers>
+ <authors></authors>
+ <statement>DeviceMap test data file</statement>
+ </version>
+
+ <Devices>
+ <device id="desktopDevice" parentId="genericTest">
+ <property name="vendor" value="desktop"/>
+ <property name="model" value="desktop"/>
+ <property name="displayHeight" value="600"/>
+ <property name="displayWidth" value="800"/>
+ <property name="is_wireless_device" value="false"/>
+ <property name="ajax_support_javascript" value="true"/>
+ <property name="ajax_support_getelementbyid" value="true"/>
+ <property name="ajax_support_inner_html" value="true"/>
+ <property name="ajax_manipulate_dom" value="true"/>
+ <property name="ajax_manipulate_css" value="true"/>
+ <property name="ajax_support_events" value="true"/>
+ <property name="ajax_support_event_listener" value="true"/>
+ </device>
+ </Devices>
+</ODDR>
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_DeviceDataSourcePatch.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_OperatingSystemDataSource.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_OperatingSystemDataSource.xml?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_OperatingSystemDataSource.xml (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_OperatingSystemDataSource.xml Fri Jan 11 15:42:57 2013
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<ODDR>
+ <version>
+ <ver>1.00</ver>
+ <last_updated>2013-01-11 14:00:00</last_updated>
+ <official_url>http://incubator.apache.org/devicemap
+ </official_url>
+ <maintainers></maintainers>
+ <authors></authors>
+ <statement>DeviceMap test data file</statement>
+ </version>
+
+ <OperatingSystem>
+ <operatingSystem id="Apple.iOS.1.0.0.0">
+ </operatingSystem>
+ </OperatingSystem>
+</ODDR>
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_OperatingSystemDataSource.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_coreVocabulary.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_coreVocabulary.xml?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_coreVocabulary.xml (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_coreVocabulary.xml Fri Jan 11 15:42:57 2013
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<ODDR>
+ <version>
+ <ver>1.00</ver>
+ <last_updated>2013-01-11 14:00:00</last_updated>
+ <official_url>http://incubator.apache.org/devicemap
+ </official_url>
+ <maintainers></maintainers>
+ <authors></authors>
+ <statement>DeviceMap test data file</statement>
+ </version>
+ <VocabularyDescription
+ target="http://www.w3.org/2008/01/ddr-core-vocabulary">
+ <Aspects>
+ <Aspect name="device" />
+ <Aspect name="webBrowser" />
+ </Aspects>
+ <Properties>
+ <Property name="vendor" datatype="xs:string" aspects="device, webBrowser" defaultAspect="device" />
+ <Property name="model" datatype="xs:string" aspects="device, webBrowser" defaultAspect="device" />
+ <Property name="displayWidth" datatype="xs:nonNegativeInteger" aspects="device, webBrowser" defaultAspect="device" />
+ <Property name="displayHeight" datatype="xs:nonNegativeInteger" aspects="device, webBrowser" defaultAspect="device" />
+ <Property name="displayColorDepth" datatype="xs:nonNegativeInteger" aspects="device" defaultAspect="device" />
+ <Property name="cookieSupport" datatype="xs:boolean" aspects="webBrowser" defaultAspect="webBrowser" />
+ <Property name="version" datatype="xs:string" aspects="device, webBrowser" defaultAspect="device" />
+ <Property name="imageFormatSupport" datatype="xs:enumeration" aspects="webBrowser" defaultAspect="webBrowser" />
+ <Property name="inputModeSupport" datatype="xs:enumeration" aspects="webBrowser" defaultAspect="webBrowser" />
+ <Property name="stylesheetSupport" datatype="xs:enumeration" aspects="webBrowser" defaultAspect="webBrowser" />
+ <Property name="markupSupport" datatype="xs:enumeration" aspects="webBrowser" defaultAspect="webBrowser" />
+ <Property name="inputDevices" datatype="xs:enumeration" aspects="device" defaultAspect="device" />
+ <Property name="scriptSupport" datatype="xs:enumeration" aspects="webBrowser" defaultAspect="webBrowser" />
+ </Properties>
+ </VocabularyDescription>
+</ODDR>
\ No newline at end of file
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_coreVocabulary.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrLimitedVocabulary.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrLimitedVocabulary.xml?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrLimitedVocabulary.xml (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrLimitedVocabulary.xml Fri Jan 11 15:42:57 2013
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<ODDR>
+ <version>
+ <ver>1.00</ver>
+ <last_updated>2013-01-11 14:00:00</last_updated>
+ <official_url>http://incubator.apache.org/devicemap
+ </official_url>
+ <maintainers></maintainers>
+ <authors></authors>
+ <statement>DeviceMap test data file</statement>
+ </version>
+
+ <!-- DDR Core Vocabulary description -->
+ <VocabularyDescription target="http://www.w3.org/2008/01/ddr-core-vocabulary">
+ <!-- Aspects -->
+ <Aspects>
+ <Aspect name="device"/>
+ </Aspects>
+ <!-- Properties -->
+ <Properties>
+ <Property name="vendor" datatype="xs:string" aspects="device" defaultAspect="device"/>
+ <Property name="model" datatype="xs:string" aspects="device" defaultAspect="device"/>
+ <Property name="displayWidth" datatype="xs:nonNegativeInteger" aspects="device" defaultAspect="device"/>
+ <Property name="displayHeight" datatype="xs:nonNegativeInteger" aspects="device" defaultAspect="device"/>
+ <Property name="mobile_browser" datatype="xs:string" aspects="device" defaultAspect="device"/>
+ <Property name="mobile_browser_version" datatype="xs:string" aspects="device" defaultAspect="device"/>
+ <Property name="device_os" datatype="xs:string" aspects="device" defaultAspect="device"/>
+ <Property name="device_os_version" datatype="xs:string" aspects="device" defaultAspect="device"/>
+ <Property name="xhtml_format_as_css_property" datatype="xs:string" aspects="device" defaultAspect="device"/>
+ <Property name="xhtml_format_as_attribute" datatype="xs:string" aspects="device" defaultAspect="device"/>
+ <Property name="marketing_name" datatype="xs:string" aspects="device" defaultAspect="device" />
+ <Property name="playback_3gpp" datatype="xs:boolean" aspects="device" defaultAspect="device"/>
+ </Properties>
+ </VocabularyDescription>
+</ODDR>
\ No newline at end of file
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrLimitedVocabulary.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrVocabulary.xml
URL: http://svn.apache.org/viewvc/incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrVocabulary.xml?rev=1432101&view=auto
==============================================================================
--- incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrVocabulary.xml (added)
+++ incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrVocabulary.xml Fri Jan 11 15:42:57 2013
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+ -->
+<ODDR>
+ <version>
+ <ver>1.00</ver>
+ <last_updated>2013-01-11 14:00:00</last_updated>
+ <official_url>http://incubator.apache.org/devicemap
+ </official_url>
+ <maintainers></maintainers>
+ <authors></authors>
+ <statement>DeviceMap test data file</statement>
+ </version>
+
+ <VocabularyDescription target="http://www.openddr.org/oddr-vocabulary">
+ <Aspects>
+ <Aspect name="device"/>
+ <Aspect name="webBrowser"/>
+ <Aspect name="operativeSystem"/>
+ </Aspects>
+ <Properties>
+ <Property name="id" datatype="xs:string" aspects="device" defaultAspect="device"/>
+ <Property name="vendor" datatype="xs:string" aspects="device, webBrowser, operativeSystem" defaultAspect="device"/>
+ <Property name="model" datatype="xs:string" aspects="device, webBrowser, operativeSystem" defaultAspect="device"/>
+ <Property name="displayWidth" datatype="xs:nonNegativeInteger" aspects="device, webBrowser" defaultAspect="device"/>
+ <Property name="displayHeight" datatype="xs:nonNegativeInteger" aspects="device, webBrowser" defaultAspect="device"/>
+ <Property name="stylesheetSupport" datatype="xs:enumeration" aspects="webBrowser" defaultAspect="webBrowser"/>
+ <Property name="markupSupport" datatype="xs:enumeration" aspects="webBrowser" defaultAspect="webBrowser"/>
+ <Property name="scriptSupport" datatype="xs:enumeration" aspects="webBrowser" defaultAspect="webBrowser"/>
+ <Property aspects="device" datatype="xs:string" defaultAspect="device" name="mobile_browser"/>
+ <Property aspects="device" datatype="xs:integer" defaultAspect="device" name="nokia_feature_pack"/>
+ <Property name="playback_3gpp" datatype="xs:boolean" aspects="device" defaultAspect="device"/>
+ </Properties>
+ </VocabularyDescription>
+</ODDR>
\ No newline at end of file
Propchange: incubator/devicemap/trunk/openddr/java/src/test/resources/openddr/TEST_oddrVocabulary.xml
------------------------------------------------------------------------------
svn:eol-style = native