dataMetaPii 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +1 -0
- data/History.md +10 -0
- data/PostInstall.txt +2 -0
- data/README.md +77 -0
- data/Rakefile +13 -0
- data/bin/dmPiiGenCode.rb +65 -0
- data/grammar/appLink.treetop +214 -0
- data/grammar/piiCommons.treetop +46 -0
- data/grammar/registry.treetop +66 -0
- data/lib/dataMetaPii.rb +577 -0
- data/test/appLinkFull.dmPii +71 -0
- data/test/appLinkNoReusables.dmPii +35 -0
- data/test/appLinkShowcase.dmPii +73 -0
- data/test/registryShowcase.dmPii +28 -0
- data/test/test_dataMetaPii.rb +42 -0
- data/test/test_grammars.rb +152 -0
- data/test/test_helper.rb +24 -0
- data/tpl/java/master.erb +64 -0
- data/tpl/json/master.erb +7 -0
- data/tpl/python/master.erb +25 -0
- data/tpl/scala/master.erb +31 -0
- metadata +106 -0
data/tpl/json/master.erb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
<% flds = reg.keyVos.keys.sort; flds.each_with_index { |kf, fix| fldName = kf.to_s.inspect; fldDef = reg.keyVos[kf] %>
|
3
|
+
<%= fldName %>: {<% attrs = fldDef.attrs.keys.sort; attrs.each_with_index {|ka, aix| keyStr = ka.to_s.inspect; valStr = fldDef.attrs[ka].inspect %>
|
4
|
+
<%=keyStr%>: <%= valStr %><%=aix == attrs.size - 1 ? '' : ','%><%}%>
|
5
|
+
}<%=fix == flds.size - 1 ? '' : ','%>
|
6
|
+
<% } %>
|
7
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# *************** This file is generated by DataMeta; do not edit manually!!
|
3
|
+
|
4
|
+
# noinspection PyCompatibility
|
5
|
+
from enum import Enum
|
6
|
+
|
7
|
+
class <%= className %>:
|
8
|
+
|
9
|
+
Version = "<%= reg.ver %>"
|
10
|
+
|
11
|
+
Level = Enum("Level", "<%= ALL_IMPACTS.map{|i| i.to_s.upcase}.join(' ') %>")
|
12
|
+
|
13
|
+
class Def:
|
14
|
+
def __init__(self, key, level, props):
|
15
|
+
self.__key = key
|
16
|
+
self.__level = level
|
17
|
+
self.__props = props
|
18
|
+
|
19
|
+
Defs = { <% flds = reg.keyVos.keys.sort; flds.each_with_index { |kf, fix| fldName = kf.to_s.inspect; fldDef = reg.keyVos[kf] %>
|
20
|
+
<%= fldName %>: Def(<%= fldName %>, Level.<%= fldDef.level.to_s.upcase %>, {<% attrs = fldDef.attrs.keys.reject{|ka| ka == 'level'}.sort; attrs.each_with_index {|ka, aix| keyStr = ka.to_s.inspect; valStr = fldDef.attrs[ka].inspect %>
|
21
|
+
<%=keyStr%>: <%=valStr%><%=aix == attrs.size - 1 ? '' : ','%><%}%>
|
22
|
+
})<%=fix == flds.size - 1 ? '' : ','%>
|
23
|
+
<% } %>
|
24
|
+
}
|
25
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
package <%= namespace %>
|
2
|
+
|
3
|
+
/*
|
4
|
+
**************** This file is generated by DataMeta; do not edit manually!!
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* The encapsulation of the version <%= reg.ver %> the Abstract PII definition.
|
9
|
+
*/
|
10
|
+
object <%= className %> {
|
11
|
+
|
12
|
+
<% reg.keyVos.keys.sort.each { |k| fldName = k.to_s.inspect; %>
|
13
|
+
val <%= k.to_s %> = <%=fldName%>
|
14
|
+
<%}%>
|
15
|
+
|
16
|
+
/**
|
17
|
+
* Impact Levels:
|
18
|
+
*/
|
19
|
+
object Level extends Enumeration {
|
20
|
+
<%= codeIndent * 2 %>val <%= ALL_IMPACTS.map{|i| i.to_s.upcase}.join(', ') %> = Value
|
21
|
+
}
|
22
|
+
|
23
|
+
case class Def(key: String, level: Level.Value, props: Map[String, String])
|
24
|
+
|
25
|
+
val Defs = Map(
|
26
|
+
<% flds = reg.keyVos.keys.sort; flds.each_with_index { |kf, fix| fldName = kf.to_s; fldDef = reg.keyVos[kf] %>
|
27
|
+
<%= fldName %> -> Def(<%=fldName%>, Level.<%= fldDef.level.to_s.upcase %>, Map(<% attrs = fldDef.attrs.keys.reject{|ka| ka == 'level'}.sort; attrs.each_with_index {|ka, aix| keyStr = ka.to_s.inspect; valStr = fldDef.attrs[ka].inspect %>
|
28
|
+
<%=keyStr%> -> <%=valStr%><%=aix == attrs.size - 1 ? '' : ','%><%}%>))<%=fix == flds.size - 1 ? '' : ','%>
|
29
|
+
<% } %>
|
30
|
+
)
|
31
|
+
}
|
metadata
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dataMetaPii
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michael Bergens
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-01-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: dataMetaParse
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.0.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.0'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.0.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: dataMetaDom
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 1.0.0
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 1.0.0
|
53
|
+
description: 'Pii support for DataMeta: DML parsing and such'
|
54
|
+
email: michael.bergens@gmail.com
|
55
|
+
executables:
|
56
|
+
- dmPiiGenCode.rb
|
57
|
+
extensions: []
|
58
|
+
extra_rdoc_files: []
|
59
|
+
files:
|
60
|
+
- ".yardopts"
|
61
|
+
- History.md
|
62
|
+
- PostInstall.txt
|
63
|
+
- README.md
|
64
|
+
- Rakefile
|
65
|
+
- bin/dmPiiGenCode.rb
|
66
|
+
- grammar/appLink.treetop
|
67
|
+
- grammar/piiCommons.treetop
|
68
|
+
- grammar/registry.treetop
|
69
|
+
- lib/dataMetaPii.rb
|
70
|
+
- test/appLinkFull.dmPii
|
71
|
+
- test/appLinkNoReusables.dmPii
|
72
|
+
- test/appLinkShowcase.dmPii
|
73
|
+
- test/registryShowcase.dmPii
|
74
|
+
- test/test_dataMetaPii.rb
|
75
|
+
- test/test_grammars.rb
|
76
|
+
- test/test_helper.rb
|
77
|
+
- tpl/java/master.erb
|
78
|
+
- tpl/json/master.erb
|
79
|
+
- tpl/python/master.erb
|
80
|
+
- tpl/scala/master.erb
|
81
|
+
homepage: https://github.com/eBayDataMeta
|
82
|
+
licenses:
|
83
|
+
- Apache-2.0
|
84
|
+
metadata: {}
|
85
|
+
post_install_message:
|
86
|
+
rdoc_options: []
|
87
|
+
require_paths:
|
88
|
+
- lib
|
89
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 2.0.0
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
requirements:
|
100
|
+
- No special requirements
|
101
|
+
rubyforge_project:
|
102
|
+
rubygems_version: 2.5.1
|
103
|
+
signing_key:
|
104
|
+
specification_version: 4
|
105
|
+
summary: Pii support for DataMeta
|
106
|
+
test_files: []
|