Skip to content

Commit

Permalink
18: Streamline Classifier Device with data/W3C terms
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed Mar 14, 2021
1 parent db3e387 commit 85b4fbe
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 22 deletions.
10 changes: 10 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion java/classifier/flow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<artifactId>openddr-classifier-examples</artifactId>
<groupId>mobi.openddr.examples.classifier</groupId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<artifactId>openddr-flow</artifactId>
<packaging>war</packaging>
Expand Down
4 changes: 2 additions & 2 deletions java/classifier/mvc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
Copyright (c) 2014-2015 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2018, 2020 Eclipse Krazo committers and contributors
Copyright (c) 2018, 2021 Eclipse Krazo committers and contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -24,7 +24,7 @@
<parent>
<groupId>mobi.openddr.examples.classifier</groupId>
<artifactId>openddr-classifier-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<artifactId>openddr-mvc-examples</artifactId>
<packaging>war</packaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2020 OpenDDR LLC and others. All rights reserved.
* Copyright (c) 2011-2021 OpenDDR LLC and others. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,7 @@
@ApplicationScoped
class ClassifyService {
// TODO make this configurable
private static final String DEFAULT_URL = "http://dl.bintray.com/openddr/ddr/1.33/";
private static final String DEFAULT_URL = "http://openddr.mobi/data/latest/";

private static final Logger log = LogManager.getLogger(ClassifyService.class);
private Classifier classifier;
Expand All @@ -51,10 +51,10 @@ Device classify(String text) {
}

boolean isWireless(Device device) {
return "true".equals(device.getAttribute("is_wireless_device"));
return "true".equals(device.getProperty("is_wireless_device"));
}

boolean isTablet(Device device) {
return "true".equals(device.getAttribute("is_tablet"));
return "true".equals(device.getProperty("is_tablet"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* Holds device information.
*
* @author Ivar Grimstad
* @deprecated use openddr-extensions
*/
@RedirectScoped
public class DeviceInfo implements Serializable {
Expand Down
2 changes: 1 addition & 1 deletion java/classifier/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>mobi.openddr.examples</groupId>
<artifactId>openddr-java-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>

<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion java/classifier/servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<parent>
<groupId>mobi.openddr.examples.classifier</groupId>
<artifactId>openddr-classifier-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>

<!-- Additional repositories -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class ClassifyServlet extends HttpServlet {
*/
private static final long serialVersionUID = -5231604595735057872L;

private static final String DEFAULT_URL = "http://dl.bintray.com/openddr/ddr/1.33/";
private static final String DEFAULT_URL = "http://dl.bintray.com/openddr/ddr/1.34/";

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
Expand Down
2 changes: 1 addition & 1 deletion java/classifier/spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@
<parent>
<artifactId>openddr-classifier-examples</artifactId>
<groupId>mobi.openddr.examples.classifier</groupId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
</project>
2 changes: 1 addition & 1 deletion java/gwt/gwt-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>mobi.openddr.examples</groupId>
<artifactId>gwt</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<artifactId>gwt-model</artifactId>
<name>Sample GWT - Model</name>
Expand Down
2 changes: 1 addition & 1 deletion java/gwt/gwt-shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>mobi.openddr.examples</groupId>
<artifactId>gwt</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<artifactId>gwt-shared</artifactId>
<name>Sample GWT - Shared classes</name>
Expand Down
2 changes: 1 addition & 1 deletion java/gwt/gwt-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>mobi.openddr.examples</groupId>
<artifactId>gwt</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<artifactId>gwt-web</artifactId>
<packaging>war</packaging>
Expand Down
2 changes: 1 addition & 1 deletion java/gwt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<artifactId>openddr-java-examples</artifactId>
<groupId>mobi.openddr.examples</groupId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<groupId>mobi.openddr.examples</groupId>
<artifactId>gwt</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>mobi.openddr.examples</groupId>
<artifactId>openddr-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>

<artifactId>openddr-java-examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion java/w3c/console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>mobi.openddr.examples.w3c</groupId>
<artifactId>openddr-w3c-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<artifactId>openddr-w3c-console</artifactId>
<name>OpenDDR W3C DDR Simple Console</name>
Expand Down
2 changes: 1 addition & 1 deletion java/w3c/filter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>mobi.openddr.examples.w3c</groupId>
<artifactId>openddr-w3c-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<artifactId>openddr-w3c-filter</artifactId>
<packaging>war</packaging>
Expand Down
4 changes: 2 additions & 2 deletions java/w3c/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>mobi.openddr.examples</groupId>
<artifactId>openddr-java-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<groupId>mobi.openddr.examples.w3c</groupId>
<artifactId>openddr-w3c-examples</artifactId>
Expand All @@ -36,7 +36,7 @@
<dependency>
<groupId>mobi.openddr</groupId>
<artifactId>openddr-data</artifactId>
<version>1.33</version>
<version>1.34</version>
</dependency>
<dependency>
<groupId>mobi.openddr.client</groupId>
Expand Down
2 changes: 1 addition & 1 deletion java/w3c/service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>mobi.openddr.examples.w3c</groupId>
<artifactId>openddr-w3c-examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
</parent>
<properties>
<devicemap.data.path>/temp/openddr-data</devicemap.data.path>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<groupId>mobi.openddr.examples</groupId>
<artifactId>openddr-examples</artifactId>
<packaging>pom</packaging>
<version>1.1.0-SNAPSHOT</version>
<version>1.1.0</version>
<name>OpenDDR Examples</name>
<description>OpenDDR Examples</description>
<url>http://openddr.mobi/</url>
Expand Down

0 comments on commit 85b4fbe

Please sign in to comment.