pacer 0.9.1.1-java
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +8 -0
- data/.document +5 -0
- data/.gitignore +26 -0
- data/.rspec +1 -0
- data/.rvmrc +0 -0
- data/CONTRIBUTORS +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +24 -0
- data/README.md +187 -0
- data/Rakefile +49 -0
- data/autotest/discover.rb +1 -0
- data/bin/autospec +16 -0
- data/bin/autotest +16 -0
- data/bin/rake +16 -0
- data/bin/rcov +16 -0
- data/bin/rspec +16 -0
- data/bin/yard +16 -0
- data/bin/yardoc +16 -0
- data/lib/pacer/blueprints/extensions.rb +77 -0
- data/lib/pacer/blueprints/multi_graph.rb +121 -0
- data/lib/pacer/blueprints/ruby_graph.rb +199 -0
- data/lib/pacer/blueprints/tg.rb +100 -0
- data/lib/pacer/blueprints.rb +4 -0
- data/lib/pacer/core/graph/edges_route.rb +92 -0
- data/lib/pacer/core/graph/element_route.rb +171 -0
- data/lib/pacer/core/graph/graph_index_route.rb +48 -0
- data/lib/pacer/core/graph/graph_route.rb +55 -0
- data/lib/pacer/core/graph/mixed_route.rb +96 -0
- data/lib/pacer/core/graph/vertices_route.rb +220 -0
- data/lib/pacer/core/graph.rb +13 -0
- data/lib/pacer/core/route.rb +502 -0
- data/lib/pacer/core/side_effect.rb +11 -0
- data/lib/pacer/core.rb +8 -0
- data/lib/pacer/exceptions.rb +11 -0
- data/lib/pacer/extensions/block_filter_element.rb +22 -0
- data/lib/pacer/extensions.rb +6 -0
- data/lib/pacer/filter/block_filter.rb +31 -0
- data/lib/pacer/filter/collection_filter.rb +109 -0
- data/lib/pacer/filter/empty_filter.rb +70 -0
- data/lib/pacer/filter/future_filter.rb +68 -0
- data/lib/pacer/filter/index_filter.rb +30 -0
- data/lib/pacer/filter/loop_filter.rb +95 -0
- data/lib/pacer/filter/object_filter.rb +55 -0
- data/lib/pacer/filter/property_filter/edge_filters.rb +93 -0
- data/lib/pacer/filter/property_filter/filters.rb +269 -0
- data/lib/pacer/filter/property_filter.rb +111 -0
- data/lib/pacer/filter/random_filter.rb +13 -0
- data/lib/pacer/filter/range_filter.rb +104 -0
- data/lib/pacer/filter/uniq_filter.rb +12 -0
- data/lib/pacer/filter/where_filter/node_visitor.rb +280 -0
- data/lib/pacer/filter/where_filter.rb +47 -0
- data/lib/pacer/filter.rb +17 -0
- data/lib/pacer/function_resolver.rb +43 -0
- data/lib/pacer/graph/edge_mixin.rb +127 -0
- data/lib/pacer/graph/element_mixin.rb +202 -0
- data/lib/pacer/graph/graph_indices_mixin.rb +93 -0
- data/lib/pacer/graph/graph_mixin.rb +361 -0
- data/lib/pacer/graph/graph_transactions_mixin.rb +207 -0
- data/lib/pacer/graph/index_mixin.rb +30 -0
- data/lib/pacer/graph/vertex_mixin.rb +119 -0
- data/lib/pacer/graph.rb +14 -0
- data/lib/pacer/pipe/blackbox_pipeline.rb +48 -0
- data/lib/pacer/pipe/block_filter_pipe.rb +38 -0
- data/lib/pacer/pipe/collection_filter_pipe.rb +10 -0
- data/lib/pacer/pipe/cross_product_transform_pipe.rb +48 -0
- data/lib/pacer/pipe/enumerable_pipe.rb +30 -0
- data/lib/pacer/pipe/expandable_pipe.rb +63 -0
- data/lib/pacer/pipe/id_collection_filter_pipe.rb +33 -0
- data/lib/pacer/pipe/is_empty_pipe.rb +30 -0
- data/lib/pacer/pipe/is_unique_pipe.rb +61 -0
- data/lib/pacer/pipe/label_collection_filter_pipe.rb +21 -0
- data/lib/pacer/pipe/label_prefix_pipe.rb +21 -0
- data/lib/pacer/pipe/loop_pipe.rb +86 -0
- data/lib/pacer/pipe/map_pipe.rb +36 -0
- data/lib/pacer/pipe/never_pipe.rb +9 -0
- data/lib/pacer/pipe/process_pipe.rb +37 -0
- data/lib/pacer/pipe/property_comparison_pipe.rb +40 -0
- data/lib/pacer/pipe/ruby_pipe.rb +25 -0
- data/lib/pacer/pipe/simple_visitor_pipe.rb +43 -0
- data/lib/pacer/pipe/stream_sort_pipe.rb +84 -0
- data/lib/pacer/pipe/stream_uniq_pipe.rb +33 -0
- data/lib/pacer/pipe/type_filter_pipe.rb +22 -0
- data/lib/pacer/pipe/unary_transform_pipe.rb +59 -0
- data/lib/pacer/pipe/variable_store_iterator_wrapper.rb +26 -0
- data/lib/pacer/pipe/visitor_pipe.rb +67 -0
- data/lib/pacer/pipes.rb +61 -0
- data/lib/pacer/route/mixin/bulk_operations.rb +52 -0
- data/lib/pacer/route/mixin/route_operations.rb +107 -0
- data/lib/pacer/route/mixin/variable_route_module.rb +26 -0
- data/lib/pacer/route/mixins.rb +3 -0
- data/lib/pacer/route.rb +228 -0
- data/lib/pacer/routes.rb +6 -0
- data/lib/pacer/side_effect/aggregate.rb +31 -0
- data/lib/pacer/side_effect/counted.rb +30 -0
- data/lib/pacer/side_effect/group_count.rb +44 -0
- data/lib/pacer/side_effect/is_unique.rb +32 -0
- data/lib/pacer/side_effect/section.rb +25 -0
- data/lib/pacer/side_effect/visitor.rb +37 -0
- data/lib/pacer/side_effect.rb +11 -0
- data/lib/pacer/support/array_list.rb +28 -0
- data/lib/pacer/support/enumerable.rb +100 -0
- data/lib/pacer/support/hash.rb +9 -0
- data/lib/pacer/support/iterator_mixins.rb +110 -0
- data/lib/pacer/support/native_exception.rb +22 -0
- data/lib/pacer/support/proc.rb +16 -0
- data/lib/pacer/support.rb +10 -0
- data/lib/pacer/transform/cap.rb +50 -0
- data/lib/pacer/transform/gather.rb +9 -0
- data/lib/pacer/transform/has_count_cap.rb +41 -0
- data/lib/pacer/transform/join.rb +181 -0
- data/lib/pacer/transform/map.rb +23 -0
- data/lib/pacer/transform/path.rb +50 -0
- data/lib/pacer/transform/process.rb +23 -0
- data/lib/pacer/transform/scatter.rb +23 -0
- data/lib/pacer/transform/sort_section.rb +103 -0
- data/lib/pacer/transform/stream_sort.rb +21 -0
- data/lib/pacer/transform/stream_uniq.rb +21 -0
- data/lib/pacer/transform.rb +16 -0
- data/lib/pacer/utils/graph_analysis.rb +112 -0
- data/lib/pacer/utils/trie.rb +93 -0
- data/lib/pacer/utils/tsort.rb +65 -0
- data/lib/pacer/utils/y_files.rb +127 -0
- data/lib/pacer/utils.rb +10 -0
- data/lib/pacer/version.rb +13 -0
- data/lib/pacer/wrappers/edge_wrapper.rb +51 -0
- data/lib/pacer/wrappers/element_wrapper.rb +78 -0
- data/lib/pacer/wrappers/new_element.rb +106 -0
- data/lib/pacer/wrappers/vertex_wrapper.rb +51 -0
- data/lib/pacer/wrappers.rb +19 -0
- data/lib/pacer-0.9.1.1-standalone.jar +0 -0
- data/lib/pacer.rb +290 -0
- data/pacer.gemspec +30 -0
- data/pom/standalone.xml +22 -0
- data/pom.xml +124 -0
- data/samples/grateful-dead.xml +26380 -0
- data/samples/grateful_dead.rb +63 -0
- data/samples/profile.rb +15 -0
- data/spec/data/grateful-dead.xml +26380 -0
- data/spec/data/pacer.graphml +319 -0
- data/spec/pacer/blueprints/dex_spec.rb +172 -0
- data/spec/pacer/blueprints/neo4j_spec.rb +177 -0
- data/spec/pacer/blueprints/tg_spec.rb +128 -0
- data/spec/pacer/core/graph/edges_route_spec.rb +52 -0
- data/spec/pacer/core/graph/element_route_spec.rb +46 -0
- data/spec/pacer/core/graph/graph_route_spec.rb +94 -0
- data/spec/pacer/core/graph/vertices_route_spec.rb +169 -0
- data/spec/pacer/core/route_spec.rb +197 -0
- data/spec/pacer/filter/collection_filter_spec.rb +19 -0
- data/spec/pacer/filter/empty_filter_spec.rb +29 -0
- data/spec/pacer/filter/future_filter_spec.rb +97 -0
- data/spec/pacer/filter/loop_filter_spec.rb +31 -0
- data/spec/pacer/filter/property_filter_spec.rb +111 -0
- data/spec/pacer/filter/random_filter_spec.rb +17 -0
- data/spec/pacer/filter/uniq_filter_spec.rb +18 -0
- data/spec/pacer/filter/where_filter_spec.rb +93 -0
- data/spec/pacer/graph/edge_mixin_spec.rb +116 -0
- data/spec/pacer/graph/element_mixin_spec.rb +297 -0
- data/spec/pacer/graph/graph_mixin_spec.rb +538 -0
- data/spec/pacer/graph/index_mixin_spec.rb +0 -0
- data/spec/pacer/graph/vertex_mixin_spec.rb +192 -0
- data/spec/pacer/pipe/block_filter_pipe_spec.rb +0 -0
- data/spec/pacer/pipe/labels_filter_pipe_spec.rb +0 -0
- data/spec/pacer/pipe/ruby_pipe_spec.rb +0 -0
- data/spec/pacer/pipe/type_filter_pipe_spec.rb +0 -0
- data/spec/pacer/route/mixin/base_spec.rb +419 -0
- data/spec/pacer/route/mixin/bulk_operations_spec.rb +30 -0
- data/spec/pacer/route/mixin/route_operations_spec.rb +127 -0
- data/spec/pacer/support/array_list_spec.rb +0 -0
- data/spec/pacer/support/enumerable_spec.rb +115 -0
- data/spec/pacer/transform/join_spec.rb +138 -0
- data/spec/pacer/transform/path_spec.rb +54 -0
- data/spec/pacer/utils/tsort_spec.rb +89 -0
- data/spec/pacer/wrapper/edge_wrapper_spec.rb +33 -0
- data/spec/pacer/wrapper/element_wrapper_spec.rb +169 -0
- data/spec/pacer/wrapper/vertex_wrapper_spec.rb +33 -0
- data/spec/pacer_spec.rb +0 -0
- data/spec/spec_helper.rb +91 -0
- data/spec/support/contexts.rb +14 -0
- data/spec/support/graph_runner.rb +142 -0
- data/spec/support/matchers.rb +19 -0
- data/spec/support/use_transactions.rb +31 -0
- data/spec/tackle/simple_mixin.rb +21 -0
- data/spec/tackle/tinkerpop_graph_mixins.rb +60 -0
- metadata +364 -0
@@ -0,0 +1,319 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
|
3
|
+
<!--Created by yFiles for Java 2.7-->
|
4
|
+
<key for="graphml" id="d0" yfiles.type="resources"/>
|
5
|
+
<key attr.name="name" attr.type="string" for="node" id="name">
|
6
|
+
<default/>
|
7
|
+
</key>
|
8
|
+
<key attr.name="type" attr.type="string" for="node" id="type"/>
|
9
|
+
<key attr.name="url" attr.type="string" for="node" id="d2"/>
|
10
|
+
<key for="node" id="d4" yfiles.type="nodegraphics"/>
|
11
|
+
<key attr.name="Description" attr.type="string" for="graph" id="d5">
|
12
|
+
<default/>
|
13
|
+
</key>
|
14
|
+
<key attr.name="url" attr.type="string" for="edge" id="d6"/>
|
15
|
+
<key for="edge" id="d8" yfiles.type="edgegraphics"/>
|
16
|
+
<graph edgedefault="directed" id="G">
|
17
|
+
<node id="0">
|
18
|
+
<data key="name">pangloss</data>
|
19
|
+
<data key="type">person</data>
|
20
|
+
<data key="d4">
|
21
|
+
<y:ShapeNode>
|
22
|
+
<y:Geometry height="30.0" width="70.5322265625" x="2.332763671875" y="-45.0"/>
|
23
|
+
<y:Fill color="#FFCC00" transparent="false"/>
|
24
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
25
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="60.5322265625" x="5.0" y="5.3447265625">pangloss</y:NodeLabel>
|
26
|
+
<y:Shape type="rectangle"/>
|
27
|
+
</y:ShapeNode>
|
28
|
+
</data>
|
29
|
+
</node>
|
30
|
+
<node id="1">
|
31
|
+
<data key="name">pacer</data>
|
32
|
+
<data key="type">project</data>
|
33
|
+
<data key="d4">
|
34
|
+
<y:ShapeNode>
|
35
|
+
<y:Geometry height="30.0" width="47.58544921875" x="175.754638671875" y="-45.0"/>
|
36
|
+
<y:Fill color="#FFCC00" transparent="false"/>
|
37
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
38
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="37.58544921875" x="5.0" y="5.3447265625">Pacer</y:NodeLabel>
|
39
|
+
<y:Shape type="rectangle"/>
|
40
|
+
</y:ShapeNode>
|
41
|
+
</data>
|
42
|
+
</node>
|
43
|
+
<node id="2">
|
44
|
+
<data key="name">pipes</data>
|
45
|
+
<data key="type">project</data>
|
46
|
+
<data key="d4">
|
47
|
+
<y:ShapeNode>
|
48
|
+
<y:Geometry height="30.0" width="46.9951171875" x="526.190673828125" y="-87.51626984126985"/>
|
49
|
+
<y:Fill color="#FFCC00" transparent="false"/>
|
50
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
51
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="36.9951171875" x="5.0" y="5.3447265625">Pipes</y:NodeLabel>
|
52
|
+
<y:Shape type="rectangle"/>
|
53
|
+
</y:ShapeNode>
|
54
|
+
</data>
|
55
|
+
</node>
|
56
|
+
<node id="3">
|
57
|
+
<data key="name">blueprints</data>
|
58
|
+
<data key="type">project</data>
|
59
|
+
<data key="d4">
|
60
|
+
<y:ShapeNode>
|
61
|
+
<y:Geometry height="30.0" width="77.3623046875" x="653.552978515625" y="-126.58293650793651"/>
|
62
|
+
<y:Fill color="#FFCC00" transparent="false"/>
|
63
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
64
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="67.3623046875" x="5.0" y="5.3447265625">Blueprints</y:NodeLabel>
|
65
|
+
<y:Shape type="rectangle"/>
|
66
|
+
</y:ShapeNode>
|
67
|
+
</data>
|
68
|
+
</node>
|
69
|
+
<node id="4">
|
70
|
+
<data key="name">gremlin</data>
|
71
|
+
<data key="type">project</data>
|
72
|
+
<data key="d4">
|
73
|
+
<y:ShapeNode>
|
74
|
+
<y:Geometry height="30.0" width="63.6767578125" x="367.146728515625" y="-113.76626984126985"/>
|
75
|
+
<y:Fill color="#FFCC00" transparent="false"/>
|
76
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
77
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="53.6767578125" x="5.0" y="5.3447265625">Gremlin</y:NodeLabel>
|
78
|
+
<y:Shape type="rectangle"/>
|
79
|
+
</y:ShapeNode>
|
80
|
+
</data>
|
81
|
+
</node>
|
82
|
+
<node id="5">
|
83
|
+
<data key="name">okram</data>
|
84
|
+
<data key="type">person</data>
|
85
|
+
<data key="d4">
|
86
|
+
<y:ShapeNode>
|
87
|
+
<y:Geometry height="30.0" width="54.21875" x="172.43798828125" y="-152.8329365079365"/>
|
88
|
+
<y:Fill color="#FFCC00" transparent="false"/>
|
89
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
90
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="44.21875" x="5.0" y="5.3447265625">okram</y:NodeLabel>
|
91
|
+
<y:Shape type="rectangle"/>
|
92
|
+
</y:ShapeNode>
|
93
|
+
</data>
|
94
|
+
</node>
|
95
|
+
<node id="6">
|
96
|
+
<data key="name">tinkerpop</data>
|
97
|
+
<data key="type">group</data>
|
98
|
+
<data key="d4">
|
99
|
+
<y:ShapeNode>
|
100
|
+
<y:Geometry height="30.0" width="75.19775390625" x="0.0" y="-133.2996031746032"/>
|
101
|
+
<y:Fill color="#FFCC00" transparent="false"/>
|
102
|
+
<y:BorderStyle color="#000000" type="line" width="1.0"/>
|
103
|
+
<y:NodeLabel alignment="center" autoSizePolicy="content" borderDistance="0.0" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.310546875" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="65.19775390625" x="5.0" y="5.3447265625">tinkerpop</y:NodeLabel>
|
104
|
+
<y:Shape type="rectangle"/>
|
105
|
+
</y:ShapeNode>
|
106
|
+
</data>
|
107
|
+
</node>
|
108
|
+
<edge id="0" source="0" target="1" label="wrote">
|
109
|
+
<data key="d8">
|
110
|
+
<y:PolyLineEdge>
|
111
|
+
<y:Path sx="35.26611328125" sy="-0.0" tx="-23.792724609375" ty="-0.0"/>
|
112
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
113
|
+
<y:Arrows source="none" target="standard"/>
|
114
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="36.701171875" x="40.102294921875" y="-9.06640625">wrote</y:EdgeLabel>
|
115
|
+
<y:BendStyle smoothed="false"/>
|
116
|
+
</y:PolyLineEdge>
|
117
|
+
</data>
|
118
|
+
</edge>
|
119
|
+
<edge id="1" source="5" target="4" label="wrote">
|
120
|
+
<data key="d8">
|
121
|
+
<y:PolyLineEdge>
|
122
|
+
<y:Path sx="27.109375" sy="10.0" tx="-31.83837890625" ty="-10.0">
|
123
|
+
<y:Point x="236.65673828125" y="-127.8329365079365"/>
|
124
|
+
<y:Point x="274.392822265625" y="-118.29960317460318"/>
|
125
|
+
<y:Point x="311.093994140625" y="-118.29960317460318"/>
|
126
|
+
<y:Point x="352.146728515625" y="-108.76626984126985"/>
|
127
|
+
</y:Path>
|
128
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
129
|
+
<y:Arrows source="none" target="standard"/>
|
130
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="36.701171875" x="47.736083984375" y="0.4669297233460412">wrote</y:EdgeLabel>
|
131
|
+
<y:BendStyle smoothed="false"/>
|
132
|
+
</y:PolyLineEdge>
|
133
|
+
</data>
|
134
|
+
</edge>
|
135
|
+
<edge id="2" source="1" target="4" label="modelled_on">
|
136
|
+
<data key="d8">
|
137
|
+
<y:PolyLineEdge>
|
138
|
+
<y:Path sx="23.792724609375" sy="-10.0" tx="-31.83837890625" ty="10.0">
|
139
|
+
<y:Point x="233.340087890625" y="-40.0"/>
|
140
|
+
<y:Point x="253.340087890625" y="-49.06666666666667"/>
|
141
|
+
<y:Point x="332.146728515625" y="-49.06666666666667"/>
|
142
|
+
<y:Point x="352.146728515625" y="-88.76626984126985"/>
|
143
|
+
</y:Path>
|
144
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
145
|
+
<y:Arrows source="none" target="standard"/>
|
146
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="78.806640625" x="30.0" y="-18.13307291666667">modelled_on</y:EdgeLabel>
|
147
|
+
<y:BendStyle smoothed="false"/>
|
148
|
+
</y:PolyLineEdge>
|
149
|
+
</data>
|
150
|
+
</edge>
|
151
|
+
<edge id="3" source="1" target="2" label="uses">
|
152
|
+
<data key="d8">
|
153
|
+
<y:PolyLineEdge>
|
154
|
+
<y:Path sx="23.792724609375" sy="-0.0" tx="-23.49755859375" ty="11.25">
|
155
|
+
<y:Point x="332.146728515625" y="-30.0"/>
|
156
|
+
<y:Point x="383.801513671875" y="-39.06666666666667"/>
|
157
|
+
<y:Point x="476.007080078125" y="-39.06666666666667"/>
|
158
|
+
<y:Point x="511.190673828125" y="-61.266269841269846"/>
|
159
|
+
</y:Path>
|
160
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
161
|
+
<y:Arrows source="none" target="standard"/>
|
162
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="30.3671875" x="160.46142578125" y="-18.13307291666667">uses</y:EdgeLabel>
|
163
|
+
<y:BendStyle smoothed="false"/>
|
164
|
+
</y:PolyLineEdge>
|
165
|
+
</data>
|
166
|
+
</edge>
|
167
|
+
<edge id="4" source="1" target="3" label="uses">
|
168
|
+
<data key="d8">
|
169
|
+
<y:PolyLineEdge>
|
170
|
+
<y:Path sx="23.792724609375" sy="10.0" tx="-38.68115234375" ty="12.0">
|
171
|
+
<y:Point x="618.552978515625" y="-20.0"/>
|
172
|
+
<y:Point x="638.552978515625" y="-99.58293650793651"/>
|
173
|
+
</y:Path>
|
174
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
175
|
+
<y:Arrows source="none" target="standard"/>
|
176
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="30.3671875" x="237.4833984375" y="-9.06640625">uses</y:EdgeLabel>
|
177
|
+
<y:BendStyle smoothed="false"/>
|
178
|
+
</y:PolyLineEdge>
|
179
|
+
</data>
|
180
|
+
</edge>
|
181
|
+
<edge id="5" source="4" target="2" label="uses">
|
182
|
+
<data key="d8">
|
183
|
+
<y:PolyLineEdge>
|
184
|
+
<y:Path sx="31.83837890625" sy="7.5" tx="-23.49755859375" ty="-3.75">
|
185
|
+
<y:Point x="440.823486328125" y="-91.26626984126985"/>
|
186
|
+
<y:Point x="460.823486328125" y="-87.51626984126985"/>
|
187
|
+
<y:Point x="491.190673828125" y="-87.51626984126985"/>
|
188
|
+
<y:Point x="511.190673828125" y="-76.26626984126985"/>
|
189
|
+
</y:Path>
|
190
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
191
|
+
<y:Arrows source="none" target="standard"/>
|
192
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="30.3671875" x="30.0" y="-5.31640259273469">uses</y:EdgeLabel>
|
193
|
+
<y:BendStyle smoothed="false"/>
|
194
|
+
</y:PolyLineEdge>
|
195
|
+
</data>
|
196
|
+
</edge>
|
197
|
+
<edge id="6" source="4" target="3" label="uses">
|
198
|
+
<data key="d8">
|
199
|
+
<y:PolyLineEdge>
|
200
|
+
<y:Path sx="31.83837890625" sy="-7.5" tx="-38.68115234375" ty="-0.0">
|
201
|
+
<y:Point x="440.823486328125" y="-106.26626984126985"/>
|
202
|
+
<y:Point x="460.823486328125" y="-111.58293650793651"/>
|
203
|
+
</y:Path>
|
204
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
205
|
+
<y:Arrows source="none" target="standard"/>
|
206
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="30.3671875" x="103.68115234375" y="-14.383069259401353">uses</y:EdgeLabel>
|
207
|
+
<y:BendStyle smoothed="false"/>
|
208
|
+
</y:PolyLineEdge>
|
209
|
+
</data>
|
210
|
+
</edge>
|
211
|
+
<edge id="7" source="2" target="3" label="uses">
|
212
|
+
<data key="d8">
|
213
|
+
<y:PolyLineEdge>
|
214
|
+
<y:Path sx="23.49755859375" sy="-0.0" tx="-38.68115234375" ty="6.0">
|
215
|
+
<y:Point x="618.552978515625" y="-72.51626984126985"/>
|
216
|
+
<y:Point x="638.552978515625" y="-105.58293650793651"/>
|
217
|
+
</y:Path>
|
218
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
219
|
+
<y:Arrows source="none" target="standard"/>
|
220
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="30.3671875" x="15.0" y="-9.06640259273469">uses</y:EdgeLabel>
|
221
|
+
<y:BendStyle smoothed="false"/>
|
222
|
+
</y:PolyLineEdge>
|
223
|
+
</data>
|
224
|
+
</edge>
|
225
|
+
<edge id="8" source="6" target="3" label="projects">
|
226
|
+
<data key="d8">
|
227
|
+
<y:PolyLineEdge>
|
228
|
+
<y:Path sx="37.598876953125" sy="-11.250000000000014" tx="-38.68115234375" ty="-12.0">
|
229
|
+
<y:Point x="85.19775390625" y="-129.5496031746032"/>
|
230
|
+
<y:Point x="105.19775390625" y="-171.96626984126985"/>
|
231
|
+
<y:Point x="603.369384765625" y="-171.96626984126985"/>
|
232
|
+
<y:Point x="638.552978515625" y="-123.58293650793651"/>
|
233
|
+
</y:Path>
|
234
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
235
|
+
<y:Arrows source="none" target="standard"/>
|
236
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="50.921875" x="298.326416015625" y="-51.48306976802766">projects</y:EdgeLabel>
|
237
|
+
<y:BendStyle smoothed="false"/>
|
238
|
+
</y:PolyLineEdge>
|
239
|
+
</data>
|
240
|
+
</edge>
|
241
|
+
<edge id="9" source="6" target="2" label="projects">
|
242
|
+
<data key="d8">
|
243
|
+
<y:PolyLineEdge>
|
244
|
+
<y:Path sx="37.598876953125" sy="11.25" tx="-23.49755859375" ty="3.75">
|
245
|
+
<y:Point x="85.19775390625" y="-107.04960317460318"/>
|
246
|
+
<y:Point x="131.31787109375" y="-82.19960317460317"/>
|
247
|
+
<y:Point x="332.146728515625" y="-82.19960317460317"/>
|
248
|
+
<y:Point x="352.146728515625" y="-68.76626984126985"/>
|
249
|
+
</y:Path>
|
250
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
251
|
+
<y:Arrows source="none" target="standard"/>
|
252
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="50.921875" x="192.084716796875" y="15.783596898639018">projects</y:EdgeLabel>
|
253
|
+
<y:BendStyle smoothed="false"/>
|
254
|
+
</y:PolyLineEdge>
|
255
|
+
</data>
|
256
|
+
</edge>
|
257
|
+
<edge id="10" source="6" target="4" label="projects">
|
258
|
+
<data key="d8">
|
259
|
+
<y:PolyLineEdge>
|
260
|
+
<y:Path sx="37.598876953125" sy="3.75" tx="-31.83837890625" ty="-0.0">
|
261
|
+
<y:Point x="85.19775390625" y="-114.54960317460318"/>
|
262
|
+
<y:Point x="131.31787109375" y="-98.76626984126985"/>
|
263
|
+
</y:Path>
|
264
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
265
|
+
<y:Arrows source="none" target="standard"/>
|
266
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="50.921875" x="98.888671875" y="6.716930231972341">projects</y:EdgeLabel>
|
267
|
+
<y:BendStyle smoothed="false"/>
|
268
|
+
</y:PolyLineEdge>
|
269
|
+
</data>
|
270
|
+
</edge>
|
271
|
+
<edge id="11" source="6" target="5" label="member">
|
272
|
+
<data key="d8">
|
273
|
+
<y:PolyLineEdge>
|
274
|
+
<y:Path sx="37.598876953125" sy="-3.75" tx="-27.109375" ty="-0.0">
|
275
|
+
<y:Point x="85.19775390625" y="-122.04960317460318"/>
|
276
|
+
<y:Point x="105.19775390625" y="-137.8329365079365"/>
|
277
|
+
</y:Path>
|
278
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
279
|
+
<y:Arrows source="none" target="standard"/>
|
280
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="52.240234375" x="30.0" y="-24.849736434694307">member</y:EdgeLabel>
|
281
|
+
<y:BendStyle smoothed="false"/>
|
282
|
+
</y:PolyLineEdge>
|
283
|
+
</data>
|
284
|
+
</edge>
|
285
|
+
<edge id="12" source="5" target="3" label="wrote">
|
286
|
+
<data key="d8">
|
287
|
+
<y:PolyLineEdge>
|
288
|
+
<y:Path sx="27.109375" sy="-10.0" tx="-38.68115234375" ty="-6.0">
|
289
|
+
<y:Point x="236.65673828125" y="-147.8329365079365"/>
|
290
|
+
<y:Point x="292.743408203125" y="-156.8996031746032"/>
|
291
|
+
<y:Point x="603.369384765625" y="-156.8996031746032"/>
|
292
|
+
<y:Point x="638.552978515625" y="-117.58293650793651"/>
|
293
|
+
</y:Path>
|
294
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
295
|
+
<y:Arrows source="none" target="standard"/>
|
296
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="36.701171875" x="230.999755859375" y="-18.1330779060485">wrote</y:EdgeLabel>
|
297
|
+
<y:BendStyle smoothed="false"/>
|
298
|
+
</y:PolyLineEdge>
|
299
|
+
</data>
|
300
|
+
</edge>
|
301
|
+
<edge id="13" source="5" target="2" label="wrote">
|
302
|
+
<data key="d8">
|
303
|
+
<y:PolyLineEdge>
|
304
|
+
<y:Path sx="27.109375" sy="-0.0" tx="-23.49755859375" ty="-11.25">
|
305
|
+
<y:Point x="491.190673828125" y="-137.8329365079365"/>
|
306
|
+
<y:Point x="511.190673828125" y="-83.76626984126985"/>
|
307
|
+
</y:Path>
|
308
|
+
<y:LineStyle color="#000000" type="line" width="1.0"/>
|
309
|
+
<y:Arrows source="none" target="standard"/>
|
310
|
+
<y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="18.1328125" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="true" width="36.701171875" x="153.977783203125" y="-9.066411239381807">wrote</y:EdgeLabel>
|
311
|
+
<y:BendStyle smoothed="false"/>
|
312
|
+
</y:PolyLineEdge>
|
313
|
+
</data>
|
314
|
+
</edge>
|
315
|
+
</graph>
|
316
|
+
<data key="d0">
|
317
|
+
<y:Resources/>
|
318
|
+
</data>
|
319
|
+
</graphml>
|
@@ -0,0 +1,172 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
Run.dex do
|
4
|
+
describe Pacer::DexGraph do
|
5
|
+
let(:v0) { graph.create_vertex }
|
6
|
+
let(:v1) { graph.create_vertex }
|
7
|
+
let(:e0) { graph.create_edge '0', v0, v1, :default }
|
8
|
+
|
9
|
+
describe '#element_type' do
|
10
|
+
context 'invalid' do
|
11
|
+
it { expect { graph.element_type(:nothing) }.to raise_error(ArgumentError) }
|
12
|
+
end
|
13
|
+
|
14
|
+
context ':vertex' do
|
15
|
+
subject { graph.element_type(:vertex) }
|
16
|
+
it { should == com.tinkerpop.blueprints.pgm.impls.dex.DexVertex }
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'a vertex' do
|
20
|
+
subject { graph.element_type(v0) }
|
21
|
+
it { should == com.tinkerpop.blueprints.pgm.impls.dex.DexVertex }
|
22
|
+
end
|
23
|
+
|
24
|
+
context ':edge' do
|
25
|
+
subject { graph.element_type(:edge) }
|
26
|
+
it { should == com.tinkerpop.blueprints.pgm.impls.dex.DexEdge }
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'an edge' do
|
30
|
+
subject { graph.element_type(e0) }
|
31
|
+
it { should == com.tinkerpop.blueprints.pgm.impls.dex.DexEdge }
|
32
|
+
end
|
33
|
+
|
34
|
+
context ':mixed' do
|
35
|
+
subject { graph.element_type(:mixed) }
|
36
|
+
it { should == com.tinkerpop.blueprints.pgm.impls.dex.DexElement }
|
37
|
+
end
|
38
|
+
|
39
|
+
context ':object' do
|
40
|
+
subject { graph.element_type(:object) }
|
41
|
+
it { should == Object }
|
42
|
+
end
|
43
|
+
|
44
|
+
context 'from element_type' do
|
45
|
+
context ':vertex' do
|
46
|
+
subject { graph.element_type(graph.element_type :vertex) }
|
47
|
+
it { should == com.tinkerpop.blueprints.pgm.impls.dex.DexVertex }
|
48
|
+
end
|
49
|
+
|
50
|
+
context ':edge' do
|
51
|
+
subject { graph.element_type(graph.element_type :edge) }
|
52
|
+
it { should == com.tinkerpop.blueprints.pgm.impls.dex.DexEdge }
|
53
|
+
end
|
54
|
+
|
55
|
+
context ':mixed' do
|
56
|
+
subject { graph.element_type(graph.element_type :mixed) }
|
57
|
+
it { should == com.tinkerpop.blueprints.pgm.impls.dex.DexElement }
|
58
|
+
end
|
59
|
+
|
60
|
+
context ':object' do
|
61
|
+
subject { graph.element_type(graph.element_type :object) }
|
62
|
+
it { should == Object }
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
context 'from index_class' do
|
67
|
+
context ':vertex' do
|
68
|
+
subject { graph.element_type(graph.index_class :vertex) }
|
69
|
+
it { should == com.tinkerpop.blueprints.pgm.impls.dex.DexVertex }
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
describe '#indices' do
|
75
|
+
subject { graph.indices.to_a }
|
76
|
+
it { should_not be_empty }
|
77
|
+
end
|
78
|
+
|
79
|
+
describe '#sanitize_properties' do
|
80
|
+
let(:original) do
|
81
|
+
{ :string => ' bob ',
|
82
|
+
:symbol => :abba,
|
83
|
+
:empty => '',
|
84
|
+
:integer => 121,
|
85
|
+
:float => 100.001,
|
86
|
+
:time => Time.utc(1999, 11, 9, 9, 9, 1),
|
87
|
+
:object => { :a => 1, 1 => :a },
|
88
|
+
99 => 'numeric key',
|
89
|
+
'string key' => 'string value'
|
90
|
+
}
|
91
|
+
end
|
92
|
+
|
93
|
+
subject { graph.sanitize_properties original }
|
94
|
+
|
95
|
+
it { should_not equal(original) }
|
96
|
+
specify 'original should be unchanged' do
|
97
|
+
original.should == {
|
98
|
+
:string => ' bob ',
|
99
|
+
:symbol => :abba,
|
100
|
+
:empty => '',
|
101
|
+
:integer => 121,
|
102
|
+
:float => 100.001,
|
103
|
+
:time => Time.utc(1999, 11, 9, 9, 9, 1),
|
104
|
+
:object => { :a => 1, 1 => :a },
|
105
|
+
99 => 'numeric key',
|
106
|
+
'string key' => 'string value'
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
specify 'string should be stripped' do
|
111
|
+
subject[:string].should == 'bob'
|
112
|
+
end
|
113
|
+
|
114
|
+
specify 'empty string becomes nil' do
|
115
|
+
subject[:empty].should be_nil
|
116
|
+
end
|
117
|
+
|
118
|
+
specify 'numbers should be javafied' do
|
119
|
+
subject[:integer].should == 121.to_java(:int)
|
120
|
+
subject[:float].should == 100.001
|
121
|
+
end
|
122
|
+
|
123
|
+
specify 'everything else should be yaml' do
|
124
|
+
subject[:time].should == YAML.dump(Time.utc(1999, 11, 9, 9, 9, 1))
|
125
|
+
end
|
126
|
+
|
127
|
+
its(:keys) { should == original.keys }
|
128
|
+
end
|
129
|
+
|
130
|
+
describe '#in_vertex' do
|
131
|
+
it 'should wrap the vertex' do
|
132
|
+
v = e0.in_vertex(Tackle::SimpleMixin)
|
133
|
+
v.should == v1
|
134
|
+
v.extensions.should include(Tackle::SimpleMixin)
|
135
|
+
end
|
136
|
+
|
137
|
+
it 'should wrap the vertex 2' do
|
138
|
+
v = e0.in_vertex([Tackle::SimpleMixin])
|
139
|
+
v.should == v1
|
140
|
+
v.extensions.should include(Tackle::SimpleMixin)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
describe '#out_vertex' do
|
145
|
+
it 'should wrap the vertex' do
|
146
|
+
v = e0.out_vertex(Tackle::SimpleMixin)
|
147
|
+
v.should == v0
|
148
|
+
v.extensions.should include(Tackle::SimpleMixin)
|
149
|
+
end
|
150
|
+
|
151
|
+
it 'should wrap the vertex 2' do
|
152
|
+
v = e0.out_vertex([Tackle::SimpleMixin])
|
153
|
+
v.should == v0
|
154
|
+
v.extensions.should include(Tackle::SimpleMixin)
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
describe '#get_vertices' do
|
159
|
+
before { e0 }
|
160
|
+
subject { graph.get_vertices }
|
161
|
+
it { should be_a(Pacer::Core::Route) }
|
162
|
+
its(:count) { should == 2 }
|
163
|
+
end
|
164
|
+
|
165
|
+
describe '#get_edges' do
|
166
|
+
before { e0 }
|
167
|
+
subject { graph.get_edges }
|
168
|
+
it { should be_a(Pacer::Core::Route) }
|
169
|
+
its(:count) { should == 1 }
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|