Class ConjugateMacroscopicNetworkLayerImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.network.layer.NetworkLayerImpl
-
- org.goplanit.network.layer.TopologicalLayerImpl
-
- org.goplanit.network.layer.UntypedNetworkLayerImpl<ConjugateNode,ConjugateLink,ConjugateLinkSegment>
-
- org.goplanit.network.layer.macroscopic.ConjugateMacroscopicNetworkLayerImpl
-
- All Implemented Interfaces:
Comparable<IdAble>
,ExternalIdAble
,IdAble
,ManagedId
,ConjugateMacroscopicNetworkLayer
,NetworkLayer
,TopologicalLayer
,UntypedDirectedGraphLayer<ConjugateNode,ConjugateLink,ConjugateLinkSegment>
public class ConjugateMacroscopicNetworkLayerImpl extends UntypedNetworkLayerImpl<ConjugateNode,ConjugateLink,ConjugateLinkSegment> implements ConjugateMacroscopicNetworkLayer
Conjugate of macroscopic physical Network (layer), i.e. the edge-to-vertex dual of its original form- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected MacroscopicNetworkLayer
originalLayer
original layer this conjugate layer is based on-
Fields inherited from class org.goplanit.network.layer.UntypedNetworkLayerImpl
directedGraph, layerModifier
-
Fields inherited from class org.goplanit.network.layer.NetworkLayerImpl
supportedModes
-
Fields inherited from interface org.goplanit.utils.network.layer.NetworkLayer
NETWORK_LAYER_ID_CLASS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConjugateMacroscopicNetworkLayerImpl(ConjugateMacroscopicNetworkLayerImpl other, boolean deepCopy, GraphEntityDeepCopyMapper<ConjugateNode> nodeMapper, GraphEntityDeepCopyMapper<ConjugateLink> linkMapper, GraphEntityDeepCopyMapper<ConjugateLinkSegment> linkSegmentMapper)
Copy constructorprotected
ConjugateMacroscopicNetworkLayerImpl(IdGroupingToken groupId, MacroscopicNetworkLayer originalLayer)
Constructorprotected
ConjugateMacroscopicNetworkLayerImpl(IdGroupingToken groupId, ConjugateNodes conjugateNodes, ConjugateLinks conjugateLinks, ConjugateLinkSegments conjugateLinkSegments, MacroscopicNetworkLayer originalLayer)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConjugateMacroscopicNetworkLayerImpl
deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call.ConjugateLinks
getConjugateLinks()
Collect the undirected turns, i.e., conjugate linksConjugateLinkSegments
getConjugateLinkSegments()
Collect the turns, i.e.ConjugateNodes
getConjugateNodes()
Collect the conjugate nodes, i.e., links/link segments in original networkMacroscopicNetworkLayer
getOriginalLayer()
Reference to original layer this conjugate layer representsvoid
logInfo(String prefix)
invoked by entities inquiring about general information about the layer to display to usersvoid
reset()
Reset the layervoid
resetChildManagedIdEntities()
Each class that has a managed id, should be able to reset any children that themselves are managedIdEntity containers.ConjugateMacroscopicNetworkLayerImpl
shallowClone()
Create a shallow copy of this entityprotected void
update(ConjugateVirtualNetwork conjugateVirtualNetwork)
Reset and re-populate entire conjugate network layer based on current state of original layer this is the conjugate of-
Methods inherited from class org.goplanit.network.layer.UntypedNetworkLayerImpl
createBoundingBox, getDirectedGraph, getLayerIdGroupingToken, getLayerModifier, isEmpty, transform, validate
-
Methods inherited from class org.goplanit.network.layer.NetworkLayerImpl
generateId, getSupportedModes, recreateManagedIds, registerSupportedMode, registerSupportedModes, supportsPredefinedMode
-
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, setId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
appendExternalId, appendExternalId, getExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds
-
Methods inherited from interface org.goplanit.utils.network.layer.NetworkLayer
getFirstSupportedMode, getIdClass, getSupportedModes, hasSupportedModes, isEmpty, registerSupportedMode, registerSupportedModes, supports, supports, supportsPredefinedMode, validate
-
Methods inherited from interface org.goplanit.utils.network.layer.TopologicalLayer
createBoundingBox, transform
-
Methods inherited from interface org.goplanit.utils.network.layer.UntypedDirectedGraphLayer
getLayerIdGroupingToken, getLayerModifier
-
-
-
-
Field Detail
-
originalLayer
protected final MacroscopicNetworkLayer originalLayer
original layer this conjugate layer is based on
-
-
Constructor Detail
-
ConjugateMacroscopicNetworkLayerImpl
protected ConjugateMacroscopicNetworkLayerImpl(IdGroupingToken groupId, MacroscopicNetworkLayer originalLayer)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this classoriginalLayer
- this conjugate is based on
-
ConjugateMacroscopicNetworkLayerImpl
protected ConjugateMacroscopicNetworkLayerImpl(IdGroupingToken groupId, ConjugateNodes conjugateNodes, ConjugateLinks conjugateLinks, ConjugateLinkSegments conjugateLinkSegments, MacroscopicNetworkLayer originalLayer)
Constructor- Parameters:
groupId
- contiguous id generation within this group for instances of this classconjugateNodes
- to useconjugateLinks
- to useconjugateLinkSegments
- to useoriginalLayer
- this conjugate is based on
-
ConjugateMacroscopicNetworkLayerImpl
protected ConjugateMacroscopicNetworkLayerImpl(ConjugateMacroscopicNetworkLayerImpl other, boolean deepCopy, GraphEntityDeepCopyMapper<ConjugateNode> nodeMapper, GraphEntityDeepCopyMapper<ConjugateLink> linkMapper, GraphEntityDeepCopyMapper<ConjugateLinkSegment> linkSegmentMapper)
Copy constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwisenodeMapper
- to uselinkMapper
- to uselinkSegmentMapper
- to use
-
-
Method Detail
-
update
protected void update(ConjugateVirtualNetwork conjugateVirtualNetwork)
Reset and re-populate entire conjugate network layer based on current state of original layer this is the conjugate of- Parameters:
conjugateVirtualNetwork
- to use when connecting to original connectoid edges/segments
-
logInfo
public void logInfo(String prefix)
invoked by entities inquiring about general information about the layer to display to users- Specified by:
logInfo
in interfaceNetworkLayer
- Overrides:
logInfo
in classNetworkLayerImpl
- Parameters:
prefix
- optional prefix to include in each line of logging
-
getConjugateLinks
public ConjugateLinks getConjugateLinks()
Collect the undirected turns, i.e., conjugate links- Specified by:
getConjugateLinks
in interfaceConjugateMacroscopicNetworkLayer
- Returns:
- the undirected turns
-
getConjugateLinkSegments
public ConjugateLinkSegments getConjugateLinkSegments()
Collect the turns, i.e. conjugate link segments- Specified by:
getConjugateLinkSegments
in interfaceConjugateMacroscopicNetworkLayer
- Returns:
- the turns
-
getConjugateNodes
public ConjugateNodes getConjugateNodes()
Collect the conjugate nodes, i.e., links/link segments in original network- Specified by:
getConjugateNodes
in interfaceConjugateMacroscopicNetworkLayer
- Returns:
- the conjugate nodes
-
shallowClone
public ConjugateMacroscopicNetworkLayerImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceConjugateMacroscopicNetworkLayer
- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceNetworkLayer
- Specified by:
shallowClone
in interfaceTopologicalLayer
- Specified by:
shallowClone
in interfaceUntypedDirectedGraphLayer<ConjugateNode,ConjugateLink,ConjugateLinkSegment>
- Specified by:
shallowClone
in classUntypedNetworkLayerImpl<ConjugateNode,ConjugateLink,ConjugateLinkSegment>
- Returns:
- shallow copy of entity
-
deepClone
public ConjugateMacroscopicNetworkLayerImpl deepClone()
An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code- Specified by:
deepClone
in interfaceConjugateMacroscopicNetworkLayer
- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in interfaceNetworkLayer
- Specified by:
deepClone
in interfaceTopologicalLayer
- Specified by:
deepClone
in interfaceUntypedDirectedGraphLayer<ConjugateNode,ConjugateLink,ConjugateLinkSegment>
- Specified by:
deepClone
in classUntypedNetworkLayerImpl<ConjugateNode,ConjugateLink,ConjugateLinkSegment>
- Returns:
- deep copy of entity
-
reset
public void reset()
Reset the layer- Specified by:
reset
in interfaceNetworkLayer
- Overrides:
reset
in classUntypedNetworkLayerImpl<ConjugateNode,ConjugateLink,ConjugateLinkSegment>
-
resetChildManagedIdEntities
public void resetChildManagedIdEntities()
Each class that has a managed id, should be able to reset any children that themselves are managedIdEntity containers. This ensures that when resetting such a container any child containers are also reset- Specified by:
resetChildManagedIdEntities
in interfaceManagedId
-
getOriginalLayer
public MacroscopicNetworkLayer getOriginalLayer()
Reference to original layer this conjugate layer represents- Specified by:
getOriginalLayer
in interfaceConjugateMacroscopicNetworkLayer
- Returns:
- original layer
-
-