You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devicemap.apache.org by re...@apache.org on 2015/07/11 01:56:17 UTC

svn commit: r1690325 - in /devicemap/trunk/data/2.0/test/a: attributes.json patterns.json test.json test_a_attributes.json test_a_patterns.json

Author: rezan
Date: Fri Jul 10 23:56:16 2015
New Revision: 1690325

URL: http://svn.apache.org/r1690325
Log:
test spec a patterns, attributes, and test

Added:
    devicemap/trunk/data/2.0/test/a/attributes.json
      - copied, changed from r1690304, devicemap/trunk/data/2.0/test/a/test_a_attributes.json
    devicemap/trunk/data/2.0/test/a/patterns.json
      - copied, changed from r1690304, devicemap/trunk/data/2.0/test/a/test_a_patterns.json
    devicemap/trunk/data/2.0/test/a/test.json
Removed:
    devicemap/trunk/data/2.0/test/a/test_a_attributes.json
    devicemap/trunk/data/2.0/test/a/test_a_patterns.json

Copied: devicemap/trunk/data/2.0/test/a/attributes.json (from r1690304, devicemap/trunk/data/2.0/test/a/test_a_attributes.json)
URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/test/a/attributes.json?p2=devicemap/trunk/data/2.0/test/a/attributes.json&p1=devicemap/trunk/data/2.0/test/a/test_a_attributes.json&r1=1690304&r2=1690325&rev=1690325&view=diff
==============================================================================
--- devicemap/trunk/data/2.0/test/a/test_a_attributes.json (original)
+++ devicemap/trunk/data/2.0/test/a/attributes.json Fri Jul 10 23:56:16 2015
@@ -1,9 +1,65 @@
 {
   "specVersion": 2.0,
   "type": "attribute",
-  "domain": "test_a",
+  "domain": "reference_a",
   "domainVersion": "1.0",
-  "description": "specification test domain a",
-  "publishDate": "",
-  "attributes": {}
+  "description": "reference domain a",
+  "publishDate": "2015-07-10T15:14:00-0400",
+  "attributes": [
+    {
+      "patternId": "unknown",
+      "attributes": {
+        "error": "true"
+      }
+    },
+    {
+      "patternId": "pattern1",
+      "attributes": {
+        "test": "1"
+      }
+    },
+    {
+      "patternId": "pattern2",
+      "attributes": {
+        "test": "2"
+      }
+    },
+    {
+      "patternId": "pattern3",
+      "attributes": {
+        "test": "3"
+      }
+    },
+    {
+      "patternId": "pattern4",
+      "attributes": {
+        "test": "4"
+      },
+      "attributeTransformers": [
+        {
+          "name": "transformed",
+          "defaultValue": "error",
+          "transformers": [
+            {
+              "type": "SplitAndGet",
+              "parameters": {
+                "delimeter": "ccc",
+                "get": 0
+              }
+            },
+            {
+              "type": "SplitAndGet",
+              "parameters": {
+                "delimeter": " ",
+                "get": -1
+              }
+            },
+            {
+              "type": "IsNumber"
+            }
+          ]
+        }
+      ]
+    }
+  ]
 }

Copied: devicemap/trunk/data/2.0/test/a/patterns.json (from r1690304, devicemap/trunk/data/2.0/test/a/test_a_patterns.json)
URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/test/a/patterns.json?p2=devicemap/trunk/data/2.0/test/a/patterns.json&p1=devicemap/trunk/data/2.0/test/a/test_a_patterns.json&r1=1690304&r2=1690325&rev=1690325&view=diff
==============================================================================
--- devicemap/trunk/data/2.0/test/a/test_a_patterns.json (original)
+++ devicemap/trunk/data/2.0/test/a/patterns.json Fri Jul 10 23:56:16 2015
@@ -1,10 +1,50 @@
 {
   "specVersion": 2.0,
   "type": "pattern",
-  "domain": "test_a",
+  "domain": "reference_a",
   "domainVersion": "1.0",
-  "description": "specification test domain a",
-  "publishDate": "",
-  "inputParser": {},
-  "patternSet": {}
+  "description": "reference domain a",
+  "publishDate": "2015-07-10T14:54:16-0400",
+  "inputParser": {
+    "transformers": [
+      {
+        "type": "LowerCase"
+      },
+      {
+        "type": "ReplaceAll",
+        "parameters": {
+          "find": "-",
+          "replaceWith": ""
+        }
+      }
+    ],
+    "tokenSeperators": [ " ", ",", ";" ],
+    "ngramConcatSize": 2
+  },
+  "patternSet": {
+    "defaultId": "unknown",
+    "simpleHashCount": 3,
+    "patterns": [
+      {
+        "patternId": "pattern1",
+        "rankType": "Strong",
+        "patternType": "Simple",
+        "patternTokens": ["bingo", "jackpot"]
+      },
+      {
+        "patternId": "pattern2",
+        "rankType": "Weak",
+        "rankValue": "100",
+        "patternType": "SimpleOrderedAnd",
+        "patternTokens": ["two", "four", "six"]
+      },
+      {
+        "patternId": "pattern3",
+        "rankType": "None",
+        "rankValue": "1000",
+        "patternType": "Simple",
+        "patternTokens": ["two", "four", "six"]
+      }
+    ]
+  }
 }

Added: devicemap/trunk/data/2.0/test/a/test.json
URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/test/a/test.json?rev=1690325&view=auto
==============================================================================
--- devicemap/trunk/data/2.0/test/a/test.json (added)
+++ devicemap/trunk/data/2.0/test/a/test.json Fri Jul 10 23:56:16 2015
@@ -0,0 +1,22 @@
+{
+  "specVersion": 2.0,
+  "type": "test",
+  "domain": "reference_a",
+  "domainVersion": "1.0",
+  "description": "reference domain a test suite",
+  "publishDate": "2015-07-10T15:14:00-0400",
+  "tests": [
+    {
+      "input": "one two three four five six seven",
+      "resultPatternId": "pattern2"
+    },
+    {
+      "input": "one two three six five four seven",
+      "resultPatternId": "pattern3"
+    },
+    {
+      "input": "one two three four five six bingo seven",
+      "resultPatternId": "pattern1"
+    }
+  ]
+}