Package org.goplanit.service.routed
Interface RoutedServicesLayer
-
- All Superinterfaces:
Cloneable
,Comparable<IdAble>
,ExternalIdAble
,IdAble
,Iterable<RoutedModeServices>
,ManagedId
- All Known Implementing Classes:
RoutedServicesLayerImpl
public interface RoutedServicesLayer extends ManagedId, ExternalIdAble, Iterable<RoutedModeServices>
Interface to reflect a routed services layer which in turn is to be managed by a container class that implements the RoutedServicesLayers interface. A RoutedServiceLayer contains routed services for a given parent service network layer such as for example - but not limited to - bus routes, train lines etc.- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static Class<RoutedServicesLayer>
ROUTED_SERVICES_LAYER_ID_CLASS
id class for generating ids
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Class<RoutedServicesLayer>
getIdClass()
Each managed id class is expected to generate its ids based on its class signature.ServiceNetworkLayer
getParentLayer()
The parent service layer of this routed services layerRoutedModeServices
getServicesByMode(Mode mode)
The services for a given mode available on this layer.void
logInfo(String prefix)
invoked by entities inquiring about general information about the layer to display to usersdefault void
resetChildManagedIdEntities()
Each class that has a managed id, should be able to reset any children that themselves are managedIdEntity containers.-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
clone, compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
recreateManagedIds
-
-
-
-
Field Detail
-
ROUTED_SERVICES_LAYER_ID_CLASS
static final Class<RoutedServicesLayer> ROUTED_SERVICES_LAYER_ID_CLASS
id class for generating ids
-
-
Method Detail
-
getIdClass
default Class<RoutedServicesLayer> getIdClass()
Each managed id class is expected to generate its ids based on its class signature. To be able to generate the correct id the class used for id generation is to be provided via this method call.- Specified by:
getIdClass
in interfaceManagedId
- Returns:
- idClass to use for generating ids for instances of this idable derived class
-
logInfo
void logInfo(String prefix)
invoked by entities inquiring about general information about the layer to display to users- Parameters:
prefix
- optional prefix to include in each line of logging
-
getParentLayer
ServiceNetworkLayer getParentLayer()
The parent service layer of this routed services layer- Returns:
- parent layer
-
getServicesByMode
RoutedModeServices getServicesByMode(Mode mode)
The services for a given mode available on this layer. If no services are yet available an empty instance is provided- Parameters:
mode
- to obtain services for- Returns:
- services by mode, empty instance if none have been registered yet
-
resetChildManagedIdEntities
default 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
-
-