devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From re...@apache.org
Subject svn commit: r1691999 - in /devicemap/trunk/data/2.0/reference/device: ./ attributes.json patterns.json test.json
Date Mon, 20 Jul 2015 19:12:48 GMT
Author: rezan
Date: Mon Jul 20 19:12:48 2015
New Revision: 1691999

URL: http://svn.apache.org/r1691999
Log:
reference_device example

Added:
    devicemap/trunk/data/2.0/reference/device/
    devicemap/trunk/data/2.0/reference/device/attributes.json
    devicemap/trunk/data/2.0/reference/device/patterns.json
    devicemap/trunk/data/2.0/reference/device/test.json

Added: devicemap/trunk/data/2.0/reference/device/attributes.json
URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/device/attributes.json?rev=1691999&view=auto
==============================================================================
--- devicemap/trunk/data/2.0/reference/device/attributes.json (added)
+++ devicemap/trunk/data/2.0/reference/device/attributes.json Mon Jul 20 19:12:48 2015
@@ -0,0 +1,47 @@
+{
+  "specVersion": 2.0,
+  "type": "attribute",
+  "domain": "reference_device",
+  "domainVersion": "1.0",
+  "description": "reference domain for devices, example only",
+  "publishDate": "2015-07-20T18:59:33+0000",
+  "attributes": [
+    {
+      "patternId": "iphone",
+      "parentId": "genericApple",
+      "attributes": {
+        "model": "iPhone",
+        "isPhone": true,
+        "displayWidth": 640,
+        "displayHeight": 960,
+        "ppi": 326
+      }
+    },
+    {
+      "patternId": "ipad",
+      "parentId": "genericApple",
+      "attributes": {
+        "model": "iPad",
+        "isTablet": true,
+        "displayWidth": 768,
+        "displayHeight": 1024,
+        "ppi": 132
+      }
+    },
+    {
+      "patternId": "genericApple",
+      "parentId": "root",
+      "attributes": {
+        "vendor": "Apple"
+      }
+    },
+    {
+      "patternId": "root",
+      "parentId": "_root",
+      "attributes": {
+        "isPhone": false,
+        "isTablet": false
+      }
+    }
+  ]
+}

Added: devicemap/trunk/data/2.0/reference/device/patterns.json
URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/device/patterns.json?rev=1691999&view=auto
==============================================================================
--- devicemap/trunk/data/2.0/reference/device/patterns.json (added)
+++ devicemap/trunk/data/2.0/reference/device/patterns.json Mon Jul 20 19:12:48 2015
@@ -0,0 +1,35 @@
+{
+  "specVersion": 2.0,
+  "type": "pattern",
+  "domain": "reference_device",
+  "domainVersion": "1.0",
+  "description": "reference domain for devices, example only",
+  "publishDate": "2015-07-20T18:52:57+0000",
+  "inputParser": {
+    "transformers": [
+      {
+        "type": "LowerCase"
+      }
+    ],
+    "tokenSeperators": [ " ", "-", "_", "\\", "/", "[", "]", "(", ")", ";" ],
+    "ngramConcatSize": 4
+  },
+  "patternSet": {
+    "defaultId": "unknown",
+    "simpleHashCount": 100,
+    "patterns": [
+      {
+        "patternId": "iphone",
+        "rankType": "Strong",
+        "patternType": "Simple",
+        "patternTokens": ["iphone"]
+      },
+      {
+        "patternId": "ipad",
+        "rankType": "Strong",
+        "patternType": "Simple",
+        "patternTokens": ["ipad"]
+      }
+    ]
+  }
+}

Added: devicemap/trunk/data/2.0/reference/device/test.json
URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/device/test.json?rev=1691999&view=auto
==============================================================================
--- devicemap/trunk/data/2.0/reference/device/test.json (added)
+++ devicemap/trunk/data/2.0/reference/device/test.json Mon Jul 20 19:12:48 2015
@@ -0,0 +1,22 @@
+{
+  "specVersion": 2.0,
+  "type": "test",
+  "domain": "reference_device",
+  "domainVersion": "1.0",
+  "description": "reference domain tests for devices, example only",
+  "publishDate": "2015-07-20T19:11:59+0000",
+  "tests": [
+    {
+      "input": "Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X; zh-cn) AppleWebKit/534.46.0
(KHTML, like Gecko) CriOS/21.0.1180.82 Mobile/10A403 Safari/7534.48.3",
+      "resultPatternId": "ipad"
+    },
+    {
+      "input": "Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46
(KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
+      "resultPatternId": "iphone"
+    },
+    {
+      "input": "Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; es) AppleWebKit/534.11+ (KHTML,
like Gecko) Version/7.1.0.428 Mobile Safari/534.11+",
+      "resultPatternId": "unknown"
+    }
+  ]
+}



Mime
View raw message