org.semwebcentral.sweetrules.sweetjess
Class SweetJessNameHelper

java.lang.Object
  extended byorg.semwebcentral.sweetrules.sweetjess.SweetJessNameHelper

public final class SweetJessNameHelper
extends java.lang.Object

Created on Nov 13, 2004 Helper class to maintain and get autoincremented labels and constants like rulebase direction for SweetJess

Author:
Shashidhara K Ganjugunte, Dr. Benjamin Grosof, Dr. Said Tabet, Chitravanu Neogy

Field Summary
private  java.lang.String DEFAULT_RULEBASE_DIRECTION
          Sets the rulebase direction
private static SweetJessNameHelper nameHelper
          The singleton object
private  java.lang.String RULE_BASE_LABEL_PREFIX
          Prefix for the Rule base
private  java.lang.String RULE_LABEL_PREFIX
          Prefix for the Rule label
private  java.math.BigInteger ruleBaseLabelCount
          Count of the rule base labels
private  java.math.BigInteger ruleLabelCount
          Count of rule labels
 
Constructor Summary
private SweetJessNameHelper()
          Constructor for the singleton class
 
Method Summary
static SweetJessNameHelper getInstance()
          Accessor for singleton
 java.lang.String getNextRuleLabel()
          Method to get the next rule label
 void setDirection(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RulebaseType rb)
          Sets the direction of the rulebase to "forward"
 void setNextRuleBaseLabel(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RulebaseType ruleBase)
          Sets the label of the rulebase by appending the the value of an autoincrement counter to a label prefix
 void setRuleLabel(java.lang.String ruleLabel, org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.ImpType imp)
          Sets the rulelabel for a given imp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ruleBaseLabelCount

private java.math.BigInteger ruleBaseLabelCount
Count of the rule base labels


ruleLabelCount

private java.math.BigInteger ruleLabelCount
Count of rule labels


DEFAULT_RULEBASE_DIRECTION

private final java.lang.String DEFAULT_RULEBASE_DIRECTION
Sets the rulebase direction

See Also:
Constant Field Values

RULE_LABEL_PREFIX

private final java.lang.String RULE_LABEL_PREFIX
Prefix for the Rule label

See Also:
Constant Field Values

RULE_BASE_LABEL_PREFIX

private final java.lang.String RULE_BASE_LABEL_PREFIX
Prefix for the Rule base

See Also:
Constant Field Values

nameHelper

private static SweetJessNameHelper nameHelper
The singleton object

Constructor Detail

SweetJessNameHelper

private SweetJessNameHelper()
Constructor for the singleton class

Method Detail

getInstance

public static SweetJessNameHelper getInstance()
Accessor for singleton

Returns:
The singleton object

setNextRuleBaseLabel

public void setNextRuleBaseLabel(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RulebaseType ruleBase)
Sets the label of the rulebase by appending the the value of an autoincrement counter to a label prefix

Parameters:
ruleBase - The rulebase on which to set the label

setDirection

public void setDirection(org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.RulebaseType rb)
Sets the direction of the rulebase to "forward"

Parameters:
rb - The rulebase to set the direction on

setRuleLabel

public void setRuleLabel(java.lang.String ruleLabel,
                         org.semwebcentral.sweetrules.ruleml.sweetrulemlobjectmodel.ImpType imp)
Sets the rulelabel for a given imp

Parameters:
ruleLabel - The label of the rule
imp - The imp for which the label is to be set

getNextRuleLabel

public java.lang.String getNextRuleLabel()
Method to get the next rule label

Returns:
The next rule label