wt.step.schemaGenerator
Class MakeSchema

java.lang.Object
  extended bywt.step.schemaGenerator.MakeSchema

public class MakeSchema
extends Object

Parses IDL files generated from Rational Rose and generate an Express Schema from them.


Nested Class Summary
(package private) static class MakeSchema.DirectoryFilesFilter
          File filter matching only files which are directories
(package private) static class MakeSchema.IDLFilesFilter
          File filter matching only files with suffix .idl
 
Field Summary
private static MakeSchema.DirectoryFilesFilter _dirFilesFilter
           
private static MakeSchema.IDLFilesFilter _idlFilesFilter
           
private  IDLParser _parser
           
 
Constructor Summary
MakeSchema()
           
 
Method Summary
private  Schema buildSchemaFromIDL(String schemaName, String idlBaseDirectoryName)
          Build an Express Schema based on all IDL files found in and below the given base directory.
private  Schema buildSchemaThroughIntrospection(String schemaName, String registryFile, String[] packages)
          Build an Express Schema file based on data extracted using the Windchill WTIntrospector feature.
private static String getSchemaNameFromFilename(String filename)
           
static void main(String[] args)
          Command line entry point.
private  void parseIdlDirectory(File directory, Schema schema)
          Parses all the IDL files in and below a given base directory into the given schema.
private  void parseIdlFile(File idlFile, Schema schema)
          Parse a single IDL file into a STEP 'Entity' with defined 'Attributes'.
private static void writeSchemaFile(Schema schema, String outputFilename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_idlFilesFilter

private static MakeSchema.IDLFilesFilter _idlFilesFilter

_dirFilesFilter

private static MakeSchema.DirectoryFilesFilter _dirFilesFilter

_parser

private IDLParser _parser
Constructor Detail

MakeSchema

public MakeSchema()
Method Detail

main

public static void main(String[] args)
                 throws IOException,
                        FileNotFoundException
Command line entry point. Arguments are: {output-filename} [idl-base-directory]

Throws:
IOException
FileNotFoundException

buildSchemaThroughIntrospection

private Schema buildSchemaThroughIntrospection(String schemaName,
                                               String registryFile,
                                               String[] packages)
                                        throws IOException,
                                               FileNotFoundException
Build an Express Schema file based on data extracted using the Windchill WTIntrospector feature.

Throws:
IOException
FileNotFoundException

buildSchemaFromIDL

private Schema buildSchemaFromIDL(String schemaName,
                                  String idlBaseDirectoryName)
                           throws IOException,
                                  FileNotFoundException
Build an Express Schema based on all IDL files found in and below the given base directory. These IDL files should have been autogenerated using the Ration Rose modelling tool.

Throws:
IOException
FileNotFoundException

writeSchemaFile

private static void writeSchemaFile(Schema schema,
                                    String outputFilename)
                             throws IOException,
                                    FileNotFoundException
Throws:
IOException
FileNotFoundException

getSchemaNameFromFilename

private static String getSchemaNameFromFilename(String filename)

parseIdlDirectory

private void parseIdlDirectory(File directory,
                               Schema schema)
                        throws FileNotFoundException,
                               IOException
Parses all the IDL files in and below a given base directory into the given schema. Each IDL file contains the definition of a STEP 'Entity' with defined 'Attributes'.

Throws:
FileNotFoundException
IOException

parseIdlFile

private void parseIdlFile(File idlFile,
                          Schema schema)
                   throws FileNotFoundException,
                          IOException
Parse a single IDL file into a STEP 'Entity' with defined 'Attributes'.

Throws:
FileNotFoundException
IOException