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

Export data using the ISOXML plugin #104

Open
fedosinfo opened this issue Mar 16, 2020 · 2 comments
Open

Export data using the ISOXML plugin #104

fedosinfo opened this issue Mar 16, 2020 · 2 comments

Comments

@fedosinfo
Copy link
Contributor

Can I export the ADAPT data model to ISOXML format using the ISOXML plugin? I understand that I can read and import data from ISOXML format to the ADAPT data model, but can I write data to ISOXML format from the ADAPT data model?

I found an implementation of the export method, but it looks like this method is private and I can't call this method through the public interface:

void IPlugin.Export(ApplicationDataModel.ADM.ApplicationDataModel dataModel, string exportPath, Properties properties)
{
//Convert the ADAPT model into the ISO model
string outputPath = exportPath.WithTaskDataPath();
TaskDataMapper taskDataMapper = new TaskDataMapper(outputPath, properties);
Errors = taskDataMapper.Errors;
ISO11783_TaskData taskData = taskDataMapper.Export(dataModel);
//Serialize the ISO model to XML
TaskDocumentWriter writer = new TaskDocumentWriter();
writer.WriteTaskData(outputPath, taskData);
//Serialize the Link List
writer.WriteLinkList(outputPath, taskData.LinkList);
}

I will really appreciate if you help me.

@knelson-farmbeltnorth
Copy link
Contributor

It appears not exposing this method (as Import is) was an oversight. For now, you will need to discover the Plugin using the Plugin Manager code in order to Export. See https://github.com/ADAPT/ADAPT/blob/develop/source/PluginManager/PluginFactory.cs

If you want to submit a pull request to expose this method, we can consider it for inclusion.

@fedosinfo
Copy link
Contributor Author

@knelson-farmbeltnorth Thanks for your reply. I created a pull request to expose the export method: #106

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

No branches or pull requests

2 participants