use of com.opensimulationplatform.core.owlbuilder.SimulatorOwlBuilder in project osp-validator by open-simulation-platform.
the class ValidatorContextFactory method create.
public ValidatorContext create(ModelDescription modelDescription) {
Simulator simulator = new Simulator();
simulator.setModelDescription(modelDescription);
OwlBuilderContext builderContext = new OwlBuilderContext();
builderContext.owl = new OWLConfig();
builderContext.owl.removeNakedVariables = false;
SimulatorOwlBuilder builder = new SimulatorOwlBuilder();
builder.setContext(builderContext);
builder.build(simulator);
builder.complete();
ValidatorContext validatorContext = new ValidatorContext();
validatorContext.owl = builderContext.owl;
validatorContext.invalidIndividuals = builderContext.invalidIndividuals;
validatorContext.names = builderContext.names;
validatorContext.units = builderContext.units;
validatorContext.variables = builderContext.variables;
validatorContext.variableGroups = builderContext.variableGroups;
validatorContext.simulators = builderContext.simulators;
return validatorContext;
}
Aggregations