Search in sources :

Example 11 with VariableType

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

the class VolumeTypeConverter method convert.

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

Example 12 with VariableType

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

the class ForceTypeConverter method convert.

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

Example 13 with VariableType

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

the class TorqueTypeConverter method convert.

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

Example 14 with VariableType

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

the class VoltageTypeConverter method convert.

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

Example 15 with VariableType

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

the class AngularVelocityTypeConverter method convert.

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

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