wt.step.schemaGenerator
Class IntrospectedSchema

java.lang.Object
  extended bywt.step.schemaGenerator.Schema
      extended bywt.step.schemaGenerator.IntrospectedSchema

public class IntrospectedSchema
extends Schema

Builds Express Entity information for Windchill model objects using the Windchill Introspection service.


Field Summary
private  boolean _hasBuiltEntities
           
private  HashMap _modelClassLookupTable
           
private  String[] _packageExtent
           
private  Properties _registryClasses
           
 
Constructor Summary
IntrospectedSchema(String name, String[] packageExtent, Properties registryClasses)
           
 
Method Summary
(package private)  void addEntity(EntityDefinition entity)
           
(package private)  void addEntity(String entityName)
          Add an ENTITY definition to the schema
(package private)  void addEntityAttribute(EntityDefinition entity, String name, String type, boolean nativeType)
           
(package private)  void addEntitySubtype(EntityDefinition entity, String subtype)
           
(package private)  void addLatestEntityAttribute(String name, String type, boolean nativeType)
          Add an atttribute to the latest Entity that was added.
(package private)  void addLatestEntitySubtype(String subtype)
          Add a subtype to the latest Entity that was added
(package private)  void addType(String name, String definition)
          Add a TYPE definition to the schema
private  void buildSchemaEntities()
           
(package private)  void collectEntityAttributes(String entityName, Hashtable attributesHolder)
          Collect all the inherited attributes for each entity.
protected  ClassInfo getClassInfo(String className)
           
protected  Enumeration getDefinedEntities()
           
protected  Enumeration getDefinedTypes()
           
protected  String getFilename()
           
private  HashMap getModelClassesLookupTable()
           
protected  Set getSelectedEntityNames(Properties candidateClasses)
           
protected  boolean isDefinedType(String typeName)
           
protected  boolean isModelClass(String className)
           
(package private)  void markInheritedAttributes()
          For each Entity in the schema mark any inherited attributes Note: This should be called after removeAttributeNameClashes as names may be changed by that routine.
(package private)  void removeAttributeNameClashes()
          For each Entity in the schema remove any attribute name clashes
(package private)  void writeExpress(PrintStream outStream)
          Write the entire schema to the given print stream in the Express language.
 void writeUndefinedTypes(PrintStream outStream)
          Write stubs for types that have been referenced but not defined.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_modelClassLookupTable

private HashMap _modelClassLookupTable

_hasBuiltEntities

private boolean _hasBuiltEntities

_registryClasses

private Properties _registryClasses

_packageExtent

private String[] _packageExtent
Constructor Detail

IntrospectedSchema

public IntrospectedSchema(String name,
                          String[] packageExtent,
                          Properties registryClasses)
Method Detail

getSelectedEntityNames

protected Set getSelectedEntityNames(Properties candidateClasses)

getDefinedEntities

protected Enumeration getDefinedEntities()
Overrides:
getDefinedEntities in class Schema

getDefinedTypes

protected Enumeration getDefinedTypes()
Overrides:
getDefinedTypes in class Schema

buildSchemaEntities

private void buildSchemaEntities()

isModelClass

protected boolean isModelClass(String className)

getClassInfo

protected ClassInfo getClassInfo(String className)

getModelClassesLookupTable

private HashMap getModelClassesLookupTable()

getFilename

protected String getFilename()

addType

void addType(String name,
             String definition)
Add a TYPE definition to the schema


addEntity

void addEntity(String entityName)
Add an ENTITY definition to the schema


addEntity

void addEntity(EntityDefinition entity)

addLatestEntityAttribute

void addLatestEntityAttribute(String name,
                              String type,
                              boolean nativeType)
Add an atttribute to the latest Entity that was added.


addEntityAttribute

void addEntityAttribute(EntityDefinition entity,
                        String name,
                        String type,
                        boolean nativeType)

addLatestEntitySubtype

void addLatestEntitySubtype(String subtype)
Add a subtype to the latest Entity that was added


addEntitySubtype

void addEntitySubtype(EntityDefinition entity,
                      String subtype)

removeAttributeNameClashes

void removeAttributeNameClashes()
For each Entity in the schema remove any attribute name clashes

See Also:
wt.step.schemaGenerator.EntityDefinition.removeAttributeNameClashes

markInheritedAttributes

void markInheritedAttributes()
For each Entity in the schema mark any inherited attributes Note: This should be called after removeAttributeNameClashes as names may be changed by that routine.

See Also:
wt.step.schemaGenerator.EntityDefinition.markInheritedAttributes

collectEntityAttributes

void collectEntityAttributes(String entityName,
                             Hashtable attributesHolder)
Collect all the inherited attributes for each entity.


writeExpress

void writeExpress(PrintStream outStream)
Write the entire schema to the given print stream in the Express language.


isDefinedType

protected boolean isDefinedType(String typeName)

writeUndefinedTypes

public void writeUndefinedTypes(PrintStream outStream)
Write stubs for types that have been referenced but not defined.