Added: devicemap/trunk/data/2.0/reference/a/attributes.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/a/attributes.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/a/attributes.json (added) +++ devicemap/trunk/data/2.0/reference/a/attributes.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,72 @@ +{ + "specVersion": 2.0, + "type": "attribute", + "domain": "reference_a", + "domainVersion": "1.0", + "description": "reference domain a", + "publishDate": "2015-07-10T15:14:00-0400", + "attributes": [ + { + "patternId": "unknown", + "attributes": { + "error": "true" + } + }, + { + "patternId": "pattern1", + "attributes": { + "test": "1" + } + }, + { + "patternId": "pattern2", + "parentId": "parent1", + "attributes": { + "test": "2" + } + }, + { + "patternId": "parent1", + "attributes": { + "parent": "1", + "test": "4" + } + }, + { + "patternId": "pattern3", + "attributes": { + "test": "3" + } + }, + { + "patternId": "pattern4", + "attributes": { + "test": "4" + }, + "attributeTransformers": { + "transformed_attr" : { + "defaultValue": "error", + "transformers": [ + { + "type": "SplitAndGet", + "parameters": { + "delimeter": "ccc", + "get": 0 + } + }, + { + "type": "SplitAndGet", + "parameters": { + "delimeter": " ", + "get": -1 + } + }, + { + "type": "IsNumber" + } + ] + } + } + } + ] +}
Added: devicemap/trunk/data/2.0/reference/a/patterns.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/a/patterns.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/a/patterns.json (added) +++ devicemap/trunk/data/2.0/reference/a/patterns.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,63 @@ +{ + "specVersion": 2.0, + "type": "pattern", + "domain": "reference_a", + "domainVersion": "1.0", + "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": 5, + "patterns": [ + { + "patternId": "pattern1", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["bingo", "jackpot"] + }, + { + "patternId": "pattern2", + "rankType": "Weak", + "rankValue": 250, + "patternType": "SimpleOrderedAnd", + "patternTokens": ["two", "four", "six"] + }, + { + "patternId": "pattern3", + "rankType": "None", + "rankValue": 1000, + "patternType": "Simple", + "patternTokens": ["two", "four", "six"] + }, + { + "patternId": "pattern4", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["Two", "ccc"] + }, + { + "patternId": "pattern5", + "rankType": "Weak", + "rankValue": 200, + "patternType": "Simple", + "patternTokens": ["onenine"] + } + ] + } +} Added: devicemap/trunk/data/2.0/reference/a/test.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/a/test.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/a/test.json (added) +++ devicemap/trunk/data/2.0/reference/a/test.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,30 @@ +{ + "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", + "resultAttributes": { + "test": "2", + "parent": "1" + } + }, + { + "input": "one two three six five four seven", + "resultPatternId": "pattern3" + }, + { + "input": "one two three four five six ,bingo;;, seven", + "resultPatternId": "pattern1" + }, + { + "input": " three four FIVE one-NINE ,; seven", + "resultPatternId": "pattern5" + } + ] +} Added: devicemap/trunk/data/2.0/reference/b/attributes.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/b/attributes.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/b/attributes.json (added) +++ devicemap/trunk/data/2.0/reference/b/attributes.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,47 @@ +{ + "specVersion": 2.0, + "type": "attribute", + "domain": "reference_b", + "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/b/patterns.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/b/patterns.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/b/patterns.json (added) +++ devicemap/trunk/data/2.0/reference/b/patterns.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,35 @@ +{ + "specVersion": 2.0, + "type": "pattern", + "domain": "reference_b", + "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": 2, + "patterns": [ + { + "patternId": "iphone", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["iphone"] + }, + { + "patternId": "ipad", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["ipad"] + } + ] + } +} Added: devicemap/trunk/data/2.0/reference/b/test.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/b/test.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/b/test.json (added) +++ devicemap/trunk/data/2.0/reference/b/test.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,30 @@ +{ + "specVersion": 2.0, + "type": "test", + "domain": "reference_b", + "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", + "resultAttributes": { + "isPhone": "false", + "isTablet": "true" + } + }, + { + "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", + "resultAttributes": { + "isPhone": "true", + "isTablet": "false" + } + }, + { + "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" + } + ] +} Added: devicemap/trunk/data/2.0/reference/c/patterns.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/c/patterns.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/c/patterns.json (added) +++ devicemap/trunk/data/2.0/reference/c/patterns.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,186 @@ +{ + "specVersion": 2.0, + "type": "pattern", + "domain": "reference_c", + "domainVersion": "1.0", + "description": "reference domain c, transformers", + "publishDate": "2015-08-01T12:32:50-0400", + "patternSet": { + "patterns": [ + { + "patternId": "123", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["123"] + }, + { + "patternId": "123", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["123x"] + }, + { + "patternId": "233", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["233"] + }, + { + "patternId": "344", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["344"] + }, + { + "patternId": "abcd", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": [" aaa bbb ccc dddd "] + }, + { + "patternId": "y", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["yyy"] + }, + { + "patternId": "Z", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["ZZZ"] + }, + { + "patternId": "111", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["x111x"] + } + ] + }, + "attributes": [ + { + "patternId": "123", + "attributes": { + "123": "true" + }, + "attributeTransformers": { + "isNumber" : { + "defaultValue": "false", + "transformers": [ + { + "type": "IsNumber" + } + ] + } + } + }, + { + "patternId": "Z", + "attributes": { + "Z": "true", + "z": "false" + }, + "attributeTransformers": { + "case" : { + "transformers": [ + { + "type": "LowerCase" + } + ] + } + } + }, + { + "patternId": "y", + "attributes": { + "y": "true" + }, + "attributeTransformers": { + "case" : { + "transformers": [ + { + "type": "UpperCase" + } + ] + } + } + }, + { + "patternId": "344", + "attributes": { + "344": "true" + }, + "attributeTransformers": { + "replaced" : { + "transformers": [ + { + "type": "ReplaceAll", + "parameters": { + "find": "4", + "replaceWith": "3" + } + } + ] + } + } + }, + { + "patternId": "233", + "attributes": { + "233": "true" + }, + "attributeTransformers": { + "replaced" : { + "transformers": [ + { + "type": "ReplaceFirst", + "parameters": { + "find": "3", + "replaceWith": "2" + } + } + ] + } + } + }, + { + "patternId": "abcd", + "attributeTransformers": { + "split" : { + "transformers": [ + { + "type": "SplitAndGet", + "parameters": { + "delimeter": " ", + "get": 2 + } + } + ] + } + } + }, + { + "patternId": "111", + "attributes": { + "111": "true" + }, + "attributeTransformers": { + "isNumber" : { + "defaultValue": "false", + "transformers": [ + { + "type": "Substring", + "parameters": { + "start": 1, + "maxLength": 3 + } + }, + { + "type": "IsNumber" + } + ] + } + } + } + ] +} Added: devicemap/trunk/data/2.0/reference/c/test.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/c/test.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/c/test.json (added) +++ devicemap/trunk/data/2.0/reference/c/test.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,78 @@ +{ + "specVersion": 2.0, + "type": "test", + "domain": "reference_c", + "domainVersion": "1.0", + "description": "reference domain c test suite", + "publishDate": "2015-08-01T12:32:50-0400", + "tests": [ + { + "input": "test", + "resultPatternId": null + }, + { + "input": "123", + "resultPatternId": "123", + "resultAttributes": { + "123": "true", + "isNumber": "123" + } + }, + { + "input": "123x", + "resultPatternId": "123", + "resultAttributes": { + "123": "true", + "isNumber": "false" + } + }, + { + "input": "344", + "resultPatternId": "344", + "resultAttributes": { + "344": "true", + "replaced": "333" + } + }, + { + "input": " aaa bbb ccc dddd ", + "resultPatternId": "abcd", + "resultAttributes": { + "split": "ccc" + } + }, + { + "input": "ZZZ", + "resultPatternId": "Z", + "resultAttributes": { + "z": "false", + "Z": "true", + "case": "zzz" + } + }, + { + "input": "yyy", + "resultPatternId": "y", + "resultAttributes": { + "y": "true", + "case": "YYY" + } + }, + { + "input": "233", + "resultPatternId": "233", + "resultAttributes": { + "233": "true", + "replaced": "223" + } + }, + { + "input": "x111x", + "resultPatternId": "111", + "resultAttributes": { + "111": "true", + "isNumber": "111" + } + } + ] +} Added: devicemap/trunk/data/2.0/reference/d/patterns.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/d/patterns.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/d/patterns.json (added) +++ devicemap/trunk/data/2.0/reference/d/patterns.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,97 @@ +{ + "specVersion": 2.0, + "type": "pattern", + "domain": "reference_d", + "domainVersion": "1.0", + "description": "reference domain d, ranking", + "publishDate": "2015-08-01T15:18:43-0400", + "inputParser": { + "tokenSeperators": [" "] + }, + "patternSet": { + "patterns": [ + { + "patternId": "a", + "rankType": "Weak", + "patternType": "Simple", + "patternTokens": ["aaa"] + }, + { + "patternId": "b", + "rankType": "Weak", + "patternType": "Simple", + "patternTokens": ["bbb"] + }, + { + "patternId": "c", + "rankType": "Weak", + "patternType": "Simple", + "patternTokens": ["cccc"] + }, + { + "patternId": "de", + "rankType": "Weak", + "patternType": "SimpleAnd", + "patternTokens": ["ddd", "eee"] + }, + { + "patternId": "1", + "rankType": "None", + "rankValue": -100, + "patternType": "Simple", + "patternTokens": ["1"] + }, + { + "patternId": "2", + "rankType": "None", + "patternType": "Simple", + "patternTokens": ["2"] + }, + { + "patternId": "3", + "rankType": "None", + "rankValue": 100, + "patternType": "Simple", + "patternTokens": ["3"] + }, + { + "patternId": "4", + "rankType": "Weak", + "rankValue": -100, + "patternType": "Simple", + "patternTokens": ["4"] + }, + { + "patternId": "5", + "rankType": "Weak", + "patternType": "Simple", + "patternTokens": ["5"] + }, + { + "patternId": "6", + "rankType": "Weak", + "rankValue": 100, + "patternType": "Simple", + "patternTokens": ["6"] + }, + { + "patternId": "7", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["7"] + }, + { + "patternId": "zz", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["zz"] + }, + { + "patternId": "yz", + "rankType": "Strong", + "patternType": "SimpleAnd", + "patternTokens": ["yy", "zz"] + } + ] + } +} Added: devicemap/trunk/data/2.0/reference/d/test.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/d/test.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/d/test.json (added) +++ devicemap/trunk/data/2.0/reference/d/test.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,62 @@ +{ + "specVersion": 2.0, + "type": "test", + "domain": "reference_d", + "domainVersion": "1.0", + "description": "reference domain d test suite", + "publishDate": "2015-08-01T15:18:43-0400", + "tests": [ + { + "input": "test aaa bbb done", + "resultPatternId": "a" + }, + { + "input": "test bbb aaa done", + "resultPatternId": "b" + }, + { + "input": "test bbb aaa cccc done", + "resultPatternId": "c" + }, + { + "input": "test bbb aaa eee cccc ddd done", + "resultPatternId": "de" + }, + { + "input": "1", + "resultPatternId": "1" + }, + { + "input": "1 2", + "resultPatternId": "2" + }, + { + "input": "1 2 3", + "resultPatternId": "3" + }, + { + "input": "1 2 3 4", + "resultPatternId": "4" + }, + { + "input": "1 2 3 4 5", + "resultPatternId": "5" + }, + { + "input": "1 2 3 4 5 6", + "resultPatternId": "6" + }, + { + "input": "1 2 3 4 5 6 7", + "resultPatternId": "7" + }, + { + "input": "zz", + "resultPatternId": "zz" + }, + { + "input": "yy zz", + "resultPatternId": "yz" + } + ] +} Added: devicemap/trunk/data/2.0/reference/e/attributes_1.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/e/attributes_1.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/e/attributes_1.json (added) +++ devicemap/trunk/data/2.0/reference/e/attributes_1.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,30 @@ +{ + "specVersion": 2.0, + "type": "attribute", + "domain": "reference_e", + "domainVersion": "1.0", + "description": "reference domain a, patch files", + "publishDate": "2015-08-01T17:41:44-0400", + "attributes": [ + { + "patternId": "p1", + "parentId": "root", + "attributes": { + "test": "1" + } + }, + { + "patternId": "p2", + "parentId": "root", + "attributes": { + "test": "2" + } + }, + { + "patternId": "root", + "attributes": { + "root": "true" + } + } + ] +} Added: devicemap/trunk/data/2.0/reference/e/attributes_2_patch.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/e/attributes_2_patch.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/e/attributes_2_patch.json (added) +++ devicemap/trunk/data/2.0/reference/e/attributes_2_patch.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,37 @@ +{ + "specVersion": 2.0, + "type": "attributePatch", + "domain": "reference_e", + "domainVersion": "1.0", + "description": "reference domain a, patch files", + "publishDate": "2015-08-01T17:41:44-0400", + "attributes": [ + { + "patternId": "p2", + "parentId": "root", + "attributes": { + "test": "22" + } + }, + { + "patternId": "p3", + "parentId": "root", + "attributes": { + "test": "3" + } + }, + { + "patternId": "proot", + "attributes": { + "proot": "true" + } + }, + { + "patternId": "root", + "parentId": "proot", + "attributes": { + "root": "false" + } + } + ] +} Added: devicemap/trunk/data/2.0/reference/e/patterns_1.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/e/patterns_1.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/e/patterns_1.json (added) +++ devicemap/trunk/data/2.0/reference/e/patterns_1.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,35 @@ +{ + "specVersion": 2.0, + "type": "pattern", + "domain": "reference_e", + "domainVersion": "1.0", + "description": "reference domain a, patch files", + "publishDate": "2015-08-01T17:41:44-0400", + "inputParser": { + "tokenSeperators": [ " ", ",", ";" ], + "ngramConcatSize": 2 + }, + "patternSet": { + "simpleHashCount": 3, + "patterns": [ + { + "patternId": "p1", + "rankType": "Weak", + "patternType": "Simple", + "patternTokens": ["one"] + }, + { + "patternId": "p2", + "rankType": "Weak", + "patternType": "Simple", + "patternTokens": ["two"] + }, + { + "patternId": "error", + "rankType": "Strong", + "patternType": "Simple", + "patternTokens": ["thisis"] + } + ] + } +} Added: devicemap/trunk/data/2.0/reference/e/patterns_2_patch.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/e/patterns_2_patch.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/e/patterns_2_patch.json (added) +++ devicemap/trunk/data/2.0/reference/e/patterns_2_patch.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,27 @@ +{ + "specVersion": 2.0, + "type": "patternPatch", + "domain": "reference_e", + "domainVersion": "1.0", + "description": "reference domain a, patch files", + "publishDate": "2015-08-01T17:41:44-0400", + "inputParser": { + "transformers": [ + { + "type": "LowerCase" + } + ], + "ngramConcatSize": 1 + }, + "patternSet": { + "simpleHashCount": 1, + "patterns": [ + { + "patternId": "p3", + "rankType": "Weak", + "patternType": "Simple", + "patternTokens": ["three"] + } + ] + } +} Added: devicemap/trunk/data/2.0/reference/e/test.json URL: http://svn.apache.org/viewvc/devicemap/trunk/data/2.0/reference/e/test.json?rev=1695066&view=auto ============================================================================== --- devicemap/trunk/data/2.0/reference/e/test.json (added) +++ devicemap/trunk/data/2.0/reference/e/test.json Mon Aug 10 13:28:57 2015 @@ -0,0 +1,37 @@ +{ + "specVersion": 2.0, + "type": "test", + "domain": "reference_e", + "domainVersion": "1.0", + "description": "reference domain e test suite", + "publishDate": "2015-08-01T17:41:44-0400", + "tests": [ + { + "input": "This Is One Here", + "resultPatternId": "p1", + "resultAttributes": { + "test": "1", + "proot": "true", + "root": "false" + } + }, + { + "input": "This Is Two Here", + "resultPatternId": "p2", + "resultAttributes": { + "test": "22", + "proot": "true", + "root": "false" + } + }, + { + "input": "This Is Three Here", + "resultPatternId": "p3", + "resultAttributes": { + "test": "3", + "proot": "true", + "root": "false" + } + } + ] +}
