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 LinkSegmentaccessEdgeSegmentthe access point to an infrastructure layerprotected longdirectedConnectoidIdunique id across directed connectoidsprotected booleannodeAccessDownstreamthe 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)ConstructorprotectedDirectedConnectoidImpl(IdGroupingToken idToken, LinkSegment accessLinkSegment, Zone accessZone, double length)ConstructorprotectedDirectedConnectoidImpl(DirectedConnectoidImpl connectoidImpl)Copy constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DirectedConnectoidImplclone()Create a shallow copy of this entityprotected static longgenerateDirectedConnectoidId(IdGroupingToken groupId)Generate directed connectoid idLinkSegmentgetAccessLinkSegment()The edge segment that provides accessDirectedVertexgetAccessVertex()collect the access vertex for this connectoidlonggetDirectedConnectoidId()the directed connectoid unique idbooleanisNodeAccessDownstream()determine if the node access is downstream or notlongrecreateManagedIds(IdGroupingToken tokenId)recreate the internal id(s) and set them including the Idable idvoidreplaceAccessLinkSegment(EdgeSegment exitEdgeSegment)Replace the access link segment for this connectoidprotected voidsetAccessLinkSegment(LinkSegment accessEdgeSegment)Set the accessEdgeSegmentprotected voidsetDirectedConnectoidId(long directedConnectoidId)set the directed connectoid idvoidsetNodeAccessDownstream(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:
getDirectedConnectoidIdin interfaceDirectedConnectoid- Returns:
- directed connectoid id
-
getAccessLinkSegment
public LinkSegment getAccessLinkSegment()
The edge segment that provides access- Specified by:
getAccessLinkSegmentin interfaceDirectedConnectoid- Returns:
- access edge segment
-
replaceAccessLinkSegment
public void replaceAccessLinkSegment(EdgeSegment exitEdgeSegment)
Replace the access link segment for this connectoid- Specified by:
replaceAccessLinkSegmentin interfaceDirectedConnectoid- Parameters:
exitEdgeSegment- to use
-
isNodeAccessDownstream
public boolean isNodeAccessDownstream()
determine if the node access is downstream or not- Specified by:
isNodeAccessDownstreamin 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:
setNodeAccessDownstreamin interfaceDirectedConnectoid- Parameters:
nodeAccessDownstream- true to set it downstream, false otherwise
-
getAccessVertex
public DirectedVertex getAccessVertex()
collect the access vertex for this connectoid- Specified by:
getAccessVertexin interfaceConnectoid- Returns:
- access vertex
-
recreateManagedIds
public long recreateManagedIds(IdGroupingToken tokenId)
recreate the internal id(s) and set them including the Idable id- Specified by:
recreateManagedIdsin interfaceManagedId- Overrides:
recreateManagedIdsin classConnectoidImpl- Parameters:
tokenId- to use- Returns:
- the updated internal id
-
clone
public DirectedConnectoidImpl clone()
Create a shallow copy of this entity- Specified by:
clonein interfaceIdAble- Specified by:
clonein classConnectoidImpl- Returns:
- shallow copy of entity
-
-