I am fairly new to FME, and I am trying to write a custom writer using Java. I went through the sample file in the installer, and I managed to put together a functioning writer. However, I am stuck on how to deal with multiple feature types. For example, if I am using an ESRI-Shape reader, and my dataset has 4 shape files, I want my output to also have the same 4 files.
At the present time, my writer has a directory for the output. So, when I add my writer, I choose the directory for the Dataset option and click OK. Then I get the prompt for “Select Feature Type”, and I select all. This creates separate Feature Type records, named for each shape file, as I would expect. However, when I execute my code … it does not seem like I have access to the Feature Type Name parameter. If I create a separate writer for each feature type, I can get the data from the DefLines, but that doesn’t seem like the correct way to do it. From using stock writers, such as ESRI-Shape, it seems like the correct way is to create one writer, and use this parameter somehow … but I can’t seem to figure out how to access it.