Interface RoutedService
-
- All Superinterfaces:
Comparable<IdAble>
,ExternalIdAble
,IdAble
,ManagedId
- All Known Implementing Classes:
RoutedServiceImpl
public interface RoutedService extends ManagedId, ExternalIdAble
Interface to reflect a routed service. A routed service reflects a route on a service network comprising of one or more legs. A leg comprises one or more physical links on an underlying physical network.- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static Class<RoutedService>
ROUTED_SERVICE_ID_CLASS
id class for generating ids
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RoutedService
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.default org.locationtech.jts.geom.MultiLineString
extractGeometry(boolean includeScheduledTrips, boolean includeFrequencyBasedTrips)
Construct combined geometry across all serviced tripsdefault Class<RoutedService>
getIdClass()
Each managed id class is expected to generate its ids based on its class signature.Mode
getMode()
Access to the mode this routed service utilisesString
getName()
Name of the service, can be a number.String
getNameDescription()
Description of the name of the service, usually a short elaboration in addition to the name (number), for example for a bus the name could be 370 and the nameDescription "Balmain to Coogee"String
getServiceDescription()
Description of the service, longer (if at all) and contextual not meant for end user in realityRoutedServiceTripInfo
getTripInfo()
Access to the trips available for this servicedefault boolean
hasName()
Verify if routed service has a namedefault boolean
hasNameDescription()
Verify if routed service has a name descriptiondefault boolean
hasServiceDescription()
Verify if routed service has a name descriptionvoid
setName(String name)
Name of the service, can be a number.void
setNameDescription(String nameDescription)
Description of the name of the service, usually a short elaboration in addition to the name (number), for example for a bus the name could be 370 and the nameDescription "Balmain to Coogee"void
setServiceDescription(String serviceDescription)
Description of the service, longer (if at all) and contextual not meant for end user in realityRoutedService
shallowClone()
Create a shallow copy of this entity-
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, resetChildManagedIdEntities
-
-
-
-
Field Detail
-
ROUTED_SERVICE_ID_CLASS
static final Class<RoutedService> ROUTED_SERVICE_ID_CLASS
id class for generating ids
-
-
Method Detail
-
getIdClass
default Class<RoutedService> 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
-
shallowClone
RoutedService shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Returns:
- shallow copy of entity
-
deepClone
RoutedService 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
-
getName
String getName()
Name of the service, can be a number. Shortest visual (user) identifier for the service- Returns:
- name
-
hasName
default boolean hasName()
Verify if routed service has a name- Returns:
- true when present and non-empty, false otherwise
-
setName
void setName(String name)
Name of the service, can be a number. Shortest visual (user) identifier for the service- Parameters:
name
- to use
-
getNameDescription
String getNameDescription()
Description of the name of the service, usually a short elaboration in addition to the name (number), for example for a bus the name could be 370 and the nameDescription "Balmain to Coogee"- Returns:
- nameDescription
-
hasNameDescription
default boolean hasNameDescription()
Verify if routed service has a name description- Returns:
- true when present and non-empty, false otherwise
-
setNameDescription
void setNameDescription(String nameDescription)
Description of the name of the service, usually a short elaboration in addition to the name (number), for example for a bus the name could be 370 and the nameDescription "Balmain to Coogee"- Parameters:
nameDescription
- to use
-
getServiceDescription
String getServiceDescription()
Description of the service, longer (if at all) and contextual not meant for end user in reality- Returns:
- serviceDescription
-
hasServiceDescription
default boolean hasServiceDescription()
Verify if routed service has a name description- Returns:
- true when present and non-empty, false otherwise
-
setServiceDescription
void setServiceDescription(String serviceDescription)
Description of the service, longer (if at all) and contextual not meant for end user in reality- Parameters:
serviceDescription
- to use
-
getTripInfo
RoutedServiceTripInfo getTripInfo()
Access to the trips available for this service- Returns:
- known routed service trips
-
getMode
Mode getMode()
Access to the mode this routed service utilises- Returns:
- mode for this routed service
-
extractGeometry
default org.locationtech.jts.geom.MultiLineString extractGeometry(boolean includeScheduledTrips, boolean includeFrequencyBasedTrips)
Construct combined geometry across all serviced trips- Parameters:
includeScheduledTrips
- when true consider scheduled trips, false do notincludeFrequencyBasedTrips
- when true consider frequency based trips, false do not- Returns:
- combined geometry of all service leg segments used by the service
-
-