devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wk...@apache.org
Subject svn commit: r1648582 - in /devicemap/trunk/examples: ./ ddr-filter/ ddr-filter/src/main/java/org/apache/devicemap/example/webfilter/ ddr-filter/src/main/resources/ ddr-filter/src/main/webapp/WEB-INF/ ddr-service/ ddr-service/src/main/resources/ ddr-ser...
Date Tue, 30 Dec 2014 19:05:39 GMT
Author: wkeil
Date: Tue Dec 30 19:05:38 2014
New Revision: 1648582

URL: http://svn.apache.org/r1648582
Log:
DMAP-111: Improve Web Examples 

Task-Url: https://issues.apache.org/jira/browse/DMAP-111

Added:
    devicemap/trunk/examples/ddr-filter/src/main/resources/oddr.properties
      - copied, changed from r1648550, devicemap/trunk/examples/ddr-filter/src/main/webapp/WEB-INF/oddr.properties
    devicemap/trunk/examples/ddr-service/src/main/resources/oddr.properties
Removed:
    devicemap/trunk/examples/ddr-filter/src/main/webapp/WEB-INF/oddr.properties
    devicemap/trunk/examples/ddr-service/src/main/webapp/WEB-INF/oddr.properties
Modified:
    devicemap/trunk/examples/ddr-filter/pom.xml
    devicemap/trunk/examples/ddr-filter/src/main/java/org/apache/devicemap/example/webfilter/IdentificationFilter.java
    devicemap/trunk/examples/ddr-service/NOTICE
    devicemap/trunk/examples/ddr-service/pom.xml
    devicemap/trunk/examples/pom.xml

Modified: devicemap/trunk/examples/ddr-filter/pom.xml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/ddr-filter/pom.xml?rev=1648582&r1=1648581&r2=1648582&view=diff
==============================================================================
--- devicemap/trunk/examples/ddr-filter/pom.xml (original)
+++ devicemap/trunk/examples/ddr-filter/pom.xml Tue Dec 30 19:05:38 2014
@@ -3,6 +3,9 @@
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
 	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 	<modelVersion>4.0.0</modelVersion>
+	<properties>
+		<devicemap.data.path>/temp/devicemap-data</devicemap.data.path>
+	</properties>
 	<parent>
 		<groupId>org.apache.devicemap.examples</groupId>
 		<artifactId>examples-parent</artifactId>
@@ -31,7 +34,7 @@
 			<groupId>org.apache.logging.log4j</groupId>
 			<artifactId>log4j-core</artifactId>
 		</dependency>
-		
+
 		<dependency>
 			<groupId>org.apache.devicemap</groupId>
 			<artifactId>devicemap-data</artifactId>
@@ -45,6 +48,17 @@
 	</dependencies>
 	<build>
 		<finalName>dmap-ddr-filter</finalName>
+		<resources>
+			<!-- <resource> <directory>src/main/webapp</directory> <filtering>true</filtering>

+				<includes> <include>**/*.properties</include> </includes> </resource>
-->
+			<resource>
+				<filtering>true</filtering>
+				<directory>${basedir}/src/main/resources</directory>
+				<includes>
+					<include>oddr.properties</include>
+				</includes>
+			</resource>
+		</resources>
 		<plugins>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
@@ -62,13 +76,17 @@
 							<excludes>**/*.properties</excludes>
 							<excludes>**/*.class</excludes>
 							<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
-							<outputDirectory>/temp/devicemap-data</outputDirectory>
+							<outputDirectory>${devicemap.data.path}</outputDirectory>
 						</configuration>
 					</execution>
 				</executions>
 			</plugin>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-resources-plugin</artifactId>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-compiler-plugin</artifactId>
 				<configuration>
 					<source>${java.version}</source>

Modified: devicemap/trunk/examples/ddr-filter/src/main/java/org/apache/devicemap/example/webfilter/IdentificationFilter.java
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/ddr-filter/src/main/java/org/apache/devicemap/example/webfilter/IdentificationFilter.java?rev=1648582&r1=1648581&r2=1648582&view=diff
==============================================================================
--- devicemap/trunk/examples/ddr-filter/src/main/java/org/apache/devicemap/example/webfilter/IdentificationFilter.java
(original)
+++ devicemap/trunk/examples/ddr-filter/src/main/java/org/apache/devicemap/example/webfilter/IdentificationFilter.java
Tue Dec 30 19:05:38 2014
@@ -65,7 +65,7 @@ public class IdentificationFilter implem
 	    ServletContext context = filterConfig.getServletContext();                
 	
 	    try {
-	        initializationProperties.load(context.getResourceAsStream("/WEB-INF/oddr.properties"));
+	        initializationProperties.load(context.getResourceAsStream("WEB-INF/classes/oddr.properties"));
 	        identificationService = ServiceFactory.newService("org.apache.devicemap.simpleddr.ODDRService",
initializationProperties.getProperty(ODDRService.ODDR_VOCABULARY_IRI), initializationProperties);
 	    } catch (Exception ex) {
 	    	log.error(ex);
@@ -120,19 +120,19 @@ public class IdentificationFilter implem
             PropertyValue displayWidth = propertyValues.getValue(displayWidthRef);
             PropertyValue displayHeight = propertyValues.getValue(displayHeightRef);
 
-            log.info("Vendor: " + vendor + "(" + vendor.exists() + ")");
-            log.info("Model: " + model + "(" + model.exists() + ")");
+            log.debug("Vendor: " + vendor + "(" + vendor.exists() + ")");
+            log.debug("Model: " + model + "(" + model.exists() + ")");
 
             if (vendor.exists())
                 ((HttpServletRequest)request).setAttribute("vendor", vendor.getString());
             if (model.exists())
                 ((HttpServletRequest)request).setAttribute("model", model.getString());
             if (displayWidth.exists()) {
-            	log.info("W: " + displayWidth + "(" + displayWidth.exists() + ")");
+            	log.debug("W: " + displayWidth + "(" + displayWidth.exists() + ")");
                 request.setAttribute("displayWidth", displayWidth.getInteger());
             }
             if (displayHeight.exists()) {
-            	log.info("H: " + displayHeight + "(" + displayHeight.exists() + ")");
+            	log.debug("H: " + displayHeight + "(" + displayHeight.exists() + ")");
             	request.setAttribute("displayHeight", displayHeight.getInteger());
             }
         } catch (Exception ex) {

Copied: devicemap/trunk/examples/ddr-filter/src/main/resources/oddr.properties (from r1648550,
devicemap/trunk/examples/ddr-filter/src/main/webapp/WEB-INF/oddr.properties)
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/ddr-filter/src/main/resources/oddr.properties?p2=devicemap/trunk/examples/ddr-filter/src/main/resources/oddr.properties&p1=devicemap/trunk/examples/ddr-filter/src/main/webapp/WEB-INF/oddr.properties&r1=1648550&r2=1648582&rev=1648582&view=diff
==============================================================================
--- devicemap/trunk/examples/ddr-filter/src/main/webapp/WEB-INF/oddr.properties (original)
+++ devicemap/trunk/examples/ddr-filter/src/main/resources/oddr.properties Tue Dec 30 19:05:38
2014
@@ -1,11 +1,11 @@
-oddr.ua.device.builder.path=/temp/devicemap-data/devicedata/BuilderDataSource.xml
-oddr.ua.device.datasource.path=/temp/devicemap-data/devicedata/devicedataSource.xml
-oddr.ua.device.builder.patch.paths=/temp/devicemap-data/devicedata/BuilderDataSourcePatch.xml
-oddr.ua.device.datasource.patch.paths=/temp/devicemap-data/devicedata/devicedataSourcePatch.xml
-oddr.ua.browser.datasource.path=/temp/devicemap-data/devicedata/BrowserDataSource.xml
-oddr.ua.operatingSystem.datasource.path=/temp/devicemap-data/devicedata/OperatingSystemDataSource.xml
-ddr.vocabulary.core.path=/temp/devicemap-data/devicedata/coreVocabulary.xml
-oddr.vocabulary.path=/temp/devicemap-data/devicedata/oddrVocabulary.xml
-oddr.limited.vocabulary.path=/temp/devicemap-data/devicedata/oddrLimitedVocabulary.xml
+oddr.ua.device.builder.path=${devicemap.data.path}/devicedata/BuilderDataSource.xml
+oddr.ua.device.datasource.path=${devicemap.data.path}/devicedata/devicedataSource.xml
+oddr.ua.device.builder.patch.paths=${devicemap.data.path}/devicedata/BuilderDataSourcePatch.xml
+oddr.ua.device.datasource.patch.paths=${devicemap.data.path}/devicedata/devicedataSourcePatch.xml
+oddr.ua.browser.datasource.path=${devicemap.data.path}/devicedata/BrowserDataSource.xml
+oddr.ua.operatingSystem.datasource.path=${devicemap.data.path}/devicedata/OperatingSystemDataSource.xml
+ddr.vocabulary.core.path=${devicemap.data.path}/devicedata/coreVocabulary.xml
+oddr.vocabulary.path=${devicemap.data.path}/devicedata/oddrVocabulary.xml
+oddr.limited.vocabulary.path=${devicemap.data.path}/devicedata/oddrLimitedVocabulary.xml
 oddr.vocabulary.device=http://www.openddr.org/oddr-vocabulary
-oddr.threshold=30
+oddr.threshold=70

Modified: devicemap/trunk/examples/ddr-service/NOTICE
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/ddr-service/NOTICE?rev=1648582&r1=1648581&r2=1648582&view=diff
==============================================================================
--- devicemap/trunk/examples/ddr-service/NOTICE (original)
+++ devicemap/trunk/examples/ddr-service/NOTICE Tue Dec 30 19:05:38 2014
@@ -1,3 +1,8 @@
+Apache DeviceMap credits
+========================
+
+The initial API was donated by OpenDDR LLC, represented by Werner Keil.
+
 =============
 Bundled APIs:
 =============

Modified: devicemap/trunk/examples/ddr-service/pom.xml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/ddr-service/pom.xml?rev=1648582&r1=1648581&r2=1648582&view=diff
==============================================================================
--- devicemap/trunk/examples/ddr-service/pom.xml (original)
+++ devicemap/trunk/examples/ddr-service/pom.xml Tue Dec 30 19:05:38 2014
@@ -13,6 +13,9 @@
 		<artifactId>examples-parent</artifactId>
 		<version>1.0.0-SNAPSHOT</version>
 	</parent>
+	<properties>
+		<devicemap.data.path>/temp/devicemap-data</devicemap.data.path>
+	</properties>
 
 	<dependencies>
 		<dependency>
@@ -88,7 +91,7 @@
 							<excludes>**/*.properties</excludes>
 							<excludes>**/*.class</excludes>
 							<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
-							<outputDirectory>/temp/devicemap-data</outputDirectory>
+							<outputDirectory>${devicemap.data.path}</outputDirectory>
 						</configuration>
 					</execution>
 				</executions>

Added: devicemap/trunk/examples/ddr-service/src/main/resources/oddr.properties
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/ddr-service/src/main/resources/oddr.properties?rev=1648582&view=auto
==============================================================================
--- devicemap/trunk/examples/ddr-service/src/main/resources/oddr.properties (added)
+++ devicemap/trunk/examples/ddr-service/src/main/resources/oddr.properties Tue Dec 30 19:05:38
2014
@@ -0,0 +1,11 @@
+oddr.ua.device.builder.path=${devicemap.data.path}/devicedata/BuilderDataSource.xml
+oddr.ua.device.datasource.path=${devicemap.data.path}/devicedata/devicedataSource.xml
+oddr.ua.device.builder.patch.paths=${devicemap.data.path}/devicedata/BuilderDataSourcePatch.xml
+oddr.ua.device.datasource.patch.paths=${devicemap.data.path}/devicedata/devicedataSourcePatch.xml
+oddr.ua.browser.datasource.path=${devicemap.data.path}/devicedata/BrowserDataSource.xml
+oddr.ua.operatingSystem.datasource.path=${devicemap.data.path}/devicedata/OperatingSystemDataSource.xml
+ddr.vocabulary.core.path=${devicemap.data.path}/devicedata/coreVocabulary.xml
+oddr.vocabulary.path=${devicemap.data.path}/devicedata/oddrVocabulary.xml
+oddr.limited.vocabulary.path=${devicemap.data.path}/devicedata/oddrLimitedVocabulary.xml
+oddr.vocabulary.device=http://www.openddr.org/oddr-vocabulary
+oddr.threshold=70

Modified: devicemap/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/devicemap/trunk/examples/pom.xml?rev=1648582&r1=1648581&r2=1648582&view=diff
==============================================================================
--- devicemap/trunk/examples/pom.xml (original)
+++ devicemap/trunk/examples/pom.xml Tue Dec 30 19:05:38 2014
@@ -39,7 +39,7 @@
 		<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
 		<devicemap.version>1.1.0</devicemap.version>
 		<devicemap.ddr.version>1.0.0-SNAPSHOT</devicemap.ddr.version>
-		<devicemap.data.version>1.0.1</devicemap.data.version>
+		<devicemap.data.version>1.0.2-SNAPSHOT</devicemap.data.version>
 		<devicemap.examples.version>1.0.0-SNAPSHOT</devicemap.examples.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@@ -102,6 +102,7 @@
 		<!-- >pluginManagement> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId>

 			<configuration> <descriptors> <descriptor>src/assembly/bin.xml</descriptor>

 			</descriptors> </configuration> </plugin> </plugins> </pluginManagement
-->
+
 		<plugins>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>



Mime
View raw message