Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend FeatureExportExtension interface #197

Closed
yaozhihang opened this issue Jul 8, 2021 · 3 comments
Closed

Extend FeatureExportExtension interface #197

yaozhihang opened this issue Jul 8, 2021 · 3 comments

Comments

@yaozhihang
Copy link
Member

It would be helpful to add two methods somehow like exportStart() and exportComplete() into the interface FeatureExportExtension. For example, if we write a plugin to do post-process and log the processed object into a separate CSV file, we could create a file writer within the method exportStart() and close the writer in exportComplete().

https://github.com/3dcitydb/importer-exporter/blob/master/impexp-core/src/main/java/org/citydb/core/plugin/extension/exporter/FeatureExportExtension.java#L35

@clausnagel
Copy link
Member

Yes, sounds like a good idea. I guess the interface would also need to handle cases where the export is aborted by the user or even terminates abnormally. Because if you open resources when the export starts, you should close them even if the export process fails.

@yaozhihang
Copy link
Member Author

True, nice remark.

@clausnagel
Copy link
Member

fixed with #200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants