activefacts 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,7 @@ describe "Absorption" do
43
43
  #{Prologue}
44
44
  Month is in exactly one Season;
45
45
  },
46
- :tables => { "Month" => [ "MonthValue", "Season" ] }
46
+ :tables => { "Month" => [["Month", "Value"], ["Season"]] }
47
47
  },
48
48
 
49
49
  { :should => "absorb a one-to-one along the identification path",
@@ -101,7 +101,7 @@ describe "CQL Symbol table" do
101
101
  it "should define #{description}" do
102
102
  if result
103
103
  # Predefine an entity type, some cases use it:
104
- @constellation.EntityType("Person", @vocabulary.identifying_role_values)
104
+ @constellation.EntityType(@vocabulary.identifying_role_values, "Person")
105
105
 
106
106
  player, bound = @symbols.bind(*args)
107
107
  player.should_not be_nil
@@ -17,8 +17,8 @@ describe "CQL Dumper" do
17
17
  setup do
18
18
  @constellation = ActiveFacts::API::Constellation.new(ActiveFacts::Metamodel)
19
19
  @vocabulary = @constellation.Vocabulary("TestVocab")
20
- @string_type = @constellation.ValueType("String", @vocabulary)
21
- @integer_type = @constellation.ValueType("Integer", @vocabulary)
20
+ @string_type = @constellation.ValueType(@vocabulary, "String")
21
+ @integer_type = @constellation.ValueType(@vocabulary, "Integer")
22
22
  @dumper = ActiveFacts::Generate::CQL.new(@constellation)
23
23
  end
24
24
 
@@ -30,7 +30,7 @@ describe "CQL Dumper" do
30
30
  end
31
31
 
32
32
  it "should dump a String ValueType" do
33
- vt = @constellation.ValueType("Name", @vocabulary, :supertype => @string_type, :length => 20)
33
+ vt = @constellation.ValueType(@vocabulary, "Name", :supertype => @string_type, :length => 20)
34
34
  vt.supertype = @string_type
35
35
  vt.length = 20
36
36
  #p vt.class.roles.keys.sort_by{|s| s.to_s}
@@ -47,7 +47,7 @@ END
47
47
  end
48
48
 
49
49
  it "should dump an Integer ValueType" do
50
- vt = @constellation.ValueType("Count", @vocabulary, :supertype => @integer_type, :length => 32)
50
+ vt = @constellation.ValueType(@vocabulary, "Count", :supertype => @integer_type, :length => 32)
51
51
  cql.should == <<END
52
52
  vocabulary TestVocab;
53
53
 
@@ -60,8 +60,8 @@ END
60
60
  end
61
61
 
62
62
  def value_type(name, datatype = "String", length = 0, scale = 0)
63
- dt = @constellation.ValueType(datatype, @vocabulary)
64
- vt = @constellation.ValueType(name, @vocabulary, :supertype => dt)
63
+ dt = @constellation.ValueType(@vocabulary, datatype)
64
+ vt = @constellation.ValueType(@vocabulary, name, :supertype => dt)
65
65
  vt.length = length if length != 0
66
66
  vt.scale = scale if scale != 0
67
67
  vt
@@ -143,8 +143,8 @@ END
143
143
  end
144
144
 
145
145
  it "should dump an named EntityType" do
146
- vt = @constellation.ValueType("Name", @vocabulary, :supertype => @string_type, :length => 20)
147
- et = @constellation.EntityType("Company", @vocabulary)
146
+ vt = @constellation.ValueType(@vocabulary, "Name", :supertype => @string_type, :length => 20)
147
+ et = @constellation.EntityType(@vocabulary, "Company")
148
148
 
149
149
  ft = one_to_one(et, vt, "{0} is called {1}")
150
150
 
@@ -19,7 +19,7 @@ include ActiveFacts::Metamodel
19
19
  Exceptions = {
20
20
  "Blog" => ["Author", "Comment", "Paragraph", "Post", "Topic"],
21
21
  "JoinEquality" => ["Event", "Seat", "Ticket", "Venue"],
22
- "Metamodel" => ["AllowedRange", "Constraint", "Correspondence", "Derivation", "Fact", "FactType", "Feature", "Instance", "JoinPath", "Reading", "Role", "RoleRef", "RoleSequence", "RoleValue", "SetComparisonRoles", "Unit", "ValueRestriction"],
22
+ "Metamodel" => ["AllowedRange", "Constraint", "Correspondence", "Derivation", "Fact", "FactType", "Feature", "Instance", "Join", "Reading", "Role", "RoleRef", "RoleSequence", "RoleValue", "SetComparisonRoles", "Unit", "ValueRestriction"],
23
23
  "MetamodelTerms" => ["AllowedValue", "Concept", "Constraint", "Derivation", "Fact", "FactType", "Import", "Instance", "Join", "JoinRole", "ParamValue", "Reading", "Role", "RoleRef", "RoleSequence", "RoleValue", "SetComparisonRoles", "Term", "Unit", "ValueRestriction"],
24
24
  "OilSupply" => ["AcceptableSubstitutes", "Month", "ProductionForecast", "RegionalDemand", "TransportRoute"],
25
25
  "Orienteering" => ["Club", "Entry", "Event", "EventControl", "EventScoringMethod", "Map", "Person", "Punch", "PunchPlacement", "Series", "Visit"],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activefacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clifford Heath
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-23 00:00:00 +11:00
12
+ date: 2009-01-31 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -83,8 +83,11 @@ files:
83
83
  - lib/activefacts/api/constellation.rb
84
84
  - lib/activefacts/api/entity.rb
85
85
  - lib/activefacts/api/instance.rb
86
+ - lib/activefacts/api/instance_index.rb
86
87
  - lib/activefacts/api/numeric.rb
87
88
  - lib/activefacts/api/role.rb
89
+ - lib/activefacts/api/role_proxy.rb
90
+ - lib/activefacts/api/role_values.rb
88
91
  - lib/activefacts/api/standard_types.rb
89
92
  - lib/activefacts/api/support.rb
90
93
  - lib/activefacts/api/value.rb
@@ -112,6 +115,7 @@ files:
112
115
  - lib/activefacts/input/orm.rb
113
116
  - lib/activefacts/persistence.rb
114
117
  - lib/activefacts/persistence/columns.rb
118
+ - lib/activefacts/persistence/concept.rb
115
119
  - lib/activefacts/persistence/foreignkey.rb
116
120
  - lib/activefacts/persistence/index.rb
117
121
  - lib/activefacts/persistence/reference.rb
@@ -174,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
178
  requirements: []
175
179
 
176
180
  rubyforge_project: cjheath@rubyforge.org
177
- rubygems_version: 1.2.0
181
+ rubygems_version: 1.3.1
178
182
  signing_key:
179
183
  specification_version: 2
180
184
  summary: ActiveFacts is a semantic modeling toolkit, comprising an implementation of the Constellation Query Language, the Constellation API, and code generators that receive CQL or ORM (Object Role Modeling files, from NORMA) to emit CQL, Ruby and SQL