Package org.goplanit.network
Class UntypedPhysicalNetwork<L extends UntypedPhysicalLayer<?,?,?>,LS extends UntypedPhysicalNetworkLayers<L>>
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<Network>
-
- org.goplanit.network.Network
-
- org.goplanit.network.LayeredNetwork<T,U>
-
- org.goplanit.network.TopologicalLayerNetwork<L,LS>
-
- org.goplanit.network.UntypedPhysicalNetwork<L,LS>
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,EventListener
,ExternalIdAble
,IdAble
- Direct Known Subclasses:
MacroscopicNetwork
public abstract class UntypedPhysicalNetwork<L extends UntypedPhysicalLayer<?,?,?>,LS extends UntypedPhysicalNetworkLayers<L>> extends TopologicalLayerNetwork<L,LS>
A network that comprises physical topological transport network elements, i.e., roads, rail, etc.- Author:
- markr
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.goplanit.network.Network
MACROSCOPIC_NETWORK, networkIdGroupingToken
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UntypedPhysicalNetwork(UntypedPhysicalNetwork<L,LS> other, boolean deepCopy, ManagedIdDeepCopyMapper<Mode> modeMapper, ManagedIdDeepCopyMapper<L> layerMapper)
Copy constructor.UntypedPhysicalNetwork(IdGroupingToken tokenId)
Default constructorUntypedPhysicalNetwork(IdGroupingToken tokenId, org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem)
Default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract UntypedPhysicalNetwork
deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possiblevoid
removeDanglingSubnetworks()
remove any dangling subnetworks from the network's layers if they exist and subsequently reorder the internal ids if neededvoid
removeDanglingSubnetworks(Integer belowSize, Integer aboveSize, boolean alwaysKeepLargest)
remove any dangling subnetworks below a given size from the network if they exist and subsequently reorder the internal ids if neededabstract UntypedPhysicalNetwork
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
createLayersContainer, getLayerByMode, getLayerByPredefinedModeType, getModes, getTransportLayers, isEmpty, reset
-
Methods inherited from class org.goplanit.network.Network
collectSettingsAsKeyValueMap, getNetworkGroupingTokenId, logInfo
-
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
-
UntypedPhysicalNetwork
public UntypedPhysicalNetwork(IdGroupingToken tokenId)
Default constructor- Parameters:
tokenId
- to use for id generation
-
UntypedPhysicalNetwork
public UntypedPhysicalNetwork(IdGroupingToken tokenId, org.opengis.referencing.crs.CoordinateReferenceSystem coordinateReferenceSystem)
Default constructor- Parameters:
tokenId
- to use for id generationcoordinateReferenceSystem
- preferred coordinate reference system to use
-
UntypedPhysicalNetwork
protected UntypedPhysicalNetwork(UntypedPhysicalNetwork<L,LS> other, boolean deepCopy, ManagedIdDeepCopyMapper<Mode> modeMapper, ManagedIdDeepCopyMapper<L> layerMapper)
Copy constructor.- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwisemodeMapper
- to use for tracking mapping between original and copied modeslayerMapper
- to use for tracking mapping between original and copied layers
-
-
Method Detail
-
removeDanglingSubnetworks
public void removeDanglingSubnetworks() throws PlanItException
remove any dangling subnetworks from the network's layers if they exist and subsequently reorder the internal ids if needed- Throws:
PlanItException
- thrown if error
-
removeDanglingSubnetworks
public void removeDanglingSubnetworks(Integer belowSize, Integer aboveSize, boolean alwaysKeepLargest)
remove any dangling subnetworks below a given size from the network if they exist and subsequently reorder the internal ids if needed- Parameters:
belowSize
- remove subnetworks below the given sizeaboveSize
- remove subnetworks above the given size (typically set to maximum value)alwaysKeepLargest
- when true the largest of the subnetworks is always kept, otherwise not
-
shallowClone
public abstract UntypedPhysicalNetwork shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in classTopologicalLayerNetwork<L extends UntypedPhysicalLayer<?,?,?>,LS extends UntypedPhysicalNetworkLayers<L>>
- Returns:
- shallow copy of entity
-
deepClone
public abstract UntypedPhysicalNetwork 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<L extends UntypedPhysicalLayer<?,?,?>,LS extends UntypedPhysicalNetworkLayers<L>>
- Returns:
- deep copy of entity
-
-