1 package org.opentrafficsim.water.network.infra;
2
3 import org.opentrafficsim.water.AbstractNamedLocated;
4 import org.opentrafficsim.water.network.WaterwayLocation;
5
6 /**
7 * Obstacle in a waterway.
8 * <p>
9 * Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
10 * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>.
11 * </p>
12 * <p>
13 * Based on software from the IDVV project, which is Copyright (c) 2013 Rijkswaterstaat - Dienst Water, Verkeer en Leefomgeving
14 * and licensed without restrictions to Delft University of Technology, including the right to sub-license sources and derived
15 * products to third parties.
16 * </p>
17 * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $,
18 * initial version Nov 6, 2016 <br>
19 * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
20 */
21 public abstract class Obstacle extends AbstractNamedLocated
22 {
23 /** */
24 private static final long serialVersionUID = 20161105L;
25
26 /** the waterway along which it is located, and the location on the waterway. */
27 private final WaterwayLocation waterwayLocation;
28
29 /**
30 * @param name String; the name of the obstacle
31 * @param waterwayLocation WaterwayLocation; location of the obstacle along the waterway
32 */
33 public Obstacle(final String name, final WaterwayLocation waterwayLocation)
34 {
35 super(name, waterwayLocation.getLocation());
36 this.waterwayLocation = waterwayLocation;
37 }
38
39 /**
40 * @return waterwayLocation
41 */
42 protected final WaterwayLocation getWaterwayLocation()
43 {
44 return this.waterwayLocation;
45 }
46
47 }