Class Transformer
java.lang.Object
org.opentrafficsim.road.network.factory.xml.utils.Transformer
public final class Transformer extends Object
Transformer contains common transformations between intermediate classes created by the JAXB Adapters and OTS objects.
Copyright (c) 2003-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
Copyright (c) 2003-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
- Author:
- Alexander Verbraeck
-
Method Summary
Modifier and Type Method Description static ArrivalsHeadwayGenerator.HeadwayDistributionparseHeadwayDistribution(String v)static LaneKeepingPolicyparseLaneKeepingPolicy(String lkpStr)static LengthparseLengthBeginEnd(LengthBeginEnd lbe, Length laneLength)Parse LengthBeginEnd for a Lane.static LaneBasedGTUGenerator.RoomCheckerparseRoomChecker(String v)static RelativePosition.TYPEparseTriggerPosition(GTUPositionType positionType)
-
Method Details
-
parseLengthBeginEnd
Parse LengthBeginEnd for a Lane.- Parameters:
lbe- LengthBeginEnd; the begin, end, fraction, or offset from begin or end on the lanelaneLength- Length; the length of the lane- Returns:
- the offset on the lane
-
parseTriggerPosition
- Parameters:
positionType- GTUPositionType; the JAXB position to parse- Returns:
- the corresponding OTS RelativePosition
-
parseLaneKeepingPolicy
- Parameters:
lkpStr- String; the lane keeping policy string.- Returns:
- the lane keeping policy.
- Throws:
NetworkException- in case of unknown policy.
-
parseRoomChecker
- Parameters:
v- String; XML string value- Returns:
- RoomChecker; parsed room checker
-
parseHeadwayDistribution
public static ArrivalsHeadwayGenerator.HeadwayDistribution parseHeadwayDistribution(String v) throws NoSuchFieldException, IllegalAccessException- Parameters:
v- String; XML string value- Returns:
- RoomChecker; parsed room checker
- Throws:
NoSuchFieldException- ifHeadwayDistributiondoes not have specified fieldIllegalAccessException- if the field is not accessible
-