mil.dod.th.ose.sdk/src/mil/dod/th/ose/sdk/those/ProjectGenerator.java
private void generateCapabilitiesXml(final ProjectProperties projectProps, final File projectDir,
            final ProjectType projectType) throws IOException
    {
        // make the capabilities XML directory
        final File capabilitiesDir = m_FileService.getFile(projectDir, FactoryDescriptor.CAPABILITIES_XML_FOLDER_NAME);
        capabilitiesDir.mkdir();

        // construct the file name
        final String fileName = projectProps.getPackageName() + "." + projectProps.getClassName() + ".xml";

        // get the capabilities byte array and write to file
        final byte[] capByte;
        switch (projectType)
        {
            case PROJECT_ASSET:
                capByte = ProjectAssetCapabilities.getCapabilities();
                break;

            case PROJECT_LINKLAYER:
                capByte = ProjectLinkLayerCapabilities.getCapabilities();
                break;

            case PROJECT_PHYLINK:
                capByte = ProjectPhysicalLinkCapabilities.getCapabilities(projectProps.getPhysicalLinkTypeEnum());
                break;

            case PROJECT_TRANSPORTLAYER:
                capByte = ProjectTransportLayerCapabilities.getCapabilities();
                break;

            default:
                throw new IllegalArgumentException(
                        "Invalid project type is set to use for 'projectType'.getCapabilities().");
        }

        final File outFile = m_FileService.getFile(capabilitiesDir, fileName);

        try (FileOutputStream fos = m_FileService.createFileOutputStream(outFile))
        {
            fos.write(capByte);
        }
    }
/**
     * Generates an xml document for asset plug-in capabilities.
     * 
     * @param projectProps
     *            Project properties containing variables used for creation of the xml file
     * @param projectDir
     *            the directory in which the asset plug-in will reside
     * @param projectType
     *            type of project
     * @throws IOException
     *             if there is an error creating or writing to the xml file
     */
Generates an xml document for asset plug-in capabilities.

@param projectProps
Project properties containing variables used for creation of the xml file
@param projectDir
the directory in which the asset plug-in will reside
@param projectType
type of project
@throws IOException
if there is an error creating or writing to the xml file
Generates an xml document for asset plug - in capabilities . @param projectProps Project properties containing variables used for creation of the xml file @param projectDir the directory in which the asset plug - in will reside @param projectType type of project @throws IOException if there is an error creating or writing to the xml file
private void generateCapabilitiesXml(final ProjectProperties projectProps, final File projectDir,
            final ProjectType projectType) throws IOException
    {
        final File capabilitiesDir = m_FileService.getFile(projectDir, FactoryDescriptor.CAPABILITIES_XML_FOLDER_NAME);
        capabilitiesDir.mkdir();
        final String fileName = projectProps.getPackageName() + "." + projectProps.getClassName() + ".xml";
        final byte[] capByte;
        switch (projectType)
        {
            case PROJECT_ASSET:
                capByte = ProjectAssetCapabilities.getCapabilities();
                break;
            case PROJECT_LINKLAYER:
                capByte = ProjectLinkLayerCapabilities.getCapabilities();
                break;
            case PROJECT_PHYLINK:
                capByte = ProjectPhysicalLinkCapabilities.getCapabilities(projectProps.getPhysicalLinkTypeEnum());
                break;
            case PROJECT_TRANSPORTLAYER:
                capByte = ProjectTransportLayerCapabilities.getCapabilities();
                break;
            default:
                throw new IllegalArgumentException(
                        "Invalid project type is set to use for 'projectType'.getCapabilities().");
        }
        final File outFile = m_FileService.getFile(capabilitiesDir, fileName);
        try (FileOutputStream fos = m_FileService.createFileOutputStream(outFile))
        {
            fos.write(capByte);
        }
    }
private void generateCapabilitiesXml ( final ProjectProperties projectProps , final File projectDir , final ProjectType projectType ) throws IOException { final File capabilitiesDir = m_FileService . getFile ( projectDir , FactoryDescriptor . CAPABILITIES_XML_FOLDER_NAME ) ; capabilitiesDir . mkdir ( ) ; final String fileName = projectProps . getPackageName ( ) + "." + projectProps . getClassName ( ) + ".xml" ; final byte [ ] capByte ; switch ( projectType ) { case PROJECT_ASSET : capByte = ProjectAssetCapabilities . getCapabilities ( ) ; break ; case PROJECT_LINKLAYER : capByte = ProjectLinkLayerCapabilities . getCapabilities ( ) ; break ; case PROJECT_PHYLINK : capByte = ProjectPhysicalLinkCapabilities . getCapabilities ( projectProps . getPhysicalLinkTypeEnum ( ) ) ; break ; case PROJECT_TRANSPORTLAYER : capByte = ProjectTransportLayerCapabilities . getCapabilities ( ) ; break ; default : throw new IllegalArgumentException ( "Invalid project type is set to use for 'projectType'.getCapabilities()." ) ; } final File outFile = m_FileService . getFile ( capabilitiesDir , fileName ) ; try ( FileOutputStream fos = m_FileService . createFileOutputStream ( outFile ) ) { fos . write ( capByte ) ; } }
Generates an xml document for asset plug-in capabilities.
Generates an xml document for asset plug - in capabilities .
// make the capabilities XML directory // construct the file name // get the capabilities byte array and write to file