use of com.opensimulationplatform.systemstructure.xml.converter.OspSystemStructureConverter in project osp-validator by open-simulation-platform.
the class SystemStructureFactory method create.
public SystemStructure create(File ospSystemStructureFile) {
OspSystemStructureParser parser = new OspSystemStructureParser();
OspSystemStructure ospSystemStructure = parser.parse(ospSystemStructureFile);
if (fmuLocator == null) {
fmuLocator = new DefaultFmuLocator(ospSystemStructureFile);
}
if (ospModelDescriptionLocator == null) {
ospModelDescriptionLocator = new DefaultOspModelDescriptionLocator(ospSystemStructureFile, fmuLocator);
}
ConverterContext context = new ConverterContext();
context.ospModelDescriptionLocator = ospModelDescriptionLocator;
context.fmuLocator = fmuLocator;
OspSystemStructureConverter converter = new OspSystemStructureConverter(context);
return converter.convert(ospSystemStructure);
}
Aggregations