Author: rezan
Date: Sat Aug 1 18:29:08 2015
New Revision: 1693750
URL: http://svn.apache.org/r1693750
Log:
new test domain and cleanups
Added:
devicemap/trunk/data/2.0/reference/c/
devicemap/trunk/data/2.0/reference/c/patterns.json
devicemap/trunk/data/2.0/reference/c/test.json
Modified:
devicemap/trunk/data/2.0/reference/a/test.json
devicemap/trunk/data/2.0/reference/b/attributes.json
devicemap/trunk/data/2.0/reference/b/patterns.json
devicemap/trunk/data/2.0/reference/b/test.json
Modified: 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=1693750&r1=1693749&r2=1693750&view=diff
==============================================================================
--- devicemap/trunk/data/2.0/reference/a/test.json (original)
+++ devicemap/trunk/data/2.0/reference/a/test.json Sat Aug 1 18:29:08 2015
@@ -19,11 +19,11 @@
"resultPatternId": "pattern3"
},
{
- "input": "one two three four five six bingo seven",
+ "input": "one two three four five six ,bingo;;, seven",
"resultPatternId": "pattern1"
},
{
- "input": "three four FIVE one-NINE seven",
+ "input": " three four FIVE one-NINE ,; seven",
"resultPatternId": "pattern5"
}
]
Modified: 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=1693750&r1=1693749&r2=1693750&view=diff
==============================================================================
--- devicemap/trunk/data/2.0/reference/b/attributes.json (original)
+++ devicemap/trunk/data/2.0/reference/b/attributes.json Sat Aug 1 18:29:08
2015
@@ -1,7 +1,7 @@
{
"specVersion": 2.0,
"type": "attribute",
- "domain": "reference_device",
+ "domain": "reference_b",
"domainVersion": "1.0",
"description": "reference domain for devices, example only",
"publishDate": "2015-07-20T18:59:33+0000",
Modified: 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=1693750&r1=1693749&r2=1693750&view=diff
==============================================================================
--- devicemap/trunk/data/2.0/reference/b/patterns.json (original)
+++ devicemap/trunk/data/2.0/reference/b/patterns.json Sat Aug 1 18:29:08 2015
@@ -1,7 +1,7 @@
{
"specVersion": 2.0,
"type": "pattern",
- "domain": "reference_device",
+ "domain": "reference_b",
"domainVersion": "1.0",
"description": "reference domain for devices, example only",
"publishDate": "2015-07-20T18:52:57+0000",
Modified: 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=1693750&r1=1693749&r2=1693750&view=diff
==============================================================================
--- devicemap/trunk/data/2.0/reference/b/test.json (original)
+++ devicemap/trunk/data/2.0/reference/b/test.json Sat Aug 1 18:29:08 2015
@@ -1,7 +1,7 @@
{
"specVersion": 2.0,
"type": "test",
- "domain": "reference_device",
+ "domain": "reference_b",
"domainVersion": "1.0",
"description": "reference domain tests for devices, example only",
"publishDate": "2015-07-20T19:11:59+0000",
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=1693750&view=auto
==============================================================================
--- devicemap/trunk/data/2.0/reference/c/patterns.json (added)
+++ devicemap/trunk/data/2.0/reference/c/patterns.json Sat Aug 1 18:29:08 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=1693750&view=auto
==============================================================================
--- devicemap/trunk/data/2.0/reference/c/test.json (added)
+++ devicemap/trunk/data/2.0/reference/c/test.json Sat Aug 1 18:29:08 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"
+ }
+ }
+ ]
+}