Skip to content

Latest commit

 

History

History
288 lines (271 loc) · 6.86 KB

domain_api_diagram_car.md

File metadata and controls

288 lines (271 loc) · 6.86 KB

Domain API Diagram Car

Figure: Domain API Diagram of Car

(Car) The entity is identified by its VIN. Besides general information on the car, like brand, model, and productionDate, the entity contains further static and dynamic data. The value object TechnicalSpecification specifies the static data. The value object DynamicData holds the car's dynamic data.

(TechnicalSpecification) Encapsulates the core physical makeup of the car (like color and trunkVolume) and a car's performance (like consumption and emission). In the case of an electric car, the attribute fuelCapacity holds the battery capacity in kWh. In the case of a gasoline car, the attribute fuelCapacity contains the tank capacity in liters. In the case of a hybrid car, the attribute includes both. Therefore, the attribute's data type is String.

(Emissions) Data on the CO2 that is emitted by a car during operation.

(Consumption) Data on the amount of fuel consumed by a car during operation.

(Fuel) Data that defines the source of energy that powers the car.

(Tire) Data on the tires with which a car is equipped.

(Transmission) Data that define the type how gears of the transmission are changed.

(Engine) Data on the physical unit that transforms fuel into movement. The power of the engine is specified in kW.

(DynamicData) Data that changes during a car's operation (like the car's position or the remaining fuel level).

(GeoCoordinate) Data that defines the global position of a car. The latitude and the longitude uniquely specify the position of a car.

(LockState) Data that represents the state of a car's lock. A lock can either be locked or unlocked.

(EngineStatus) Data that represents the state of a car's engine. An engine can either be on or off.

A definition of each attribute can be found in the Data Definition Table.

Attribute Restrictions

Entity / Value Object Attribute Nullable Restriction
StaticCar vin false unique
regex: ^[A-HJ-NPR-Z0-9]{13}[0-9]{4}$
brand false not empty
model false not empty
productionDate false format: YYYY-MM-DD
technicalSpecification false -
DynamicCar vin false unique
regex: ^[A-HJ-NPR-Z0-9]{13}[0-9]{4}$
brand false not empty
model false not empty
productionDate false format: YYYY-MM-DD
technicalSpecification false -
dynamicData false -
TechnicalSpecification color false not empty
weight false positive
trunkVolume false not negative
engine false -
transmission false {MANUAL, AUTOMATIC}
tire false -
numberOfSeats false not negative
numberOfDoors false not negative
fuel false not empty
fuelCapacity false regex: ^((\d+\.\d+L)|(\d+\.\d+kWh)|((\d+\.\d+L);(\d+\.\d+kWh)))$
consumption false -
emissions false -
Engine type false not empty
power false positive
Tire manufacturer false not empty
type false regex: ^(\d{3}\/\d{2})([RD]F?)(\d{2})(\d{2,3})?(A[1-8]|[B-H]|[J-N]|[P-W]|Y)?$
Consumption city false positive
overland false positive
combined false positive
Emmissions city false not negative
overland false not negative
combined false not negative
DynamicData fuelLevelPercentage false range: [ 0 ; 100 ]
position false -
trunkLockState false {LOCKED, UNLOCKED}
doorsLockState false {LOCKED, UNLOCKED}
engineState false {ON, OFF}
Position latitude false not empty
longitude false not empty