xamplr 1.2.0 → 1.3.15
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +12 -0
- data/CHANGES.txt +37 -0
- data/COPYING +661 -0
- data/Makefile +13 -0
- data/README.rdoc +24 -4
- data/Rakefile +2 -2
- data/VERSION.yml +3 -2
- data/bin/xampl-gen +17 -0
- data/docs/intro/.gitignore +1 -0
- data/docs/intro/example1/example1.rb +6 -0
- data/docs/intro/example1/xml/hello.xml +1 -0
- data/docs/intro/example2/example2.rb +38 -0
- data/docs/intro/example2/project-generator.rb +22 -0
- data/docs/intro/example2/xml/hello.xml +2 -0
- data/docs/intro/example3/example3.rb +30 -0
- data/docs/intro/example3/example3a.rb +16 -0
- data/docs/intro/example3/generated.png +0 -0
- data/docs/intro/example3/grab-yuml.rb +10 -0
- data/docs/intro/example3/greeter.rb +15 -0
- data/docs/intro/example3/greeting.rb +9 -0
- data/docs/intro/example3/project-generator.rb +25 -0
- data/docs/intro/example3/xml/greeter.xml +6 -0
- data/docs/intro/example4/example4.rb +27 -0
- data/docs/intro/example4/example4a.rb +19 -0
- data/docs/intro/example4/grab-yuml.rb +10 -0
- data/docs/intro/example4/greeter.rb +15 -0
- data/docs/intro/example4/greeting.rb +9 -0
- data/docs/intro/example4/project-generator.rb +25 -0
- data/docs/intro/example4/xml/greeter.xml +6 -0
- data/docs/intro/grab-yuml.rb +10 -0
- data/docs/intro/project-generator.rb +51 -0
- data/docs/intro/xampl.lyx +1494 -0
- data/docs/intro/xampl.pdf +0 -0
- data/examples/employees/final/xampl-gen.rb +38 -0
- data/examples/employees/final/xml/ddd-final.xml +86 -0
- data/examples/employees/final-xampl/xampl-gen.rb +38 -0
- data/examples/employees/final-xampl/xml/ddd-final-xampl.xml +86 -0
- data/examples/employees/first/xampl-gen.rb +38 -0
- data/examples/employees/first/xml/ddd-first.xml +48 -0
- data/examples/employees/twist/twist.graphml +333 -0
- data/examples/employees/twist/xampl-gen.rb +38 -0
- data/examples/employees/twist/xml/twist.xml +90 -0
- data/examples/employees/xamplr-twist.xml +2 -0
- data/examples/employees/yuml-diagrams/DDD-final-approach.graphml +393 -0
- data/examples/employees/yuml-diagrams/DDD-final-xampl-approach.graphml +265 -0
- data/examples/employees/yuml-diagrams/DDD-ideal-final-approach.graphml +357 -0
- data/examples/employees/yuml-diagrams/ddd-final.png +0 -0
- data/examples/employees/yuml-diagrams/ddd-final.yuml +8 -0
- data/examples/employees/yuml-diagrams/ddd-first.png +0 -0
- data/examples/employees/yuml-diagrams/ddd-first.yuml +7 -0
- data/examples/employees/yuml-diagrams/final-yed.png +0 -0
- data/examples/employees/yuml-diagrams/first-yed.png +0 -0
- data/examples/employees/yuml-diagrams/twist.png +0 -0
- data/examples/employees/yuml-diagrams/twist.yuml +12 -0
- data/examples/employees/yuml-diagrams/xamplr-final-no-mixins.png +0 -0
- data/examples/employees/yuml-diagrams/xamplr-final-simplified.png +0 -0
- data/examples/employees/yuml-diagrams/xamplr-final-with-mixins.png +0 -0
- data/examples/employees/yuml-diagrams/yuml-simplified.txt +19 -0
- data/examples/employees/yuml-diagrams/yuml-with-mixins.txt +53 -0
- data/examples/employees/yuml-diagrams/yuml.txt +27 -0
- data/examples/hobbies/Makefile +5 -0
- data/examples/hobbies/hobbies.rb +193 -0
- data/examples/hobbies/project-generator.rb +25 -0
- data/examples/hobbies/xampl-gen.rb +38 -0
- data/examples/hobbies/xml/hobby.xml +3 -0
- data/examples/hobbies/xml/people.xml +5 -0
- data/examples/random-people/.gitignore +2 -0
- data/examples/random-people/Makefile +5 -1
- data/examples/random-people/xampl-gen.rb +5 -2
- data/examples/random-people-shared-addresses/.gitignore +2 -0
- data/examples/random-people-shared-addresses/Makefile +8 -9
- data/examples/random-people-shared-addresses/batch-load-users-profiled.rb +91 -0
- data/examples/random-people-shared-addresses/batch-load-users-safe.rb +81 -0
- data/examples/random-people-shared-addresses/batch-load-users.rb +59 -63
- data/examples/random-people-shared-addresses/xampl-gen.rb +2 -0
- data/examples/read-testing/.gitignore +2 -0
- data/examples/read-testing/rrr.rb +2 -1
- data/examples/read-testing/xampl-gen.rb +2 -0
- data/examples/tokyo-cabinet-experimental/.gitignore +2 -0
- data/examples/tokyo-cabinet-experimental/xampl-gen.rb +2 -0
- data/examples/write-testing/README +4 -0
- data/examples/write-testing/RESULTS.home +33 -0
- data/examples/write-testing/RESULTS.raconteur +33 -0
- data/examples/write-testing/write-speed-test.rb +40 -0
- data/lib/xamplr/.cvsignore +1 -0
- data/lib/xamplr/TODO +2 -1
- data/lib/xamplr/exceptions.rb +24 -1
- data/lib/xamplr/from-xml.rb +13 -5
- data/lib/xamplr/graphml-out.rb +6 -25
- data/lib/xamplr/indexed-array.rb +10 -2
- data/lib/xamplr/persist-to-xml.rb +6 -7
- data/lib/xamplr/persistence.rb +132 -48
- data/lib/xamplr/persister.rb +48 -25
- data/lib/xamplr/persisters/filesystem.rb +8 -2
- data/lib/xamplr/persisters/tokyo-cabinet.rb +243 -63
- data/lib/xamplr/persisters/tokyo-cabinet.rb.1-DB +694 -0
- data/lib/xamplr/persisters/tokyo-cabinet.rb.N-DB +692 -0
- data/lib/xamplr/persisters/tokyo-cabinet.rb.NICE-TRY +807 -0
- data/lib/xamplr/templates/.cvsignore +3 -0
- data/lib/xamplr/templates/child_indexed.template +6 -6
- data/lib/xamplr/templates/element_data.template +2 -1
- data/lib/xamplr/templates/element_empty.template +2 -10
- data/lib/xamplr/templates/element_mixed.template +2 -1
- data/lib/xamplr/templates/element_simple.template +2 -1
- data/lib/xamplr/templates/package.template +13 -1
- data/lib/xamplr/visitor.rb +7 -6
- data/lib/xamplr/visitors.rb +2 -1
- data/lib/xamplr/xampl-cl-gen.rb +89 -0
- data/lib/xamplr/xampl-generator.rb +86 -50
- data/lib/xamplr/xampl-object.rb +51 -0
- data/lib/xamplr/xampl-persisted-object.rb +13 -4
- data/lib/xamplr/yuml-out.rb +129 -0
- data/lib/xamplr-generator.rb +0 -1
- data/lib/xamplr.rb +18 -18
- data/regression/tc-indexes-crossing-pid-boundaries/Makefile +14 -0
- data/regression/tc-indexes-crossing-pid-boundaries/bad-idea.rb +40 -0
- data/regression/tc-indexes-crossing-pid-boundaries/fail-badly.rb +17 -0
- data/regression/tc-indexes-crossing-pid-boundaries/fail.rb +11 -0
- data/regression/tc-indexes-crossing-pid-boundaries/fucking-bad-idea.rb +44 -0
- data/regression/tc-indexes-crossing-pid-boundaries/setup.rb +15 -0
- data/regression/tc-indexes-crossing-pid-boundaries/xml/bad-idea.xml +4 -0
- data/regression/tightly-nested-mutual-mentions/Makefile +14 -0
- data/regression/tightly-nested-mutual-mentions/build.rb +31 -0
- data/regression/tightly-nested-mutual-mentions/load.rb +21 -0
- data/regression/tightly-nested-mutual-mentions/repo-keep.tgz +0 -0
- data/regression/tightly-nested-mutual-mentions/setup.rb +8 -0
- data/regression/tightly-nested-mutual-mentions/xampl-gen.rb +36 -0
- data/regression/tightly-nested-mutual-mentions/xml/stuff.xml +7 -0
- data/xamplr.gemspec +322 -0
- metadata +116 -13
- data/test/test_helper.rb +0 -10
- data/test/xamplr_test.rb +0 -7
@@ -0,0 +1,333 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<graphml xmlns="http://graphml.graphdrawing.org/xmlns/graphml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd">
|
3
|
+
<key for="node" id="d0" yfiles.type="nodegraphics"/>
|
4
|
+
<key attr.name="description" attr.type="string" for="node" id="d1"/>
|
5
|
+
<key for="edge" id="d2" yfiles.type="edgegraphics"/>
|
6
|
+
<key attr.name="description" attr.type="string" for="edge" id="d3"/>
|
7
|
+
<key for="graphml" id="d4" yfiles.type="resources"/>
|
8
|
+
<graph edgedefault="directed" id="G" parse.edges="12" parse.nodes="11" parse.order="free">
|
9
|
+
<node id="n0">
|
10
|
+
<data key="d0">
|
11
|
+
<y:UMLClassNode>
|
12
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="260.27392578125" y="502.689453125"/>
|
13
|
+
<y:Fill color="#99CCFF" transparent="false"/>
|
14
|
+
<y:BorderStyle color="#000000" type="line" width="2.0"/>
|
15
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="172.7080078125" x="28.3720703125" y="26.1328125">Employees::HourlyPayroll
|
16
|
+
</y:NodeLabel>
|
17
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="data" use3DEffect="false">
|
18
|
+
<y:AttributeLabel></y:AttributeLabel>
|
19
|
+
<y:MethodLabel></y:MethodLabel>
|
20
|
+
</y:UML>
|
21
|
+
</y:UMLClassNode>
|
22
|
+
</data>
|
23
|
+
<data key="d1">UMLClass</data>
|
24
|
+
</node>
|
25
|
+
<node id="n1">
|
26
|
+
<data key="d0">
|
27
|
+
<y:UMLClassNode>
|
28
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="-14.72607421875" y="502.689453125"/>
|
29
|
+
<y:Fill color="#CCFFCC" transparent="false"/>
|
30
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
31
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="131.3974609375" x="49.02734375" y="26.1328125">Employees::Payrole
|
32
|
+
</y:NodeLabel>
|
33
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="empty" use3DEffect="false">
|
34
|
+
<y:AttributeLabel></y:AttributeLabel>
|
35
|
+
<y:MethodLabel></y:MethodLabel>
|
36
|
+
</y:UML>
|
37
|
+
</y:UMLClassNode>
|
38
|
+
</data>
|
39
|
+
<data key="d1">UMLClass</data>
|
40
|
+
</node>
|
41
|
+
<node id="n2">
|
42
|
+
<data key="d0">
|
43
|
+
<y:UMLClassNode>
|
44
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="260.27392578125" y="227.689453125"/>
|
45
|
+
<y:Fill color="#FFCC99" transparent="false"/>
|
46
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
47
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="131.3974609375" x="49.02734375" y="26.1328125">Employees::Payrole
|
48
|
+
</y:NodeLabel>
|
49
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="mixin" use3DEffect="false">
|
50
|
+
<y:AttributeLabel></y:AttributeLabel>
|
51
|
+
<y:MethodLabel></y:MethodLabel>
|
52
|
+
</y:UML>
|
53
|
+
</y:UMLClassNode>
|
54
|
+
</data>
|
55
|
+
<data key="d1">UMLClass</data>
|
56
|
+
</node>
|
57
|
+
<node id="n3">
|
58
|
+
<data key="d0">
|
59
|
+
<y:UMLClassNode>
|
60
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="-14.72607421875" y="227.689453125"/>
|
61
|
+
<y:Fill color="#99CCFF" transparent="false"/>
|
62
|
+
<y:BorderStyle color="#000000" type="line" width="2.0"/>
|
63
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="181.3154296875" x="24.068359375" y="26.1328125">Employees::SalariedPayroll
|
64
|
+
</y:NodeLabel>
|
65
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="data" use3DEffect="false">
|
66
|
+
<y:AttributeLabel></y:AttributeLabel>
|
67
|
+
<y:MethodLabel></y:MethodLabel>
|
68
|
+
</y:UML>
|
69
|
+
</y:UMLClassNode>
|
70
|
+
</data>
|
71
|
+
<data key="d1">UMLClass</data>
|
72
|
+
</node>
|
73
|
+
<node id="n4">
|
74
|
+
<data key="d0">
|
75
|
+
<y:UMLClassNode>
|
76
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="1085.27392578125" y="227.689453125"/>
|
77
|
+
<y:Fill color="#99CCFF" transparent="false"/>
|
78
|
+
<y:BorderStyle color="#000000" type="line" width="2.0"/>
|
79
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="219.4521484375" x="5.0" y="26.1328125">Employees::DefinedContribution
|
80
|
+
</y:NodeLabel>
|
81
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="data" use3DEffect="false">
|
82
|
+
<y:AttributeLabel></y:AttributeLabel>
|
83
|
+
<y:MethodLabel></y:MethodLabel>
|
84
|
+
</y:UML>
|
85
|
+
</y:UMLClassNode>
|
86
|
+
</data>
|
87
|
+
<data key="d1">UMLClass</data>
|
88
|
+
</node>
|
89
|
+
<node id="n5">
|
90
|
+
<data key="d0">
|
91
|
+
<y:UMLClassNode>
|
92
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="1085.27392578125" y="502.689453125"/>
|
93
|
+
<y:Fill color="#CCFFCC" transparent="false"/>
|
94
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
95
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="184.16552734375" x="22.643310546875" y="26.1328125">Employees::RetirementPlan
|
96
|
+
</y:NodeLabel>
|
97
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="empty" use3DEffect="false">
|
98
|
+
<y:AttributeLabel></y:AttributeLabel>
|
99
|
+
<y:MethodLabel></y:MethodLabel>
|
100
|
+
</y:UML>
|
101
|
+
</y:UMLClassNode>
|
102
|
+
</data>
|
103
|
+
<data key="d1">UMLClass</data>
|
104
|
+
</node>
|
105
|
+
<node id="n6">
|
106
|
+
<data key="d0">
|
107
|
+
<y:UMLClassNode>
|
108
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="810.27392578125" y="227.689453125"/>
|
109
|
+
<y:Fill color="#FFCC99" transparent="false"/>
|
110
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
111
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="184.16552734375" x="22.643310546875" y="26.1328125">Employees::RetirementPlan
|
112
|
+
</y:NodeLabel>
|
113
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="mixin" use3DEffect="false">
|
114
|
+
<y:AttributeLabel></y:AttributeLabel>
|
115
|
+
<y:MethodLabel></y:MethodLabel>
|
116
|
+
</y:UML>
|
117
|
+
</y:UMLClassNode>
|
118
|
+
</data>
|
119
|
+
<data key="d1">UMLClass</data>
|
120
|
+
</node>
|
121
|
+
<node id="n7">
|
122
|
+
<data key="d0">
|
123
|
+
<y:UMLClassNode>
|
124
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="810.27392578125" y="502.689453125"/>
|
125
|
+
<y:Fill color="#99CCFF" transparent="false"/>
|
126
|
+
<y:BorderStyle color="#000000" type="line" width="2.0"/>
|
127
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="181.302734375" x="24.07470703125" y="26.1328125">Employees::DefinedBenefit
|
128
|
+
</y:NodeLabel>
|
129
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="data" use3DEffect="false">
|
130
|
+
<y:AttributeLabel></y:AttributeLabel>
|
131
|
+
<y:MethodLabel></y:MethodLabel>
|
132
|
+
</y:UML>
|
133
|
+
</y:UMLClassNode>
|
134
|
+
</data>
|
135
|
+
<data key="d1">UMLClass</data>
|
136
|
+
</node>
|
137
|
+
<node id="n8">
|
138
|
+
<data key="d0">
|
139
|
+
<y:UMLClassNode>
|
140
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="535.27392578125" y="227.689453125"/>
|
141
|
+
<y:Fill color="#99CCFF" transparent="false"/>
|
142
|
+
<y:BorderStyle color="#000000" type="line" width="2.0"/>
|
143
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="179.296875" x="25.07763671875" y="26.1328125">Employees::EmployeeType
|
144
|
+
</y:NodeLabel>
|
145
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="data" use3DEffect="false">
|
146
|
+
<y:AttributeLabel></y:AttributeLabel>
|
147
|
+
<y:MethodLabel></y:MethodLabel>
|
148
|
+
</y:UML>
|
149
|
+
</y:UMLClassNode>
|
150
|
+
</data>
|
151
|
+
<data key="d1">UMLClass</data>
|
152
|
+
</node>
|
153
|
+
<node id="n9">
|
154
|
+
<data key="d0">
|
155
|
+
<y:UMLClassNode>
|
156
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="535.27392578125" y="-22.310546875"/>
|
157
|
+
<y:Fill color="#99CCFF" transparent="false"/>
|
158
|
+
<y:BorderStyle color="#000000" type="line" width="2.0"/>
|
159
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="161.5361328125" x="33.9580078125" y="26.1328125">Employees::Department
|
160
|
+
</y:NodeLabel>
|
161
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="data" use3DEffect="false">
|
162
|
+
<y:AttributeLabel></y:AttributeLabel>
|
163
|
+
<y:MethodLabel></y:MethodLabel>
|
164
|
+
</y:UML>
|
165
|
+
</y:UMLClassNode>
|
166
|
+
</data>
|
167
|
+
<data key="d1">UMLClass</data>
|
168
|
+
</node>
|
169
|
+
<node id="n10">
|
170
|
+
<data key="d0">
|
171
|
+
<y:UMLClassNode>
|
172
|
+
<y:Geometry height="44.62109375" width="229.4521484375" x="535.27392578125" y="52.689453125"/>
|
173
|
+
<y:Fill color="#99CCFF" transparent="false"/>
|
174
|
+
<y:BorderStyle color="#000000" type="line" width="2.0"/>
|
175
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="bold" hasBackgroundColor="false" hasLineColor="false" height="34.62109375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="146.517578125" x="41.46728515625" y="26.1328125">Employees::Employee
|
176
|
+
</y:NodeLabel>
|
177
|
+
<y:UML clipContent="true" constraint="" omitDetails="false" stereotype="data" use3DEffect="false">
|
178
|
+
<y:AttributeLabel></y:AttributeLabel>
|
179
|
+
<y:MethodLabel></y:MethodLabel>
|
180
|
+
</y:UML>
|
181
|
+
</y:UMLClassNode>
|
182
|
+
</data>
|
183
|
+
<data key="d1">UMLClass</data>
|
184
|
+
</node>
|
185
|
+
<edge id="e0" source="n0" target="n1">
|
186
|
+
<data key="d2">
|
187
|
+
<y:PolyLineEdge>
|
188
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
189
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
190
|
+
<y:Arrows source="none" target="short"/>
|
191
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-24.7935791015625" y="2.0"></y:EdgeLabel>
|
192
|
+
<y:BendStyle smoothed="false"/>
|
193
|
+
</y:PolyLineEdge>
|
194
|
+
</data>
|
195
|
+
<data key="d3">UMLuses</data>
|
196
|
+
</edge>
|
197
|
+
<edge id="e1" source="n0" target="n2">
|
198
|
+
<data key="d2">
|
199
|
+
<y:PolyLineEdge>
|
200
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
201
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
202
|
+
<y:Arrows source="none" target="white_delta"/>
|
203
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="2.0" y="-117.1763916015625"></y:EdgeLabel>
|
204
|
+
<y:BendStyle smoothed="false"/>
|
205
|
+
</y:PolyLineEdge>
|
206
|
+
</data>
|
207
|
+
<data key="d3">UMLinherits</data>
|
208
|
+
</edge>
|
209
|
+
<edge id="e2" source="n3" target="n1">
|
210
|
+
<data key="d2">
|
211
|
+
<y:PolyLineEdge>
|
212
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
213
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
214
|
+
<y:Arrows source="none" target="short"/>
|
215
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="2.0" y="113.1763916015625"></y:EdgeLabel>
|
216
|
+
<y:BendStyle smoothed="false"/>
|
217
|
+
</y:PolyLineEdge>
|
218
|
+
</data>
|
219
|
+
<data key="d3">UMLuses</data>
|
220
|
+
</edge>
|
221
|
+
<edge id="e3" source="n3" target="n2">
|
222
|
+
<data key="d2">
|
223
|
+
<y:PolyLineEdge>
|
224
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
225
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
226
|
+
<y:Arrows source="none" target="white_delta"/>
|
227
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="20.7935791015625" y="2.0"></y:EdgeLabel>
|
228
|
+
<y:BendStyle smoothed="false"/>
|
229
|
+
</y:PolyLineEdge>
|
230
|
+
</data>
|
231
|
+
<data key="d3">UMLinherits</data>
|
232
|
+
</edge>
|
233
|
+
<edge id="e4" source="n4" target="n5">
|
234
|
+
<data key="d2">
|
235
|
+
<y:PolyLineEdge>
|
236
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
237
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
238
|
+
<y:Arrows source="none" target="short"/>
|
239
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="2.0" y="113.1763916015625"></y:EdgeLabel>
|
240
|
+
<y:BendStyle smoothed="false"/>
|
241
|
+
</y:PolyLineEdge>
|
242
|
+
</data>
|
243
|
+
<data key="d3">UMLuses</data>
|
244
|
+
</edge>
|
245
|
+
<edge id="e5" source="n4" target="n6">
|
246
|
+
<data key="d2">
|
247
|
+
<y:PolyLineEdge>
|
248
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
249
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
250
|
+
<y:Arrows source="none" target="white_delta"/>
|
251
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-24.7935791015625" y="2.0"></y:EdgeLabel>
|
252
|
+
<y:BendStyle smoothed="false"/>
|
253
|
+
</y:PolyLineEdge>
|
254
|
+
</data>
|
255
|
+
<data key="d3">UMLinherits</data>
|
256
|
+
</edge>
|
257
|
+
<edge id="e6" source="n7" target="n5">
|
258
|
+
<data key="d2">
|
259
|
+
<y:PolyLineEdge>
|
260
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
261
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
262
|
+
<y:Arrows source="none" target="short"/>
|
263
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="20.7935791015625" y="2.0"></y:EdgeLabel>
|
264
|
+
<y:BendStyle smoothed="false"/>
|
265
|
+
</y:PolyLineEdge>
|
266
|
+
</data>
|
267
|
+
<data key="d3">UMLuses</data>
|
268
|
+
</edge>
|
269
|
+
<edge id="e7" source="n7" target="n6">
|
270
|
+
<data key="d2">
|
271
|
+
<y:PolyLineEdge>
|
272
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
273
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
274
|
+
<y:Arrows source="none" target="white_delta"/>
|
275
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="2.0" y="-117.1763916015625"></y:EdgeLabel>
|
276
|
+
<y:BendStyle smoothed="false"/>
|
277
|
+
</y:PolyLineEdge>
|
278
|
+
</data>
|
279
|
+
<data key="d3">UMLinherits</data>
|
280
|
+
</edge>
|
281
|
+
<edge id="e8" source="n9" target="n10">
|
282
|
+
<data key="d2">
|
283
|
+
<y:PolyLineEdge>
|
284
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
285
|
+
<y:LineStyle color="#000000" type="line" width="2.0"/>
|
286
|
+
<y:Arrows source="none" target="short"/>
|
287
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="2.0" y="13.19775390625"></y:EdgeLabel>
|
288
|
+
<y:BendStyle smoothed="false"/>
|
289
|
+
</y:PolyLineEdge>
|
290
|
+
</data>
|
291
|
+
<data key="d3">UMLuses</data>
|
292
|
+
</edge>
|
293
|
+
<edge id="e9" source="n10" target="n8">
|
294
|
+
<data key="d2">
|
295
|
+
<y:PolyLineEdge>
|
296
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
297
|
+
<y:LineStyle color="#000000" type="line" width="2.0"/>
|
298
|
+
<y:Arrows source="none" target="short"/>
|
299
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="2.0" y="63.155029296875"></y:EdgeLabel>
|
300
|
+
<y:BendStyle smoothed="false"/>
|
301
|
+
</y:PolyLineEdge>
|
302
|
+
</data>
|
303
|
+
<data key="d3">UMLuses</data>
|
304
|
+
</edge>
|
305
|
+
<edge id="e10" source="n8" target="n6">
|
306
|
+
<data key="d2">
|
307
|
+
<y:PolyLineEdge>
|
308
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
309
|
+
<y:LineStyle color="#000000" type="line" width="2.0"/>
|
310
|
+
<y:Arrows source="none" target="short"/>
|
311
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="20.7935791015625" y="2.0"></y:EdgeLabel>
|
312
|
+
<y:BendStyle smoothed="false"/>
|
313
|
+
</y:PolyLineEdge>
|
314
|
+
</data>
|
315
|
+
<data key="d3">UMLuses</data>
|
316
|
+
</edge>
|
317
|
+
<edge id="e11" source="n8" target="n2">
|
318
|
+
<data key="d2">
|
319
|
+
<y:PolyLineEdge>
|
320
|
+
<y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/>
|
321
|
+
<y:LineStyle color="#000000" type="line" width="2.0"/>
|
322
|
+
<y:Arrows source="none" target="short"/>
|
323
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="4.0" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="4.0" x="-24.7935791015625" y="2.0"></y:EdgeLabel>
|
324
|
+
<y:BendStyle smoothed="false"/>
|
325
|
+
</y:PolyLineEdge>
|
326
|
+
</data>
|
327
|
+
<data key="d3">UMLuses</data>
|
328
|
+
</edge>
|
329
|
+
</graph>
|
330
|
+
<data key="d4">
|
331
|
+
<y:Resources/>
|
332
|
+
</data>
|
333
|
+
</graphml>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env ruby -w -I..
|
2
|
+
|
3
|
+
if $0 == __FILE__ then
|
4
|
+
|
5
|
+
class File
|
6
|
+
def File.sjoin(*args)
|
7
|
+
File.join(args.select{ | o | o })
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
$LOAD_PATH.unshift('../../lib/')
|
12
|
+
|
13
|
+
require 'xamplr-generator'
|
14
|
+
|
15
|
+
include XamplGenerator
|
16
|
+
include Xampl
|
17
|
+
|
18
|
+
Xampl.transaction("setup", :in_memory) do
|
19
|
+
directory = File.sjoin(".", "xampl_generated_code")
|
20
|
+
|
21
|
+
options = Xampl.make(Options) do |options|
|
22
|
+
options.new_index_attribute("pid").persisted = true
|
23
|
+
options.new_index_attribute("id")
|
24
|
+
|
25
|
+
options.resolve("http://example.com/employees", "Employees", "emp")
|
26
|
+
end
|
27
|
+
|
28
|
+
filenames = Dir.glob("./xml/**/*.xml")
|
29
|
+
|
30
|
+
generator = Generator.new
|
31
|
+
generator.go(:options => options,
|
32
|
+
:filenames => filenames,
|
33
|
+
:directory => directory)
|
34
|
+
|
35
|
+
puts generator.print_elements("./generated-elements.xml")
|
36
|
+
exit!
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
<!--
|
2
|
+
[RetirementPlan] ^[DefinedContribution],
|
3
|
+
[RetirementPlan] ^[DefinedBenefit],
|
4
|
+
[Payroll]^[HourlyPayroll],
|
5
|
+
[Payroll]^[SalariedPayroll],
|
6
|
+
[EmployeeType]->*[RetirementPlan],
|
7
|
+
[EmployeeType]->*[Payroll],
|
8
|
+
[Employee]*->[EmployeeType],
|
9
|
+
[Department]-*[Employee]
|
10
|
+
-->
|
11
|
+
<company pid=''
|
12
|
+
xmlns="http://example.com/employees">
|
13
|
+
|
14
|
+
<hourly-payroll pid='singleton'>
|
15
|
+
<__payroll__/>
|
16
|
+
</hourly-payroll>
|
17
|
+
<salaried-payroll pid='singleton'>
|
18
|
+
<__payroll__/>
|
19
|
+
</salaried-payroll>
|
20
|
+
|
21
|
+
<defined-contribution pid="singleton">
|
22
|
+
<retirement-plan/>
|
23
|
+
</defined-contribution>
|
24
|
+
<defined-benefit pid="singleton">
|
25
|
+
<retirement-plan/>
|
26
|
+
</defined-benefit>
|
27
|
+
|
28
|
+
<employee-type pid="">
|
29
|
+
<__payroll__ />
|
30
|
+
</employee-type>
|
31
|
+
|
32
|
+
<employee-type pid=''
|
33
|
+
title='janitor'>
|
34
|
+
<hourly-payroll pid='singleton'/>
|
35
|
+
<defined-contribution pid="singleton"/>
|
36
|
+
</employee-type>
|
37
|
+
<employee-type pid=''
|
38
|
+
title='receptionist'>
|
39
|
+
<hourly-payroll pid='singleton'/>
|
40
|
+
<defined-contribution pid="singleton"/>
|
41
|
+
</employee-type>
|
42
|
+
<employee-type pid=''
|
43
|
+
title='office-admin'>
|
44
|
+
<hourly-payroll pid='singleton'/>
|
45
|
+
<defined-benefit pid="singleton"/>
|
46
|
+
</employee-type>
|
47
|
+
<employee-type pid=''
|
48
|
+
title='engineer'>
|
49
|
+
<salaried-payroll pid='singleton'/>
|
50
|
+
<defined-benefit pid="singleton"/>
|
51
|
+
</employee-type>
|
52
|
+
<employee-type pid=''
|
53
|
+
title='manager'>
|
54
|
+
<salaried-payroll pid='singleton'/>
|
55
|
+
<defined-benefit pid="singleton"/>
|
56
|
+
</employee-type>
|
57
|
+
|
58
|
+
|
59
|
+
<department pid=''
|
60
|
+
name='widget design'>
|
61
|
+
<employee pid=''
|
62
|
+
name='tom'>
|
63
|
+
<employee-type pid=''
|
64
|
+
title='janitor'/>
|
65
|
+
</employee>
|
66
|
+
<employee pid=''
|
67
|
+
name='mary'
|
68
|
+
title='receptionist'>
|
69
|
+
<employee-type pid=''
|
70
|
+
title='receptionist'/>
|
71
|
+
</employee>
|
72
|
+
<employee pid=''
|
73
|
+
name='bob'
|
74
|
+
title='office-admin'>
|
75
|
+
<employee-type pid=''
|
76
|
+
title='office-admin'/>
|
77
|
+
</employee>
|
78
|
+
|
79
|
+
<employee pid=''
|
80
|
+
name='jack'>
|
81
|
+
<employee-type pid=''
|
82
|
+
title='engineer'/>
|
83
|
+
</employee>
|
84
|
+
<employee pid=''
|
85
|
+
name='jill'>
|
86
|
+
<employee-type pid=''
|
87
|
+
title='manager'/>
|
88
|
+
</employee>
|
89
|
+
</department>
|
90
|
+
</company>
|