@Override public void setDescription(String desc) { vType.setDescription(desc); }
@Override public void endTag(final String name, final String content, final Stack<String> context) { if (VehicleSchemaV1Names.DESCRIPTION.equalsIgnoreCase(name) && (content.trim().length() > 0)){ this.currentVehType.setDescription(content.trim()); } else if (VehicleSchemaV1Names.ENGINEINFORMATION.equalsIgnoreCase(name)){ EngineInformation currentEngineInfo = this.builder.createEngineInformation(this.currentFuelType, this.currentGasConsumption); this.currentVehType.setEngineInformation(currentEngineInfo); this.currentFuelType = null; this.currentGasConsumption = Double.NaN; } else if (VehicleSchemaV1Names.FUELTYPE.equalsIgnoreCase(name)){ this.currentFuelType = this.parseFuelType(content.trim()); } else if (VehicleSchemaV1Names.FREIGHTCAPACITY.equalsIgnoreCase(name)){ this.currentCapacity.setFreightCapacity(this.currentFreightCap); this.currentFreightCap = null; } else if (VehicleSchemaV1Names.CAPACITY.equalsIgnoreCase(name)) { this.currentVehType.setCapacity(this.currentCapacity); this.currentCapacity = null; } else if (VehicleSchemaV1Names.VEHICLETYPE.equalsIgnoreCase(name)){ this.vehicles.addVehicleType(this.currentVehType); this.currentVehType = null; } }
public static void setHbefaVehicleDescription( final VehicleType vt, final String hbefaVehicleDescription ) { // yyyy maybe this should use the vehicle information tuple (see below)? // yyyy replace this by using Attributes. kai, oct'18 vt.setDescription( vt.getDescription() + " " + EmissionSpecificationMarker.BEGIN_EMISSIONS.toString()+ hbefaVehicleDescription + EmissionSpecificationMarker.END_EMISSIONS.toString() ); }
vehicle.getType().setDescription(EmissionSpecificationMarker.BEGIN_EMISSIONS +vehicle.getType().getId().toString()+ EmissionSpecificationMarker.END_EMISSIONS); } else if( vehicle.getType().getDescription().contains(EmissionSpecificationMarker.BEGIN_EMISSIONS.toString()) ) { String vehicleDescription = vehicle.getType().getDescription() + EmissionSpecificationMarker.BEGIN_EMISSIONS + vehicle.getType().getId().toString()+ EmissionSpecificationMarker.END_EMISSIONS; vehicle.getType().setDescription(vehicleDescription);
vehicle.getType().setDescription(EmissionSpecificationMarker.BEGIN_EMISSIONS +vehicle.getType().getId().toString()+ EmissionSpecificationMarker.END_EMISSIONS); } else if( vehicle.getType().getDescription().contains(EmissionSpecificationMarker.BEGIN_EMISSIONS.toString()) ) { String vehicleDescription = vehicle.getType().getDescription() + EmissionSpecificationMarker.BEGIN_EMISSIONS + vehicle.getType().getId().toString()+ EmissionSpecificationMarker.END_EMISSIONS; vehicle.getType().setDescription(vehicleDescription);