Package org.goplanit.zoning
Class DirectedConnectoidImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.zoning.ConnectoidImpl
-
- org.goplanit.zoning.DirectedConnectoidImpl
-
- All Implemented Interfaces:
Cloneable
,Comparable<IdAble>
,Iterable<Zone>
,ExternalIdAble
,IdAble
,ManagedId
,Connectoid
,DirectedConnectoid
public class DirectedConnectoidImpl extends ConnectoidImpl implements DirectedConnectoid
Undirected connectoid connecting one or more (transfer/OD) zone(s) to the physical road network, each connection will yield a connectoid edge and two connectoid segments when constructing the transport network internally based on the referenced node- Author:
- markr
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.goplanit.zoning.ConnectoidImpl
ConnectoidImpl.AccessZoneProperties
-
-
Field Summary
Fields Modifier and Type Field Description protected LinkSegment
accessEdgeSegment
the access point to an infrastructure layerprotected long
directedConnectoidId
unique id across directed connectoidsprotected boolean
nodeAccessDownstream
the node access given an access edge segment is either up or downstream-
Fields inherited from class org.goplanit.zoning.ConnectoidImpl
accessZones, name, type
-
Fields inherited from interface org.goplanit.utils.zoning.Connectoid
CONNECTOID_ID_CLASS, DEFAULT_CONNECTOID_TYPE, DEFAULT_LENGTH_KM
-
Fields inherited from interface org.goplanit.utils.zoning.DirectedConnectoid
DEFAULT_NODE_ACCESS_DOWNSTREAM, DIRECTED_CONNECTOID_ID_CLASS
-
-
Constructor Summary
Constructors Modifier Constructor Description DirectedConnectoidImpl(IdGroupingToken idToken, LinkSegment accessEdgeSegment)
Constructorprotected
DirectedConnectoidImpl(IdGroupingToken idToken, LinkSegment accessLinkSegment, Zone accessZone, double length)
Constructorprotected
DirectedConnectoidImpl(DirectedConnectoidImpl connectoidImpl)
Copy constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DirectedConnectoidImpl
clone()
Create a shallow copy of this entityprotected static long
generateDirectedConnectoidId(IdGroupingToken groupId)
Generate directed connectoid idLinkSegment
getAccessLinkSegment()
The edge segment that provides accessDirectedVertex
getAccessVertex()
collect the access vertex for this connectoidlong
getDirectedConnectoidId()
the directed connectoid unique idboolean
isNodeAccessDownstream()
determine if the node access is downstream or notlong
recreateManagedIds(IdGroupingToken tokenId)
recreate the internal id(s) and set them including the Idable idvoid
replaceAccessLinkSegment(EdgeSegment exitEdgeSegment)
Replace the access link segment for this connectoidprotected void
setAccessLinkSegment(LinkSegment accessEdgeSegment)
Set the accessEdgeSegmentprotected void
setDirectedConnectoidId(long directedConnectoidId)
set the directed connectoid idvoid
setNodeAccessDownstream(boolean nodeAccessDownstream)
set if the node access is downstream or not-
Methods inherited from class org.goplanit.zoning.ConnectoidImpl
addAccessZone, addAllowedMode, generateId, getAccessZones, getExplicitlyAllowedModes, getFirstAccessZone, getLengthKm, getName, getNumberOfAccessZones, getType, hasAccessZone, isModeAllowed, iterator, recreateAccessZoneIdMapping, setId, setLength, setName, setType
-
Methods inherited from class org.goplanit.utils.id.ExternalIdAbleImpl
getExternalId, getXmlId, setExternalId, setXmlId
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, generateId, getId, hashCode
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.zoning.Connectoid
addAccessZone, addAllowedMode, addAllowedModes, addAllowedModes, getAccessZones, getExplicitlyAllowedModes, getFirstAccessZone, getIdClass, getLengthKm, getName, getNumberOfAccessZones, getType, hasAccessZone, hasAccessZones, hasExplicitlyAllowedModes, hasLength, hasName, isAllModesAllowed, isModeAllowed, setLength, setName, setType
-
Methods inherited from interface org.goplanit.utils.zoning.DirectedConnectoid
getAccessNode, getDirectedConnectoidIdClass, hasAccessLinkSegment
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
resetChildManagedIdEntities
-
-
-
-
Field Detail
-
directedConnectoidId
protected long directedConnectoidId
unique id across directed connectoids
-
accessEdgeSegment
protected LinkSegment accessEdgeSegment
the access point to an infrastructure layer
-
nodeAccessDownstream
protected boolean nodeAccessDownstream
the node access given an access edge segment is either up or downstream
-
-
Constructor Detail
-
DirectedConnectoidImpl
protected DirectedConnectoidImpl(IdGroupingToken idToken, LinkSegment accessLinkSegment, Zone accessZone, double length)
Constructor- Parameters:
idToken
- contiguous id generation within this group for instances of this classaccessLinkSegment
- the link segment in the network (layer) the connectoid connects with (possibly via its downstream node)accessZone
- for the connectoidlength
- for the connection (not of the edge segment, but to access the zone)
-
DirectedConnectoidImpl
public DirectedConnectoidImpl(IdGroupingToken idToken, LinkSegment accessEdgeSegment)
Constructor- Parameters:
idToken
- contiguous id generation within this group for instances of this classaccessEdgeSegment
- the edge segment in the network (layer) the connectoid connects with (possibly via its downstream node)
-
DirectedConnectoidImpl
protected DirectedConnectoidImpl(DirectedConnectoidImpl connectoidImpl)
Copy constructor- Parameters:
connectoidImpl
- to copy
-
-
Method Detail
-
generateDirectedConnectoidId
protected static long generateDirectedConnectoidId(IdGroupingToken groupId)
Generate directed connectoid id- Parameters:
groupId
- contiguous id generation within this group for instances of this class- Returns:
- id of directed connectoid
-
setDirectedConnectoidId
protected void setDirectedConnectoidId(long directedConnectoidId)
set the directed connectoid id- Parameters:
directedConnectoidId
- to use
-
setAccessLinkSegment
protected void setAccessLinkSegment(LinkSegment accessEdgeSegment)
Set the accessEdgeSegment- Parameters:
accessEdgeSegment
- to use
-
getDirectedConnectoidId
public long getDirectedConnectoidId()
the directed connectoid unique id- Specified by:
getDirectedConnectoidId
in interfaceDirectedConnectoid
- Returns:
- directed connectoid id
-
getAccessLinkSegment
public LinkSegment getAccessLinkSegment()
The edge segment that provides access- Specified by:
getAccessLinkSegment
in interfaceDirectedConnectoid
- Returns:
- access edge segment
-
replaceAccessLinkSegment
public void replaceAccessLinkSegment(EdgeSegment exitEdgeSegment)
Replace the access link segment for this connectoid- Specified by:
replaceAccessLinkSegment
in interfaceDirectedConnectoid
- Parameters:
exitEdgeSegment
- to use
-
isNodeAccessDownstream
public boolean isNodeAccessDownstream()
determine if the node access is downstream or not- Specified by:
isNodeAccessDownstream
in interfaceDirectedConnectoid
- Returns:
- true when downstream, false otherwise, i.e., upstream
-
setNodeAccessDownstream
public void setNodeAccessDownstream(boolean nodeAccessDownstream)
set if the node access is downstream or not- Specified by:
setNodeAccessDownstream
in interfaceDirectedConnectoid
- Parameters:
nodeAccessDownstream
- true to set it downstream, false otherwise
-
getAccessVertex
public DirectedVertex getAccessVertex()
collect the access vertex for this connectoid- Specified by:
getAccessVertex
in interfaceConnectoid
- Returns:
- access vertex
-
recreateManagedIds
public long recreateManagedIds(IdGroupingToken tokenId)
recreate the internal id(s) and set them including the Idable id- Specified by:
recreateManagedIds
in interfaceManagedId
- Overrides:
recreateManagedIds
in classConnectoidImpl
- Parameters:
tokenId
- to use- Returns:
- the updated internal id
-
clone
public DirectedConnectoidImpl clone()
Create a shallow copy of this entity- Specified by:
clone
in interfaceIdAble
- Specified by:
clone
in classConnectoidImpl
- Returns:
- shallow copy of entity
-
-