mil.dod.th.ose.jaxb.proto.converter/src/mil/dod/th/ose/jaxbprotoconverter/EnumConverterFileGenerator.java
public void generateEnumConverters(final ProtoModel protoModel, final File outputDir, final File xsdFilesDir,
            final String wrapperClassName, final String baseProtoPackage, final String enumConvertersPackageName) 
                    throws FileNotFoundException
    {
        final Set<ProtoEnum> enumSet = protoModel.getEnums();
        for (ProtoEnum protoEnum: enumSet)
        {
            final File converterFile = new File(outputDir, protoEnum.getType().getSimpleName() + "Converter.java");
            final PrintStream outStream = new PrintStream(m_FileService.createFileOutputStream(converterFile));
            final File xsdFile = protoEnum.getProtoMessage().getProtoFile().getXsdFile();
            final String protoClassName = xsdFile.getName().replace(".xsd", "Gen");
            
            final Path relativePath = PathUtils.getRelativePath(xsdFile.getParentFile(), xsdFilesDir);
            final String protoPackageName = baseProtoPackage + PACKAGE_SEPARATOR 
                    + relativePath.toString().replace(File.separator, PACKAGE_SEPARATOR);
            genEnumConverterFile(protoEnum, outStream, protoClassName, protoPackageName, enumConvertersPackageName);
        }
        
        final File mainConverter = new File(outputDir, wrapperClassName + ".java");
        final PrintStream mainConverterOutStream = new PrintStream(m_FileService.createFileOutputStream(mainConverter));
        genEnumConverterWrapperFile(mainConverterOutStream, wrapperClassName, enumConvertersPackageName);
    }
/**
     * Method that generates and enumeration converter based the enumerations contained within the specified 
     * {@link ProtoModel}.
     * 
     * @param protoModel
     *      The model that contains information about the enumeration that should have converters generated.
     * @param outputDir
     *      The directory where the converters should be generated.
     * @param xsdFilesDir
     *      Base directory in which all XSD schema files are located.
     * @param wrapperClassName
     *      Name to be used for the Java that can be used to convert between Java and proto enumeration
     *      values for all generated protocol buffer enumerations.
     * @param baseProtoPackage
     *      The base Java package for compiled proto files.
     * @param enumConvertersPackageName
     *      Java package name to be used for the generated converter classes.
     * @throws FileNotFoundException
     *      Thrown if a generated converter file cannot be found.
     */
Method that generates and enumeration converter based the enumerations contained within the specified
ProtoModel.

@param protoModel
The model that contains information about the enumeration that should have converters generated.
@param outputDir
The directory where the converters should be generated.
@param xsdFilesDir
Base directory in which all XSD schema files are located.
@param wrapperClassName
Name to be used for the Java that can be used to convert between Java and proto enumeration
values for all generated protocol buffer enumerations.
@param baseProtoPackage
The base Java package for compiled proto files.
@param enumConvertersPackageName
Java package name to be used for the generated converter classes.
@throws FileNotFoundException
Thrown if a generated converter file cannot be found.
Method that generates and enumeration converter based the enumerations contained within the specified ProtoModel . @param protoModel The model that contains information about the enumeration that should have converters generated . @param outputDir The directory where the converters should be generated . @param xsdFilesDir Base directory in which all XSD schema files are located . @param wrapperClassName Name to be used for the Java that can be used to convert between Java and proto enumeration values for all generated protocol buffer enumerations . @param baseProtoPackage The base Java package for compiled proto files . @param enumConvertersPackageName Java package name to be used for the generated converter classes . @throws FileNotFoundException Thrown if a generated converter file cannot be found .
public void generateEnumConverters(final ProtoModel protoModel, final File outputDir, final File xsdFilesDir,
            final String wrapperClassName, final String baseProtoPackage, final String enumConvertersPackageName) 
                    throws FileNotFoundException
    {
        final Set<ProtoEnum> enumSet = protoModel.getEnums();
        for (ProtoEnum protoEnum: enumSet)
        {
            final File converterFile = new File(outputDir, protoEnum.getType().getSimpleName() + "Converter.java");
            final PrintStream outStream = new PrintStream(m_FileService.createFileOutputStream(converterFile));
            final File xsdFile = protoEnum.getProtoMessage().getProtoFile().getXsdFile();
            final String protoClassName = xsdFile.getName().replace(".xsd", "Gen");
            final Path relativePath = PathUtils.getRelativePath(xsdFile.getParentFile(), xsdFilesDir);
            final String protoPackageName = baseProtoPackage + PACKAGE_SEPARATOR 
                    + relativePath.toString().replace(File.separator, PACKAGE_SEPARATOR);
            genEnumConverterFile(protoEnum, outStream, protoClassName, protoPackageName, enumConvertersPackageName);
        }
        final File mainConverter = new File(outputDir, wrapperClassName + ".java");
        final PrintStream mainConverterOutStream = new PrintStream(m_FileService.createFileOutputStream(mainConverter));
        genEnumConverterWrapperFile(mainConverterOutStream, wrapperClassName, enumConvertersPackageName);
    }
public void generateEnumConverters ( final ProtoModel protoModel , final File outputDir , final File xsdFilesDir , final String wrapperClassName , final String baseProtoPackage , final String enumConvertersPackageName ) throws FileNotFoundException { final Set < ProtoEnum > enumSet = protoModel . getEnums ( ) ; for ( ProtoEnum protoEnum : enumSet ) { final File converterFile = new File ( outputDir , protoEnum . getType ( ) . getSimpleName ( ) + "Converter.java" ) ; final PrintStream outStream = new PrintStream ( m_FileService . createFileOutputStream ( converterFile ) ) ; final File xsdFile = protoEnum . getProtoMessage ( ) . getProtoFile ( ) . getXsdFile ( ) ; final String protoClassName = xsdFile . getName ( ) . replace ( ".xsd" , "Gen" ) ; final Path relativePath = PathUtils . getRelativePath ( xsdFile . getParentFile ( ) , xsdFilesDir ) ; final String protoPackageName = baseProtoPackage + PACKAGE_SEPARATOR + relativePath . toString ( ) . replace ( File . separator , PACKAGE_SEPARATOR ) ; genEnumConverterFile ( protoEnum , outStream , protoClassName , protoPackageName , enumConvertersPackageName ) ; } final File mainConverter = new File ( outputDir , wrapperClassName + ".java" ) ; final PrintStream mainConverterOutStream = new PrintStream ( m_FileService . createFileOutputStream ( mainConverter ) ) ; genEnumConverterWrapperFile ( mainConverterOutStream , wrapperClassName , enumConvertersPackageName ) ; }
Method that generates and enumeration converter based the enumerations contained within the specified
 {@link ProtoModel}.
Method that generates and enumeration converter based the enumerations contained within the specified { @link ProtoModel } .