[jboss-svn-commits] JBL Code SVN: r14621 - labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/brms/client/modeldriven/brl.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Aug 27 00:03:19 EDT 2007
Author: michael.neale at jboss.com
Date: 2007-08-27 00:03:19 -0400 (Mon, 27 Aug 2007)
New Revision: 14621
Modified:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/brms/client/modeldriven/brl/RuleModel.java
Log:
comment change
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/brms/client/modeldriven/brl/RuleModel.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/brms/client/modeldriven/brl/RuleModel.java 2007-08-27 03:23:56 UTC (rev 14620)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/brms/client/modeldriven/brl/RuleModel.java 2007-08-27 04:03:19 UTC (rev 14621)
@@ -7,6 +7,10 @@
implements
PortableObject {
+ /**
+ * This name is generally not used - the asset name or the
+ * file name is preferred (ie it could get out of sync with the name of the file it is in).
+ */
public String name;
public String modelVersion = "1.0";
@@ -16,10 +20,10 @@
public IAction[] rhs = new IAction[0];
/**
- * This will return the fact pattern that a variable is bound to.
- *
+ * This will return the fact pattern that a variable is bound to.
+ *
* @param var The bound fact variable (NOT bound field).
- * @return null or the FactPattern found.
+ * @return null or the FactPattern found.
*/
public FactPattern getBoundFact(final String var) {
if ( this.lhs == null ) {
@@ -58,9 +62,9 @@
}
/**
- *
+ *
* @param idx Remove this index from the LHS.
- * @param Returns false if it was NOT allowed to remove this item (ie
+ * @param Returns false if it was NOT allowed to remove this item (ie
* it is used on the RHS).
*/
public boolean removeLhsItem(final int idx) {
@@ -187,7 +191,7 @@
}
/**
- * This uses a deceptively simple algorithm to determine
+ * This uses a deceptively simple algorithm to determine
* what bound variables are in scope for a given constraint (including connectives).
* Does not take into account globals.
*/
@@ -234,7 +238,7 @@
}
return result;
}
-
+
/**
* This will get a list of all bound variables, including bound fields.
*/
@@ -247,7 +251,7 @@
if (fact.isBound()) {
result.add( fact.boundName );
}
-
+
for ( int j = 0; j < fact.getFieldConstraints().length; j++ ) {
FieldConstraint fc = fact.getFieldConstraints()[j];
if (fc instanceof SingleFieldConstraint) {
@@ -257,13 +261,13 @@
}
}
}
- }
+ }
}
return result;
}
/**
- * Checks to see if a variable is used or not, includes fields
+ * Checks to see if a variable is used or not, includes fields
* as well as facts.
*/
public boolean isVariableNameUsed(String s) {
@@ -274,7 +278,7 @@
* Returns true if any DSLSentences are used.
*/
public boolean hasDSLSentences() {
-
+
if (this.lhs != null) {
for ( int i = 0; i < this.lhs.length; i++ ) {
if ( lhs[i] instanceof DSLSentence ) {
@@ -282,7 +286,7 @@
}
}
}
-
+
if (this.rhs != null) {
for ( int i = 0; i < this.rhs.length; i++ ) {
if ( rhs[i] instanceof DSLSentence ) {
@@ -290,7 +294,7 @@
}
}
}
-
+
return false;
}
More information about the jboss-svn-commits
mailing list