IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Profile: msonsini
About
User Name: msonsini
Forum Rank: Newbie
Real Name:
Location
Occupation:
Interests:
Gender: None Specified
Statistics
Joined: Monday, November 27, 2017
Last Visit: Tuesday, November 28, 2017 4:02:16 PM
Number of Posts: 3
[0.02% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Java API ImportBinaryTypesDlg entry class specification
Posted: Tuesday, November 28, 2017 3:54:58 PM
Cor,

Thanks for the quick response.

I am using the com.altova.automation.UModel.BinaryTypeEntry Java class to specify a single jar file to import. I am just working with one jar file while attempting to figure out the automation approach. I use the BinaryTypeEntry.setEntry method to specify the jar path. The only other set* BinaryTypeEntry methods are setExecutable and setImportTypes. Both of these methods take a single boolean parameter so I doubt they can be used to communicate a class within a jar file to import without leveraging other methods outside of BinaryTypeEntry.

This is why I am asking if there is a way to import individual classes with the Java UModel API via ImportBinaryTypesDlg, BinaryTypeEntries, BinaryTypeEntry, and other classes. Is there or is the API limited to only supporting importing all classes of a jar file?

Thank you,
Mike
Topic: Java API ImportBinaryTypesDlg entry class specification
Posted: Tuesday, November 28, 2017 1:35:54 PM
Cor,

Thank you but I do not understand. When I manually select Project -> Import Binary Types in UModel, a dialog titled "Import Binary Types" is displayed. After clicking the "Next >" button on this dialog, its title changes to "Import Binary Selection". I can manually add jar files through this dialog and then click the plus icon next the jar files to expand them, enabling access to their individual classes. Then, I can select individual classes to import and click the dialog "Finish" button to only import the specified subset.

I would like to automate this process and have been able to configure the "Import Binary Types" dialog (through the Java API) with a jar file to import classes from. However, I am stuck at figuring out how to select individual classes because I cannot identify API functions or methods for this purpose. I understand that I will need to satisfy dependencies of imported classes for the import to succeed and have an approach to address this.

However, creating a diagram without the automatic generation functionality may be a viable alternative. I am attempting to understand a custom application written within a third party framework comprised of many jar files. Since the application only uses a fraction of the available third party framework, which contains thousands or tens of thousands of classes, I would like to attempt creating diagrams linking the custom application classes to only the used framework classes without including rest of the framework classes.

Is the UModel Import Binary Types functionality appropriate and the best UModel approach for this effort? If not, how would you recommend approaching the diagram generation?

Thank you,
Mike
Topic: Java API ImportBinaryTypesDlg entry class specification
Posted: Monday, November 27, 2017 1:36:22 PM
I am attempting to use the UModel API to automate UModel via the Java interface. Specifically, I would like to import only some classes from a set of jar files instead of all classes to minimize resulting diagram complexity. I am able to specify the jar file to import from through the API but not individual classes from within the jar. Is there a way to do this with the UModel API?

Thank you,
Mike

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.