Search in sources :

Example 16 with VariableType

use of com.opensimulationplatform.modeldescription.xml.model.VariableType in project osp-validator by open-simulation-platform.

the class CurrentTypeConverter method convert.

@Override
public Current convert(CurrentType currentType) {
    Current current = new Current();
    current.setName(currentType.getName());
    List<VariableType> variableTypes = currentType.getVariable();
    List<Variable> variables = variableTypes.stream().map(context.variableTypeConverter::convert).collect(Collectors.toList());
    current.setVariables(variables);
    return current;
}
Also used : Variable(com.opensimulationplatform.core.model.modeldescription.Variable) VariableType(com.opensimulationplatform.modeldescription.xml.model.VariableType) Current(com.opensimulationplatform.core.model.modeldescription.variablegroup.current.Current)

Example 17 with VariableType

use of com.opensimulationplatform.modeldescription.xml.model.VariableType in project osp-validator by open-simulation-platform.

the class NmeaGstPositionErrorTypeConverter method convert.

@Override
public NmeaGstPositionError convert(NmeaGstPositionErrorType nmeaGstPositionErrorType) {
    NmeaGstPositionError nmeaGstPositionError = new NmeaGstPositionError();
    nmeaGstPositionError.setName(nmeaGstPositionErrorType.getName());
    List<VariableType> variableTypes = nmeaGstPositionErrorType.getVariable();
    List<Variable> variables = variableTypes.stream().map(context.variableTypeConverter::convert).collect(Collectors.toList());
    nmeaGstPositionError.setVariables(variables);
    return nmeaGstPositionError;
}
Also used : Variable(com.opensimulationplatform.core.model.modeldescription.Variable) VariableType(com.opensimulationplatform.modeldescription.xml.model.VariableType) NmeaGstPositionError(com.opensimulationplatform.core.model.modeldescription.variablegroup.nmeagstpositionerror.NmeaGstPositionError)

Aggregations

Variable (com.opensimulationplatform.core.model.modeldescription.Variable)17 VariableType (com.opensimulationplatform.modeldescription.xml.model.VariableType)17 Unit (com.opensimulationplatform.core.model.modeldescription.Unit)1 AngularDisplacement (com.opensimulationplatform.core.model.modeldescription.variablegroup.angulardisplacement.AngularDisplacement)1 AngularVelocity (com.opensimulationplatform.core.model.modeldescription.variablegroup.angularvelocity.AngularVelocity)1 Charge (com.opensimulationplatform.core.model.modeldescription.variablegroup.charge.Charge)1 Current (com.opensimulationplatform.core.model.modeldescription.variablegroup.current.Current)1 Force (com.opensimulationplatform.core.model.modeldescription.variablegroup.force.Force)1 LinearDisplacement (com.opensimulationplatform.core.model.modeldescription.variablegroup.lineardisplacement.LinearDisplacement)1 LinearVelocity (com.opensimulationplatform.core.model.modeldescription.variablegroup.linearvelocity.LinearVelocity)1 NmeaGgaFix (com.opensimulationplatform.core.model.modeldescription.variablegroup.nmeaggafix.NmeaGgaFix)1 NmeaGgaLatitudeLongitude (com.opensimulationplatform.core.model.modeldescription.variablegroup.nmeaggalatitudelongitude.NmeaGgaLatitudeLongitude)1 NmeaGstEllipse (com.opensimulationplatform.core.model.modeldescription.variablegroup.nmeagstellipse.NmeaGstEllipse)1 NmeaGstPositionError (com.opensimulationplatform.core.model.modeldescription.variablegroup.nmeagstpositionerror.NmeaGstPositionError)1 Pressure (com.opensimulationplatform.core.model.modeldescription.variablegroup.pressure.Pressure)1 Torque (com.opensimulationplatform.core.model.modeldescription.variablegroup.torque.Torque)1 Voltage (com.opensimulationplatform.core.model.modeldescription.variablegroup.voltage.Voltage)1 Volume (com.opensimulationplatform.core.model.modeldescription.variablegroup.volume.Volume)1 VolumeFlowRate (com.opensimulationplatform.core.model.modeldescription.variablegroup.volumeflowrate.VolumeFlowRate)1 ConverterContext (com.opensimulationplatform.modeldescription.xml.converter.ConverterContext)1