Package org.goplanit.network
Class ServiceNetwork
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<Network>
-
- org.goplanit.network.Network
-
- org.goplanit.network.LayeredNetwork<T,U>
-
- org.goplanit.network.TopologicalLayerNetwork<ServiceNetworkLayer,ServiceNetworkLayers>
-
- org.goplanit.network.ServiceNetwork
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,EventListener
,ExternalIdAble
,IdAble
public class ServiceNetwork extends TopologicalLayerNetwork<ServiceNetworkLayer,ServiceNetworkLayers>
A service network is a network built on top of a topological (physical) transport network providing services leveraging this underlying network. Each ServiceNetworkLayer in turn relates one-on-one to a (physical) topological layer where it provides services on that layer.- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.goplanit.network.Network
MACROSCOPIC_NETWORK, networkIdGroupingToken
-
-
Constructor Summary
Constructors Constructor Description ServiceNetwork(ServiceNetwork other, boolean deepCopy, ManagedIdDeepCopyMapper<ServiceNetworkLayer> layerMapper)
Copy constructor.ServiceNetwork(IdGroupingToken tokenId, MacroscopicNetwork parentNetwork)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ServiceNetworkLayers
createLayersContainer(IdGroupingToken networkIdToken)
Derived type is to provide the actual layer implementationsServiceNetwork
deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possibleMacroscopicNetwork
getParentNetwork()
The parent network of the service networkvoid
logInfo(String prefix)
Log the stats for the service network, e.g., the layers and their aggregate contentsServiceNetwork
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.network.TopologicalLayerNetwork
createBoundingBox, getCoordinateReferenceSystem, setCoordinateReferenceSystem, transform
-
Methods inherited from class org.goplanit.network.LayeredNetwork
getLayerByMode, getLayerByPredefinedModeType, getModes, getTransportLayers, isEmpty, reset
-
Methods inherited from class org.goplanit.network.Network
collectSettingsAsKeyValueMap, getNetworkGroupingTokenId
-
Methods inherited from class org.goplanit.component.PlanitComponent
equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, setExternalId, setXmlId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.event.EventListener
hasKnownSupportedEventTypes
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
appendExternalId, appendExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, hasExternalId, hasXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, idEquals, idHashCode
-
-
-
-
Constructor Detail
-
ServiceNetwork
public ServiceNetwork(IdGroupingToken tokenId, MacroscopicNetwork parentNetwork)
Constructor- Parameters:
tokenId
- to use for id generationparentNetwork
- to use
-
ServiceNetwork
public ServiceNetwork(ServiceNetwork other, boolean deepCopy, ManagedIdDeepCopyMapper<ServiceNetworkLayer> layerMapper)
Copy constructor.- Parameters:
other
- to copy.deepCopy
- when true, create a deep copy, shallow copy otherwiselayerMapper
- to track mapping from original to copy
-
-
Method Detail
-
createLayersContainer
protected ServiceNetworkLayers createLayersContainer(IdGroupingToken networkIdToken)
Derived type is to provide the actual layer implementations- Specified by:
createLayersContainer
in classLayeredNetwork<ServiceNetworkLayer,ServiceNetworkLayers>
- Parameters:
networkIdToken
- to use- Returns:
- infrastructure layers container
-
getParentNetwork
public MacroscopicNetwork getParentNetwork()
The parent network of the service network- Returns:
- parent network
-
logInfo
public void logInfo(String prefix)
Log the stats for the service network, e.g., the layers and their aggregate contents
-
shallowClone
public ServiceNetwork shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in classTopologicalLayerNetwork<ServiceNetworkLayer,ServiceNetworkLayers>
- Returns:
- shallow copy of entity
-
deepClone
public ServiceNetwork deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possible- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in classTopologicalLayerNetwork<ServiceNetworkLayer,ServiceNetworkLayers>
- Returns:
- deep copy of entity
-
-