-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
Rule.java
829 lines (698 loc) · 25.5 KB
/
Rule.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
/*
* Copyright 2005 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.drools.rule;
import org.drools.WorkingMemory;
import org.drools.base.EnabledBoolean;
import org.drools.base.SalienceInteger;
import org.drools.io.Resource;
import org.drools.reteoo.RuleTerminalNode;
import org.drools.spi.AgendaGroup;
import org.drools.spi.CompiledInvoker;
import org.drools.spi.Consequence;
import org.drools.spi.Constraint;
import org.drools.spi.Enabled;
import org.drools.spi.Salience;
import org.drools.spi.Tuple;
import org.drools.spi.Wireable;
import org.drools.time.impl.Timer;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* A <code>Rule</code> contains a set of <code>Test</code>s and a
* <code>Consequence</code>.
* <p>
* The <code>Test</code>s describe the circumstances that representrepresent
* a match for this rule. The <code>Consequence</code> gets fired when the
* Conditions match.
*/
public class Rule
implements
Externalizable,
Wireable,
Dialectable,
org.drools.definition.rule.Rule,
org.drools.definition.rule.Query {
private static final long serialVersionUID = 510l;
public static final String DEFAULT_CONSEQUENCE_NAME = "default";
/** */
// ------------------------------------------------------------
// Instance members
// ------------------------------------------------------------
/** The parent pkg */
private String pkg;
/** Name of the rule. */
private String name;
/** Parent Rule Name, optional */
private Rule parent;
/** Salience value. */
private Salience salience;
private int runLevel;
/** The Rule is dirty after patterns have been added */
private boolean dirty;
private Map<String, Declaration> declarations;
private Map<String, String[]> requiredDeclarations = new HashMap<String, String[]>();
private GroupElement lhsRoot;
private String dialect;
private String agendaGroup;
private Map<String, Object> metaAttributes;
/** Consequence. */
private Consequence consequence;
private Map<String, Consequence> namedConsequence;
/** Timer semantics that controls the firing of a rule */
private Timer timer;
/** Load order in Package */
private long loadOrder;
/** Is recursion of this rule allowed */
private boolean noLoop;
/** makes the rule's much the current focus */
private boolean autoFocus;
private String activationGroup;
private String ruleFlowGroup;
private boolean lockOnActive;
private boolean hasLogicalDependency;
/** indicates that the rule is semantically correct. */
private boolean semanticallyValid;
private String[] calendars;
private Calendar dateEffective;
private Calendar dateExpires;
private Enabled enabled;
private Resource resource;
protected String activationListener;
private ConsequenceMetaData consequenceMetaData = new ConsequenceMetaData();
public void writeExternal(ObjectOutput out) throws IOException {
out.writeObject( pkg );
out.writeObject( name );
out.writeObject( parent );
out.writeObject( salience );
out.writeInt( runLevel );
out.writeBoolean( dirty );
out.writeObject( declarations );
out.writeObject( lhsRoot );
out.writeObject( dialect );
out.writeObject( agendaGroup );
out.writeObject( metaAttributes );
out.writeObject( requiredDeclarations );
if ( this.consequence instanceof CompiledInvoker ) {
out.writeObject( null );
out.writeObject( null );
} else {
out.writeObject( this.consequence );
out.writeObject( this.namedConsequence );
}
out.writeObject( timer );
out.writeLong( loadOrder );
out.writeBoolean( noLoop );
out.writeBoolean( autoFocus );
out.writeObject( activationGroup );
out.writeObject( ruleFlowGroup );
out.writeBoolean( lockOnActive );
out.writeBoolean( hasLogicalDependency );
out.writeBoolean( semanticallyValid );
out.writeObject( dateEffective );
out.writeObject( dateExpires );
out.writeObject( enabled );
out.writeObject( resource );
out.writeObject( activationListener );
out.writeObject( consequenceMetaData );
}
@SuppressWarnings("unchecked")
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
pkg = (String) in.readObject();
name = (String) in.readObject();
parent = (Rule) in.readObject();
salience = (Salience) in.readObject();
runLevel = in.readInt();
dirty = in.readBoolean();
declarations = (Map<String, Declaration>) in.readObject();
lhsRoot = (GroupElement) in.readObject();
dialect = (String) in.readObject();
agendaGroup = (String) in.readObject();
metaAttributes = (Map<String, Object>) in.readObject();
requiredDeclarations = (Map<String, String[]>) in.readObject();
consequence = (Consequence) in.readObject();
namedConsequence = (Map<String, Consequence>) in.readObject();
timer = (Timer) in.readObject();
loadOrder = in.readLong();
noLoop = in.readBoolean();
autoFocus = in.readBoolean();
activationGroup = (String) in.readObject();
ruleFlowGroup = (String) in.readObject();
lockOnActive = in.readBoolean();
hasLogicalDependency = in.readBoolean();
semanticallyValid = in.readBoolean();
dateEffective = (Calendar) in.readObject();
dateExpires = (Calendar) in.readObject();
enabled = (Enabled) in.readObject();
resource = (Resource) in.readObject();
activationListener = ( String ) in.readObject();
consequenceMetaData = ( ConsequenceMetaData ) in.readObject();
}
// ------------------------------------------------------------
// Constructors
// ------------------------------------------------------------
public Rule() {
}
/**
* Construct a
* <code>Rule<code> with the given name for the specified pkg parent
*
* @param name
* The name of this rule.
*/
public Rule(final String name,
final String pkg,
final String agendaGroup) {
this.name = name;
this.pkg = pkg;
this.agendaGroup = agendaGroup == null ? AgendaGroup.MAIN : agendaGroup;
this.lhsRoot = GroupElementFactory.newAndInstance();
this.semanticallyValid = true;
this.enabled = EnabledBoolean.ENABLED_TRUE;
this.salience = SalienceInteger.DEFAULT_SALIENCE;
this.runLevel = 1;
this.metaAttributes = new HashMap<String, Object>();
setActivationListener( "agenda" );
}
/**
* Construct a
* <code>Rule<code> with the given name for the specified pkg parent
*
* @param name
* The name of this rule.
*/
public Rule(final String name,
final String agendaGroup) {
this( name,
null,
agendaGroup );
}
public Rule(final String name) {
this( name,
null,
AgendaGroup.MAIN );
}
public Resource getResource() {
return resource;
}
public void setResource(Resource resource) {
this.resource = resource;
}
public String getDialect() {
return dialect;
}
public void setDialect(String dialect) {
this.dialect = dialect;
}
/**
* Returns the Timer semantics for a rule. Timer based rules are not added directly to the Agenda
* instead they are scheduled for Agenda addition, based on the timer.
* @return
*/
public Timer getTimer() {
return timer;
}
/**
* Sets the timer semantics for a rule. Timer based rules are not added directly to the Agenda
* instead they are scheduled for Agenda addition, based on the timer.
* @param timer
*/
public void setTimer(Timer timer) {
this.timer = timer;
}
/**
* Determine if this rule is internally consistent and valid.
* This will include checks to make sure the rules semantic components (actions and predicates)
* are valid.
*
* No exception is thrown.
* <p>
* A <code>Rule</code> must include at least one parameter declaration and
* one condition.
* </p>
*
* @return <code>true</code> if this rule is valid, else
* <code>false</code>.
*/
public boolean isValid() {
//if ( this.patterns.size() == 0 ) {
// return false;
//}
return !(this.consequence == null || !isSemanticallyValid());
}
public String getPackage() {
return this.pkg;
}
public void setPackage(String pkg) {
this.pkg = pkg;
}
public String getPackageName() {
return this.pkg;
}
/**
* Retrieve the name of this rule.
*
* @return The name of this rule.
*/
public String getName() {
return this.name;
}
/**
* Retrieve the <code>Rule</code> salience.
*
* @return The salience.
*/
public Salience getSalience() {
return this.salience;
}
/**
* Set the <code>Rule<code> salience.
*
* @param salience The salience.
*/
public void setSalience(final Salience salience) {
this.salience = salience;
}
public int getRunLevel() {
return runLevel;
}
public void setRunLevel(int level) {
this.runLevel = level;
}
public String getAgendaGroup() {
if ( this.agendaGroup.equals( "" ) ) {
return AgendaGroup.MAIN;
}
return this.agendaGroup;
}
public void setAgendaGroup(final String agendaGroup) {
this.agendaGroup = agendaGroup;
}
public boolean isNoLoop() {
return this.noLoop;
}
/**
* This returns true is the rule is effective.
* If the rule is not effective, it cannot activate.
*
* This uses the dateEffective, dateExpires and enabled flag to decide this.
*/
public boolean isEffective(Tuple tuple,
RuleTerminalNode rtn,
WorkingMemory workingMemory) {
if ( !this.enabled.getValue( tuple,
rtn.getEnabledDeclarations(),
this,
workingMemory ) ) {
return false;
}
if ( this.dateEffective == null && this.dateExpires == null ) {
return true;
} else {
Calendar now = Calendar.getInstance();
now.setTimeInMillis( workingMemory.getSessionClock().getCurrentTime() );
if ( this.dateEffective != null && this.dateExpires != null ) {
return (now.after( this.dateEffective ) && now.before( this.dateExpires ));
} else if ( this.dateEffective != null ) {
return (now.after( this.dateEffective ));
} else {
return (now.before( this.dateExpires ));
}
}
}
public void setNoLoop(final boolean noLoop) {
this.noLoop = noLoop;
}
public boolean getAutoFocus() {
return this.autoFocus;
}
public void setAutoFocus(final boolean autoFocus) {
this.autoFocus = autoFocus;
}
public String getActivationGroup() {
return this.activationGroup;
}
public void setActivationGroup(final String activationGroup) {
this.activationGroup = activationGroup;
}
public String getRuleFlowGroup() {
return this.ruleFlowGroup;
}
public void setRuleFlowGroup(final String ruleFlowGroup) {
this.ruleFlowGroup = ruleFlowGroup;
}
/**
* Retrieve a parameter <code>Declaration</code> by identifier.
*
* @param identifier
* The identifier.
*
* @return The declaration or <code>null</code> if no declaration matches
* the <code>identifier</code>.
*/
@SuppressWarnings("unchecked")
public Declaration getDeclaration(final String identifier) {
if ( this.dirty || (this.declarations == null) ) {
this.declarations = this.getExtendedLhs( this, null ).getOuterDeclarations();
this.dirty = false;
}
return this.declarations.get( identifier );
}
public String[] getRequiredDeclarationsForConsequence(String consequenceName) {
String[] declarations = requiredDeclarations.get(consequenceName);
return declarations != null ? declarations : new String[0];
}
public void setRequiredDeclarationsForConsequence(String consequenceName, String[] requiredDeclarations) {
this.requiredDeclarations.put(consequenceName, requiredDeclarations);
}
/**
* This field is updated at runtime, when the first logical assertion is done. I'm currently not too happy about having this determine at runtime
* but its currently easier than trying to do this at compile time, although eventually this should be changed
* @return
*/
public boolean hasLogicalDependency() {
return this.hasLogicalDependency;
}
public void setHasLogicalDependency(boolean hasLogicalDependency) {
this.hasLogicalDependency = hasLogicalDependency;
}
public boolean isLockOnActive() {
return this.lockOnActive;
}
public void setLockOnActive(final boolean lockOnActive) {
this.lockOnActive = lockOnActive;
}
/**
* Retrieve the set of all <i>root fact object </i> parameter
* <code>Declarations</code>.
*
* @return The Set of <code>Declarations</code> in order which specify the
* <i>root fact objects</i>.
*/
@SuppressWarnings("unchecked")
public Map<String, Declaration> getDeclarations() {
if ( this.dirty || (this.declarations == null) ) {
this.declarations = this.getExtendedLhs( this, null ).getOuterDeclarations();
this.dirty = false;
}
return this.declarations;
}
/**
* Add a pattern to the rule. All patterns are searched for bindings which are then added to the rule
* as declarations
*
* @param element
* The <code>Test</code> to add.
* @throws InvalidRuleException
*/
public void addPattern(final RuleConditionElement element) {
this.dirty = true;
this.lhsRoot.addChild( element );
}
/**
* Retrieve the <code>List</code> of <code>Conditions</code> for this
* rule.
*
* @return The <code>List</code> of <code>Conditions</code>.
*/
public GroupElement getLhs() {
return this.lhsRoot;
}
public void setLhs(final GroupElement lhsRoot) {
this.dirty = true;
this.lhsRoot = lhsRoot;
}
private GroupElement getExtendedLhs(Rule rule,
GroupElement fromChild) {
//combine rules LHS with Parent "Extends"
final GroupElement lhs = rule.lhsRoot.cloneOnlyGroup();
//use the children passed from prior child rules, and combine with current LHS (at the end)
if ( null != fromChild ) {
//Have GroupElement from a child rule, so combine it
lhs.getChildren().addAll( fromChild.getChildren() );
}
//move recursively up the tree
if ( rule.parent != null ) {
return getExtendedLhs( rule.parent,
lhs );
}
//at the top of the tree, return combined LHS
//TODO Merge LHS for performace
return lhs;
}
/**
* Uses the LogicTransformer to process the Rule patters - if no ORs are
* used this will return an array of a single AND element. If there are Ors
* it will return an And element for each possible logic branch. The
* processing uses as a clone of the Rule's patterns, so they are not
* changed.
*
* @return
* @throws InvalidPatternException
*/
public GroupElement[] getTransformedLhs( LogicTransformer transformer ) throws InvalidPatternException {
//Moved to getExtendedLhs --final GroupElement cloned = (GroupElement) this.lhsRoot.clone();
return transformer.transform( getExtendedLhs( this,
null ) );
}
public int getSpecifity() {
return getSpecifity( this.lhsRoot );
}
private int getSpecifity(final GroupElement ce) {
int specificity = 0;
for (final RuleConditionElement object : ce.getChildren()) {
if (object instanceof Pattern) {
specificity += getSpecifity((Pattern) object);
} else if (object instanceof GroupElement) {
specificity += getSpecifity((GroupElement) object);
}
}
return specificity;
}
private int getSpecifity(final Pattern pattern) {
int specificity = 0;
for (Constraint constraint : pattern.getConstraints()) {
if (!(constraint instanceof Declaration)) {
specificity++;
}
}
return specificity;
}
public void wire(Object object) {
if ( object instanceof Salience ) {
setSalience( (Salience) object );
} else if ( object instanceof Enabled ) {
setEnabled( (Enabled) object );
} else if ( object instanceof Consequence ) {
Consequence c = (Consequence) object;
if ( DEFAULT_CONSEQUENCE_NAME.equals( c.getName() ) ) {
setConsequence( c );
} else {
addNamedConsequence(c.getName(), c);
}
}
}
/**
* Set the <code>Consequence</code> that is associated with the successful
* match of this rule.
*
* @param consequence
* The <code>Consequence</code> to attach to this
* <code>Rule</code>.
*/
public void setConsequence(final Consequence consequence) {
this.consequence = consequence;
}
/**
* Retrieve the <code>Consequence</code> associated with this
* <code>Rule</code>.
*
* @return The <code>Consequence</code>.
*/
public Consequence getConsequence() {
return this.consequence;
}
public boolean hasNamedConsequences() {
return namedConsequence != null && !namedConsequence.isEmpty();
}
public Map<String, Consequence> getNamedConsequences() {
return this.namedConsequence;
}
public Consequence getNamedConsequence(String consequenceName) {
return this.namedConsequence.get(consequenceName);
}
public void addNamedConsequence(String name, Consequence consequence) {
if ( this.namedConsequence == null ) {
this.namedConsequence = new HashMap<String, Consequence>();
}
this.namedConsequence.put(name, consequence);
}
public long getLoadOrder() {
return this.loadOrder;
}
public void setLoadOrder(final long loadOrder) {
this.loadOrder = loadOrder;
}
public String toString() {
return "[Rule name=" + this.name + ", agendaGroup=" + this.agendaGroup + ", salience=" + this.salience + ", no-loop=" + this.noLoop + "]";
}
public int hashCode() {
final int PRIME = 31;
int result = 1;
result = PRIME * result + ((name == null) ? 0 : name.hashCode());
result = PRIME * result + ((pkg == null) ? 0 : pkg.hashCode());
return result;
}
public boolean equals(Object obj) {
if ( this == obj ) return true;
if ( obj == null || getClass() != obj.getClass() ) return false;
final Rule other = (Rule) obj;
if ( name == null ) {
if ( other.name != null ) return false;
} else if ( !name.equals( other.name ) ) return false;
if ( pkg == null ) {
if ( other.pkg != null ) return false;
} else if ( !pkg.equals( other.pkg ) ) return false;
return true;
}
public void setSemanticallyValid(final boolean valid) {
this.semanticallyValid = valid;
}
/**
* This will return if the semantic actions or predicates in the rules
* are valid.
* This is provided so that lists of rules can be provided even if their semantic actions
* do not "compile" etc.
*/
public boolean isSemanticallyValid() {
return this.semanticallyValid;
}
public String[] getCalendars() {
return calendars;
}
public void setCalendars(String[] calendars) {
this.calendars = calendars;
}
/**
* Sets the date from which this rule takes effect (can include time to the millisecond).
* @param effectiveDate
*/
public void setDateEffective(final Calendar effectiveDate) {
this.dateEffective = effectiveDate;
}
/**
* Sets the date after which the rule will no longer apply (can include time to the millisecond).
* @param expiresDate
*/
public void setDateExpires(final Calendar expiresDate) {
this.dateExpires = expiresDate;
}
public Calendar getDateEffective() {
return this.dateEffective;
}
public Calendar getDateExpires() {
return this.dateExpires;
}
/**
* A rule is enabled by default. This can explicitly disable it in which case it will never activate.
*/
public void setEnabled(final Enabled b) {
this.enabled = b;
}
public Enabled getEnabled() {
return enabled;
}
public boolean isEnabled(Tuple tuple,
RuleTerminalNode rtn,
WorkingMemory workingMemory) {
return this.enabled.getValue( tuple,
rtn.getEnabledDeclarations(),
this,
workingMemory );
}
public void addMetaAttribute(String key,
Object value) {
this.metaAttributes.put( key,
value );
}
public String getActivationListener() {
return activationListener;
}
public void setActivationListener(String activationListener) {
this.activationListener = activationListener;
}
public Map<String, Object> getMetaData() {
return Collections.unmodifiableMap( metaAttributes );
}
@Deprecated
public Map<String, Object> getMetaAttributes() {
return Collections.unmodifiableMap( metaAttributes );
}
@Deprecated
public String getMetaAttribute(final String identifier) {
return this.metaAttributes.get( identifier ).toString();
}
@Deprecated
public Collection<String> listMetaAttributes() {
return this.metaAttributes.keySet();
}
public void setParent(Rule parent) {
this.parent = parent;
}
public Rule getParent() {
return parent;
}
public static java.util.List getMethodBytecode(Class cls, String ruleClassName, String packageName, String methodName, String resource) {
org.drools.core.util.asm.MethodComparator.Tracer visit = new org.drools.core.util.asm.MethodComparator.Tracer(methodName);
java.io.InputStream is = cls.getClassLoader().getResourceAsStream( resource );
java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream();
try {
byte[] data = new byte[1024];
int byteCount;
while ( (byteCount = is.read( data,
0,
1024 )) > -1 )
{
bos.write(data, 0, byteCount);
}
} catch ( java.io.IOException e ) {
throw new org.drools.RuntimeDroolsException("Unable getResourceAsStream for Class '" + ruleClassName+ "' ");
}
org.mvel2.asm.ClassReader classReader = new org.mvel2.asm.ClassReader( bos.toByteArray() );
classReader.accept( visit, org.mvel2.asm.ClassReader.SKIP_DEBUG );
org.mvel2.asm.util.TraceMethodVisitor trace = visit.getTrace();
return trace.getText();
}
public KnowledgeType getKnowledgeType() {
return KnowledgeType.RULE;
}
public String getNamespace() {
return getPackage();
}
public String getId() {
return getName();
}
public ConsequenceMetaData getConsequenceMetaData() {
return consequenceMetaData;
}
}