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 MacroscopicNetworkLayeroriginalLayeroriginal 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 protectedConjugateMacroscopicNetworkLayerImpl(ConjugateMacroscopicNetworkLayerImpl other, boolean deepCopy, GraphEntityDeepCopyMapper<ConjugateNode> nodeMapper, GraphEntityDeepCopyMapper<ConjugateLink> linkMapper, GraphEntityDeepCopyMapper<ConjugateLinkSegment> linkSegmentMapper)Copy constructorprotectedConjugateMacroscopicNetworkLayerImpl(IdGroupingToken groupId, MacroscopicNetworkLayer originalLayer)ConstructorprotectedConjugateMacroscopicNetworkLayerImpl(IdGroupingToken groupId, ConjugateNodes conjugateNodes, ConjugateLinks conjugateLinks, ConjugateLinkSegments conjugateLinkSegments, MacroscopicNetworkLayer originalLayer)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConjugateMacroscopicNetworkLayerImpldeepClone()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.ConjugateLinksgetConjugateLinks()Collect the undirected turns, i.e., conjugate linksConjugateLinkSegmentsgetConjugateLinkSegments()Collect the turns, i.e.ConjugateNodesgetConjugateNodes()Collect the conjugate nodes, i.e., links/link segments in original networkMacroscopicNetworkLayergetOriginalLayer()Reference to original layer this conjugate layer representsvoidlogInfo(String prefix)invoked by entities inquiring about general information about the layer to display to usersvoidreset()Reset the layervoidresetChildManagedIdEntities()Each class that has a managed id, should be able to reset any children that themselves are managedIdEntity containers.ConjugateMacroscopicNetworkLayerImplshallowClone()Create a shallow copy of this entityprotected voidupdate(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:
logInfoin interfaceNetworkLayer- Overrides:
logInfoin 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:
getConjugateLinksin interfaceConjugateMacroscopicNetworkLayer- Returns:
- the undirected turns
-
getConjugateLinkSegments
public ConjugateLinkSegments getConjugateLinkSegments()
Collect the turns, i.e. conjugate link segments- Specified by:
getConjugateLinkSegmentsin interfaceConjugateMacroscopicNetworkLayer- Returns:
- the turns
-
getConjugateNodes
public ConjugateNodes getConjugateNodes()
Collect the conjugate nodes, i.e., links/link segments in original network- Specified by:
getConjugateNodesin interfaceConjugateMacroscopicNetworkLayer- Returns:
- the conjugate nodes
-
shallowClone
public ConjugateMacroscopicNetworkLayerImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClonein interfaceConjugateMacroscopicNetworkLayer- Specified by:
shallowClonein interfaceIdAble- Specified by:
shallowClonein interfaceNetworkLayer- Specified by:
shallowClonein interfaceTopologicalLayer- Specified by:
shallowClonein interfaceUntypedDirectedGraphLayer<ConjugateNode,ConjugateLink,ConjugateLinkSegment>- Specified by:
shallowClonein 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:
deepClonein interfaceConjugateMacroscopicNetworkLayer- Specified by:
deepClonein interfaceIdAble- Specified by:
deepClonein interfaceNetworkLayer- Specified by:
deepClonein interfaceTopologicalLayer- Specified by:
deepClonein interfaceUntypedDirectedGraphLayer<ConjugateNode,ConjugateLink,ConjugateLinkSegment>- Specified by:
deepClonein classUntypedNetworkLayerImpl<ConjugateNode,ConjugateLink,ConjugateLinkSegment>- Returns:
- deep copy of entity
-
reset
public void reset()
Reset the layer- Specified by:
resetin interfaceNetworkLayer- Overrides:
resetin 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:
resetChildManagedIdEntitiesin interfaceManagedId
-
getOriginalLayer
public MacroscopicNetworkLayer getOriginalLayer()
Reference to original layer this conjugate layer represents- Specified by:
getOriginalLayerin interfaceConjugateMacroscopicNetworkLayer- Returns:
- original layer
-
-