@Override public String getDescription() { return vType.getDescription(); }
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() ); }
if(vehicle.getType().getDescription()==null) { // emission specification is in vehicle type id 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() == null && vehicle.getType().getDescription() == null) // if both are null together; no vehicle type information. ) { throw new RuntimeException("Vehicle type description for vehicle " + vehicle + " is missing. " + String vehicleDescription = vehicle.getType().getDescription();
if(vehicle.getType().getDescription()==null) { // emission specification is in vehicle type id 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); String vehicleDescription = vehicle.getType().getDescription(); if(vehicle.getType().getDescription() == null){ throw new RuntimeException("Vehicle type description for vehicle " + vehicle + "is missing. " + "Please make sure that requirements for emission vehicles in "
atts.add(this.createTuple(VehicleSchemaV1Names.ID, vt.getId().toString())); this.writeStartTag(VehicleSchemaV1Names.VEHICLETYPE, atts); if (vt.getDescription() != null) { this.writeStartTag(VehicleSchemaV1Names.DESCRIPTION, null); this.writeContent(vt.getDescription(), true); this.writeEndTag(VehicleSchemaV1Names.DESCRIPTION);