wt.iba.definition
Class DefinitionLoader

java.lang.Object
  extended bywt.iba.definition.DefinitionLoader

public class DefinitionLoader
extends Object

Bulk load data (IBA) into database for initial setup or migrating from legacy data Called by command line: java wt.units.DefinitionLoader


Field Summary
private static String CURRENT_CH_KEY
           
static Installer installService
           
private static String ROOT_NAME
           
private static String SERVICE_NAME
           
private static UnitDBService theUnitDBService
           
private static boolean VERBOSE
           
 
Constructor Summary
DefinitionLoader()
           
 
Method Summary
private static boolean commitUnittedAttributeDefinition(UnitDefView udf)
           
static boolean createAttrDefinizer(Hashtable nv, Hashtable cmd_line, Vector return_objects)
          Create Attribute Definition(s) or Organizer(s) This method can be called by java wt.load.LoadFromFile -d c:\windchill\loadfiles\attrdefinizer.csv This method can also be called from the DefinitionLoader main program.
private static boolean createAttributeDefinition(String displayName, Object addv)
           
private static boolean createAttributeDefinitionUnderDefinition(String name, String displayName, String description, String dataType, String referencedClassName, String parentClassName, AbstractAttributeDefinizerView parent_aadv)
           
private static boolean createAttributeDefinitionUnderOrganizer(String name, String displayName, String description, String dataType, String referencedClassName, AbstractAttributeDefinizerView parent_aadv)
           
private static boolean createAttributeOrganizer(IBADefinitionService ibaServiceHelper, AttributeOrgDefaultView aodv)
           
private static boolean createUnittedAttributeDefinition(Hashtable nv, String name, String displayName, String description, QuantityOfMeasureDefaultView qomdv, AbstractAttributeDefinizerView parent_aadv)
           
static AbstractAttributeDefinizerNodeView findAttributeChild(AbstractAttributeDefinizerNodeView parent, String childName)
           
static AttributeOrgNodeView findOrgRoot(String rootName)
           
static AbstractAttributeDefinizerView getAttributeDefinition(String parentID)
          Pass parent path from root to the new node's parent, return the parent attribute deninition or organizer back
static AbstractAttributeDefinizerView getAttributeDefinizer(String parentID)
          Pass parent path include organizer from root to the new node's parent, return the parent attribute deninition or organizer back
static void main(String[] args)
          Command line method for loading demonstration data into the Windchill system.
private static String removeInvalidCharactersFromPath(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

installService

public static Installer installService

CURRENT_CH_KEY

private static String CURRENT_CH_KEY

theUnitDBService

private static UnitDBService theUnitDBService

VERBOSE

private static boolean VERBOSE

SERVICE_NAME

private static final String SERVICE_NAME
See Also:
Constant Field Values

ROOT_NAME

private static final String ROOT_NAME
See Also:
Constant Field Values
Constructor Detail

DefinitionLoader

public DefinitionLoader()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Command line method for loading demonstration data into the Windchill system.

Parameters:
args - Not used anymore, ignored.
Throws:
Exception

createAttrDefinizer

public static boolean createAttrDefinizer(Hashtable nv,
                                          Hashtable cmd_line,
                                          Vector return_objects)
Create Attribute Definition(s) or Organizer(s) This method can be called by java wt.load.LoadFromFile -d c:\windchill\loadfiles\attrdefinizer.csv This method can also be called from the DefinitionLoader main program.

Parameters:
cmd_line -
Returns:
boolean for success or failure

findAttributeChild

public static AbstractAttributeDefinizerNodeView findAttributeChild(AbstractAttributeDefinizerNodeView parent,
                                                                    String childName)

findOrgRoot

public static AttributeOrgNodeView findOrgRoot(String rootName)

createAttributeDefinitionUnderDefinition

private static boolean createAttributeDefinitionUnderDefinition(String name,
                                                                String displayName,
                                                                String description,
                                                                String dataType,
                                                                String referencedClassName,
                                                                String parentClassName,
                                                                AbstractAttributeDefinizerView parent_aadv)

createUnittedAttributeDefinition

private static boolean createUnittedAttributeDefinition(Hashtable nv,
                                                        String name,
                                                        String displayName,
                                                        String description,
                                                        QuantityOfMeasureDefaultView qomdv,
                                                        AbstractAttributeDefinizerView parent_aadv)

commitUnittedAttributeDefinition

private static boolean commitUnittedAttributeDefinition(UnitDefView udf)

createAttributeDefinitionUnderOrganizer

private static boolean createAttributeDefinitionUnderOrganizer(String name,
                                                               String displayName,
                                                               String description,
                                                               String dataType,
                                                               String referencedClassName,
                                                               AbstractAttributeDefinizerView parent_aadv)

createAttributeDefinition

private static boolean createAttributeDefinition(String displayName,
                                                 Object addv)

createAttributeOrganizer

private static boolean createAttributeOrganizer(IBADefinitionService ibaServiceHelper,
                                                AttributeOrgDefaultView aodv)

getAttributeDefinition

public static AbstractAttributeDefinizerView getAttributeDefinition(String parentID)
Pass parent path from root to the new node's parent, return the parent attribute deninition or organizer back

Returns:
AbstractAttributeDefinizerView: can be a definition or Organizer.

getAttributeDefinizer

public static AbstractAttributeDefinizerView getAttributeDefinizer(String parentID)
Pass parent path include organizer from root to the new node's parent, return the parent attribute deninition or organizer back

Returns:
AbstractAttributeDefinizerView: can be a definition or Organizer.

removeInvalidCharactersFromPath

private static String removeInvalidCharactersFromPath(String s)