org.biomage.tools.generate_classes
Class CreateFile.AssociationAttrInformation

java.lang.Object
  extended by org.biomage.tools.generate_classes.CreateFile.AttrInformation
      extended by org.biomage.tools.generate_classes.CreateFile.AssociationAttrInformation
Direct Known Subclasses:
CreateFile.IdentifierAttrInformation
Enclosing class:
CreateFile

public class CreateFile.AssociationAttrInformation
extends CreateFile.AttrInformation

Description: Inner class to hold association attribute information. Checks to see if the association is a multivalued and adjusts the information accordingly.


Field Summary
protected  boolean isOrdered
           
protected  boolean isOwner
           
protected  int maxCard
           
protected  int minCard
           
protected  java.lang.String originalType
           
protected  boolean otherNav
           
protected  boolean pointsToIdentifiable
           
protected  java.lang.Integer rank
           
protected  int thisMaxCard
           
protected  int thisMinCard
           
protected  boolean thisNav
           
protected  int typeAggregate
           
 
Constructor Summary
  CreateFile.AssociationAttrInformation(CreateFile.AssociationAttrInformation assn, java.lang.Integer rank)
          Description: C'tor for class.
  CreateFile.AssociationAttrInformation(CreateFile.AssociationAttrInformation assn, java.lang.Integer rank, int minCard, int maxCard, int thisMinCard, int thisMaxCard, boolean thisNav, boolean otherNav)
          Description: C'tor for class.
protected CreateFile.AssociationAttrInformation(java.lang.String name, java.lang.String scope, java.lang.String datatype, java.lang.String comment, int minCard, int maxCard, int thisMinCard, int thisMaxCard, int typeAggregate, boolean isOrdered, java.lang.Integer rank, boolean isOwner, boolean pointsToIdentifiable, boolean thisNav, boolean otherNav)
          Description: C'tor for class.
 
Method Summary
 boolean getIsOrdered()
          Description: Get method for isOrdered.
 int getMaxCard()
          Description: Get method for maxCard.
 int getMinCard()
          Description: Get method for minCard.
 java.lang.String getOriginalType()
          Description: Get method for originalType.
 boolean getOtherNav()
          Description: Get method for otherNav.
 java.lang.Integer getRank()
          Description: Get rank of this assocaition to the others.
 int getThisMaxCard()
          Description: Get method for thisMaxCard.
 int getThisMinCard()
          Description: Get method for thisMinCard.
 boolean getThisNav()
          Description: Get method for thisNav.
 int getTypeAggregated()
          Description: Get method for type of aggregated.
protected  void initialize(int minCard, int maxCard, int thisMinCard, int thisMaxCard, int typeAggregate, boolean isOrdered, java.lang.Integer rank, boolean isOwner, boolean pointsToIdentifiable, boolean thisNav, boolean otherNav)
          Description: Initializer for class.
 boolean isOwner()
          Description: Returns whether this associations end class owns this class.
 void makeOptional()
          Description: Writes the name of the association role, capitulized.
 boolean pointsToIdentifiableClass()
          Description: Does this association point to an Identifiable class? This is a necessary question for the cPP code generation as that changes the container used underneath.
 java.lang.String toString()
          Description: Writes the name of the association role, capitulized.
 
Methods inherited from class org.biomage.tools.generate_classes.CreateFile.AttrInformation
getComment, getDatatype, getEnumValues, getName, getScope, initialize, isEnum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

minCard

protected int minCard

maxCard

protected int maxCard

thisMinCard

protected int thisMinCard

thisMaxCard

protected int thisMaxCard

thisNav

protected boolean thisNav

otherNav

protected boolean otherNav

typeAggregate

protected int typeAggregate

isOrdered

protected boolean isOrdered

originalType

protected java.lang.String originalType

rank

protected java.lang.Integer rank

isOwner

protected boolean isOwner

pointsToIdentifiable

protected boolean pointsToIdentifiable
Constructor Detail

CreateFile.AssociationAttrInformation

protected CreateFile.AssociationAttrInformation(java.lang.String name,
                                                java.lang.String scope,
                                                java.lang.String datatype,
                                                java.lang.String comment,
                                                int minCard,
                                                int maxCard,
                                                int thisMinCard,
                                                int thisMaxCard,
                                                int typeAggregate,
                                                boolean isOrdered,
                                                java.lang.Integer rank,
                                                boolean isOwner,
                                                boolean pointsToIdentifiable,
                                                boolean thisNav,
                                                boolean otherNav)
                                         throws java.lang.Exception
Description: C'tor for class.

Parameters:
name: - name of the attribute.
scope: - visibility of the attribute.
datatype: - datatype or enumeration values.
comment: - optional comment.
minCard: - the minimum number of objects for this association allowed for it to be valid.
maxCard: - the maximum number of objects for this association allowed for it to be valid.
thisMinCard: - the minimum number of objects for this association allowed for it to be valid.
thisMaxCard: - the maximum number of objects for this association allowed for it to be valid.
typeAggregate: - type of the aggregation.
isOrdered: - true if order is important.
rank: - the place this association fits in assocaition order.
isOwner: - whether the association end class owns this class.

Throws:
java.lang.Exception

CreateFile.AssociationAttrInformation

public CreateFile.AssociationAttrInformation(CreateFile.AssociationAttrInformation assn,
                                             java.lang.Integer rank)
                                      throws java.lang.Exception
Description: C'tor for class.

Parameters:
assn: - association to use as the basis of this association.
rank: - the place this association fits in assocaition order.

Throws:
java.lang.Exception

CreateFile.AssociationAttrInformation

public CreateFile.AssociationAttrInformation(CreateFile.AssociationAttrInformation assn,
                                             java.lang.Integer rank,
                                             int minCard,
                                             int maxCard,
                                             int thisMinCard,
                                             int thisMaxCard,
                                             boolean thisNav,
                                             boolean otherNav)
                                      throws java.lang.Exception
Description: C'tor for class.

Parameters:
assn: - association to use as the basis of this association.
rank: - the place this association fits in assocaition order.
minCard: - the minimum number of objects for this association allowed for it to be valid.
maxCard: - the maximum number of objects for this association allowed for it to be valid.
thisMinCard: - the minimum number of objects for this association allowed for it to be valid.
thisMaxCard: - the maximum number of objects for this association allowed for it to be valid.

Throws:
java.lang.Exception
Method Detail

initialize

protected void initialize(int minCard,
                          int maxCard,
                          int thisMinCard,
                          int thisMaxCard,
                          int typeAggregate,
                          boolean isOrdered,
                          java.lang.Integer rank,
                          boolean isOwner,
                          boolean pointsToIdentifiable,
                          boolean thisNav,
                          boolean otherNav)
                   throws java.lang.Exception
Description: Initializer for class.

Parameters:
minCard: - the minimum number of objects for this association allowed for it to be valid.
maxCard: - the maximum number of objects for this association allowed for it to be valid.
thisMinCard: - the minimum number of objects for this association allowed for it to be valid.
thisMaxCard: - the maximum number of objects for this association allowed for it to be valid.
typeAggregate: - type of the aggregation.
isOrdered: - true if order is important.
rank: - the place this association fits in assocaition order.
isOwner: - whether the association end class owns this class.

Throws:
java.lang.Exception

getMinCard

public int getMinCard()
               throws java.lang.Exception
Description: Get method for minCard.

Returns:
minCard.

Throws:
java.lang.Exception

getMaxCard

public int getMaxCard()
               throws java.lang.Exception
Description: Get method for maxCard.

Returns:
maxCard.

Throws:
java.lang.Exception

getThisMinCard

public int getThisMinCard()
                   throws java.lang.Exception
Description: Get method for thisMinCard.

Returns:
thisMinCard.

Throws:
java.lang.Exception

getThisMaxCard

public int getThisMaxCard()
                   throws java.lang.Exception
Description: Get method for thisMaxCard.

Returns:
thisMaxCard.

Throws:
java.lang.Exception

getThisNav

public boolean getThisNav()
                   throws java.lang.Exception
Description: Get method for thisNav.

Returns:
thisNav.

Throws:
java.lang.Exception

getOtherNav

public boolean getOtherNav()
                    throws java.lang.Exception
Description: Get method for otherNav.

Returns:
otherNav.

Throws:
java.lang.Exception

getTypeAggregated

public int getTypeAggregated()
                      throws java.lang.Exception
Description: Get method for type of aggregated.

Returns:
typeAggregate.

Throws:
java.lang.Exception

getIsOrdered

public boolean getIsOrdered()
                     throws java.lang.Exception
Description: Get method for isOrdered.

Returns:
isOrdered.

Throws:
java.lang.Exception

getOriginalType

public java.lang.String getOriginalType()
                                 throws java.lang.Exception
Description: Get method for originalType.

Returns:
originalType.

Throws:
java.lang.Exception

getRank

public java.lang.Integer getRank()
                          throws java.lang.Exception
Description: Get rank of this assocaition to the others.

Returns:
the rank.

Throws:
java.lang.Exception

isOwner

public boolean isOwner()
                throws java.lang.Exception
Description: Returns whether this associations end class owns this class. Used for DTD generation to ignore this association in the content list.

Returns:
isOwner.

Throws:
java.lang.Exception

pointsToIdentifiableClass

public boolean pointsToIdentifiableClass()
Description: Does this association point to an Identifiable class? This is a necessary question for the cPP code generation as that changes the container used underneath.

Returns:
pointsToIdentifiable.


toString

public java.lang.String toString()
Description: Writes the name of the association role, capitulized.

Overrides:
toString in class java.lang.Object
Returns:
the name of the association role capitulized.


makeOptional

public void makeOptional()
Description: Writes the name of the association role, capitulized.