AROM-2_2_13

arom.kr.parser.standard
Class AromVariableNode

java.lang.Object
  |
  +--arom.kr.parser.standard.SimpleNode
        |
        +--arom.kr.parser.standard.AromTreeNode
              |
              +--arom.kr.parser.standard.AromDocTreeNode
                    |
                    +--arom.kr.parser.standard.AromSlotNode
                          |
                          +--arom.kr.parser.standard.AromVariableNode
All Implemented Interfaces:
arom.kr.parser.standard.Node

public class AromVariableNode
extends AromSlotNode

AromVariableNode.java This class is the used to represent Arom Variables nodes. It defines the CType associated to this variable as well as other variables facets informations: Default value, unit, attachment.... Created: Fri Sep 14 15:39:01 2001

Author:
Veronique DUPIERRIS

Field Summary
 
Fields inherited from class arom.kr.parser.standard.AromDocTreeNode
DOCUMENTATION_NONE, DOCUMENTATION_TEXT, DOCUMENTATION_URL
 
Constructor Summary
AromVariableNode(int id)
           
AromVariableNode(arom.kr.parser.standard.StandardParser p, int id)
           
 
Method Summary
 Object childrenAccept(arom.kr.parser.standard.StandardParserVisitor visitor, Object data)
           
 boolean createAttachment()
          Return true if the attachment method name should be created or not.
 void dump(String prefix)
           
 String getAttachmentClassName()
          Get the class name to run for attachment.
 String getAttachmentMethodName()
          Get the method name to run for attachment.
 Integer[] getCard()
          Get the bounds of the represented variable's cardinality.
 Object getDefault()
          Get the default value associated to the represented variable.
 CType getSlotType()
          Get the CType of the represented variable.
 boolean isCTypeListType()
          Return true if the variable CType is a ListCT that should be constructed on Top DeltaType of the specified CType.
 boolean isTypeSet()
          Return true if a CType has been set for the variable represented by this node.
 boolean isTypeSetType()
          Return true if the variable CType is a SetCT that should be constructed on Top DeltaType of the specified CType.
 Object jjtAccept(arom.kr.parser.standard.StandardParserVisitor visitor, Object data)
           
 void setAttachmentClassName(String attachmentClass)
          Set the names of the class to execute to run attachment
 void setAttachmentMethodName(String attachmentMethod)
          Set the names of the method to execute to run attachment
 void setCard(Integer minCard, Integer maxCard)
          Set the bounds value of the represented variable cardinality.
 void setCreateAttachment(Boolean v)
          Specify if the method to call for attachment should be created using AromClass and variable names.
 void setDefault(Object defValue)
          Set the default value of the represented variable.
 void setListType(boolean isList)
          Store information that the variable's CType is a ListCType or not.
 void setSetType(boolean isSet)
          Store information that the variable's CType is a SetCType or not.
 void setSlotType(CType slotType)
          Set the CType of the represented variable.
 String toString()
           
 
Methods inherited from class arom.kr.parser.standard.AromSlotNode
getDomain, getDomainType, getTypeName, setDomain, setDomainType, setTypeName
 
Methods inherited from class arom.kr.parser.standard.AromDocTreeNode
getDocumentation, getDocumentationType, setDocumentation
 
Methods inherited from class arom.kr.parser.standard.AromTreeNode
getName, setName
 
Methods inherited from class arom.kr.parser.standard.SimpleNode
jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AromVariableNode

public AromVariableNode(int id)

AromVariableNode

public AromVariableNode(arom.kr.parser.standard.StandardParser p,
                        int id)
Method Detail

setSlotType

public void setSlotType(CType slotType)
Set the CType of the represented variable.

Parameters:
slotType - the CType value to associate to the variable.

isTypeSet

public boolean isTypeSet()
Return true if a CType has been set for the variable represented by this node.

Returns:
true if a CType has been set for this varaible, false otherwise.

getSlotType

public CType getSlotType()
Get the CType of the represented variable.

Returns:
the variable CType or null if none was set or if specified CType is unknown.

isCTypeListType

public boolean isCTypeListType()
Return true if the variable CType is a ListCT that should be constructed on Top DeltaType of the specified CType.

Returns:
true if the variable CType is a ListCT.

setListType

public void setListType(boolean isList)
Store information that the variable's CType is a ListCType or not.

Parameters:
isList - is true is the variable's CType is a List CType

isTypeSetType

public boolean isTypeSetType()
Return true if the variable CType is a SetCT that should be constructed on Top DeltaType of the specified CType.

Returns:
true if the variable CType is a SetCT.

setSetType

public void setSetType(boolean isSet)
Store information that the variable's CType is a SetCType or not.

Parameters:
isSet - is true is the variable's CType is a Set CType

getDefault

public Object getDefault()
Get the default value associated to the represented variable.

Returns:
the variable's default value.

setDefault

public void setDefault(Object defValue)
Set the default value of the represented variable.

Parameters:
defValue - the variable's default value.

createAttachment

public boolean createAttachment()
Return true if the attachment method name should be created or not.

Returns:
if true if the name of the Java Class and associated method should be created usong AromClass and Variable name.

setCreateAttachment

public void setCreateAttachment(Boolean v)
Specify if the method to call for attachment should be created using AromClass and variable names.


setAttachmentClassName

public void setAttachmentClassName(String attachmentClass)
Set the names of the class to execute to run attachment


getAttachmentClassName

public String getAttachmentClassName()
Get the class name to run for attachment.

Returns:
the class name of the attachment

setAttachmentMethodName

public void setAttachmentMethodName(String attachmentMethod)
Set the names of the method to execute to run attachment


getAttachmentMethodName

public String getAttachmentMethodName()
Get the method name to run for attachment.

Returns:
the method name of the attachment

getCard

public Integer[] getCard()
Get the bounds of the represented variable's cardinality.

Returns:
both the lower bound and the upper bound of the variable's cardinality.

setCard

public void setCard(Integer minCard,
                    Integer maxCard)
             throws arom.kr.parser.standard.ParseException
Set the bounds value of the represented variable cardinality.

arom.kr.parser.standard.ParseException

toString

public String toString()
Overrides:
toString in class AromSlotNode

dump

public void dump(String prefix)
Overrides:
dump in class AromSlotNode

jjtAccept

public Object jjtAccept(arom.kr.parser.standard.StandardParserVisitor visitor,
                        Object data)
Specified by:
jjtAccept in interface arom.kr.parser.standard.Node
Overrides:
jjtAccept in class AromSlotNode

childrenAccept

public Object childrenAccept(arom.kr.parser.standard.StandardParserVisitor visitor,
                             Object data)
Overrides:
childrenAccept in class AromSlotNode

AROM-2_2_13