com.ptc.edadata
Class DesignVariant

java.lang.Object
  extended bycom.ptc.edadata.DesignVariant

public class DesignVariant
extends Object

Title: DesignVariant

Description: This class defines the behaviors and attributes of design variants.

Copyright: Copyright (c) 2004

Company: PTC


Field Summary
private  ArrayList m_alistColumnNum
           
private  ArrayList m_alistVariantNames
           
private  BOMColumnDef[] m_bomColumnDef
           
private  BOMRow[] m_bomRow
           
private  boolean m_boolVariantExist
           
private  String m_ecadType
           
private  int m_intNumVariants
           
private  BOMListMember m_mainBOM
           
private  String m_strVariantDel
           
private  String m_strVariantExclude
           
private  String m_strVariantInclude
           
private  TreeMap m_treeAll
           
private  TreeMap m_treeExclude
           
private  Vector variantProperties
           
 
Constructor Summary
DesignVariant()
          Default Constructor
DesignVariant(BOMListMember blm, String ecadType)
          Constructs the design variant object
 
Method Summary
private  void createVariantMap()
          This method will map the rows to the values to exclude
 ArrayList getColumnNum()
          This will return a list of the columns that contain variant information
 int getNumVariants()
          This will return the number of variants in the design
 BOMListMember getVariantBOM(String variantName)
          This method will return the variant BOM associated with the variant name
private  void getVariantInfo()
          This will preprocess the main BOM to marshall all the relevant information for any variants associated with this main BOM
 ArrayList getVariantNames()
          This method will return a list of Strings of the variant names
private  boolean isExclude(int column)
          This method determines if these rows for variants are for exclusion
private  boolean isInclude(int column)
          This method determines if these rows for variants are for inclusion
private  void setVariantNames()
          This method will determine and set the variant names for the main BOM
 boolean variantsExist()
          This method will determine if variants exist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_mainBOM

private BOMListMember m_mainBOM

m_ecadType

private String m_ecadType

m_bomColumnDef

private BOMColumnDef[] m_bomColumnDef

m_bomRow

private BOMRow[] m_bomRow

variantProperties

private Vector variantProperties

m_strVariantExclude

private final String m_strVariantExclude

m_strVariantInclude

private final String m_strVariantInclude

m_intNumVariants

private int m_intNumVariants

m_alistColumnNum

private ArrayList m_alistColumnNum

m_alistVariantNames

private ArrayList m_alistVariantNames

m_boolVariantExist

private boolean m_boolVariantExist

m_strVariantDel

private final String m_strVariantDel
See Also:
Constant Field Values

m_treeExclude

private TreeMap m_treeExclude

m_treeAll

private TreeMap m_treeAll
Constructor Detail

DesignVariant

public DesignVariant()
Default Constructor


DesignVariant

public DesignVariant(BOMListMember blm,
                     String ecadType)
              throws org.apache.regexp.RESyntaxException
Constructs the design variant object

Parameters:
blm - BOMListMember The main design
ecadType - String The ecad type of design
Method Detail

getVariantInfo

private void getVariantInfo()
                     throws org.apache.regexp.RESyntaxException
This will preprocess the main BOM to marshall all the relevant information for any variants associated with this main BOM

Throws:
org.apache.regexp.RESyntaxException

createVariantMap

private void createVariantMap()
This method will map the rows to the values to exclude


setVariantNames

private void setVariantNames()
                      throws org.apache.regexp.RESyntaxException
This method will determine and set the variant names for the main BOM

Throws:
org.apache.regexp.RESyntaxException

getNumVariants

public int getNumVariants()
This will return the number of variants in the design

Returns:
int The number of variants

getColumnNum

public ArrayList getColumnNum()
This will return a list of the columns that contain variant information

Returns:
ArrayList A list of column numbers

variantsExist

public boolean variantsExist()
This method will determine if variants exist

Returns:
boolean True if variants exist, false otherwise

getVariantNames

public ArrayList getVariantNames()
This method will return a list of Strings of the variant names

Returns:
ArrayList A List of all the variant names in the design

isExclude

private boolean isExclude(int column)
This method determines if these rows for variants are for exclusion

Parameters:
column - int This is the current column
Returns:
boolean If this is a exclusion column

isInclude

private boolean isInclude(int column)
This method determines if these rows for variants are for inclusion

Parameters:
column - int This is the current column
Returns:
boolean If this is an inclusion column

getVariantBOM

public BOMListMember getVariantBOM(String variantName)
This method will return the variant BOM associated with the variant name

Parameters:
variantName - String The name of the variant
Returns:
BOMListMember The variant BOM