Package org.goplanit.utils.id
Interface ExternalIdAble
-
- All Superinterfaces:
Comparable<IdAble>
,IdAble
- All Known Subinterfaces:
CentroidVertex
,ConjugateConnectoidEdge
,ConjugateConnectoidNode
,ConjugateConnectoidSegment
,ConjugateDirectedEdge
,ConjugateDirectedVertex
,ConjugateEdge
,ConjugateEdgeSegment
,ConjugateLink
,ConjugateLinkSegment
,ConjugateMacroscopicNetworkLayer
,ConjugateNode
,ConjugateVertex
,Connectoid
,ConnectoidEdge
,ConnectoidSegment
,DirectedConnectoid
,DirectedEdge
,DirectedVertex
,Edge
,EdgeSegment
,GraphEntity
,Link
,LinkSegment
,MacroscopicLink
,MacroscopicLinkSegment
,MacroscopicLinkSegmentType
,MacroscopicNetworkLayer
,ManagedDirectedPath
,Mode
,NetworkLayer
,Node
,OdZone
,PhysicalLayer
,PredefinedMode
,RoutedService
,RoutedServicesLayer
,RoutedTrip
,RoutedTripDeparture
,RoutedTripFrequency
,RoutedTripSchedule
,ServiceLeg
,ServiceLegSegment
,ServiceNetworkLayer
,ServiceNode
,TimePeriod
,TopologicalLayer
,TransferZone
,TransferZoneGroup
,UndirectedConnectoid
,UntypedDirectedGraphLayer<V,E,S>
,UntypedPhysicalLayer<N,L,LS>
,Vertex
,Zone
- All Known Implementing Classes:
AbstractPhysicalCost
,AbstractVirtualCost
,AlgorithmB
,BicycleMode
,BprLinkTravelTimeCost
,BusMode
,CarHighOccupancyMode
,CarMode
,CarShareMode
,CentroidVertexImpl
,ConjugateConnectoidEdgeImpl
,ConjugateConnectoidNodeImpl
,ConjugateConnectoidSegmentImpl
,ConjugateDirectedEdgeImpl
,ConjugateDirectedVertexImpl
,ConjugateEdgeImpl
,ConjugateEdgeSegmentImpl
,ConjugateLinkImpl
,ConjugateLinkSegmentImpl
,ConjugateMacroscopicNetworkLayerImpl
,ConjugateNodeImpl
,ConjugateVertexImpl
,ConnectoidEdgeImpl
,ConnectoidImpl
,ConnectoidSegmentImpl
,Demands
,DirectedConnectoidImpl
,DirectedEdgeImpl
,DirectedVertexImpl
,EdgeImpl
,EdgeSegmentImpl
,EventBasedLtm
,ExternalIdAbleImpl
,FerryMode
,FixedConnectoidTravelTimeCost
,FixedInitialMacroscopicLinkSegmentCost
,FreeFlowLinkTravelTimeCost
,FundamentalDiagramComponent
,GapFunction
,GoodsMode
,GraphEntityImpl
,HeavyGoodsMode
,InitialMacroscopicLinkSegmentCost
,InitialPhysicalCost
,LargeHeavyGoodsMode
,LayeredNetwork
,LightRailMode
,LinkBasedRelativeDualityGapFunction
,LinkImpl
,LinkSegmentBase
,LogitChoiceModel
,LtmAssignment
,MacroscopicLinkImpl
,MacroscopicLinkSegmentImpl
,MacroscopicLinkSegmentTypeImpl
,MacroscopicNetwork
,MacroscopicNetworkLayerImpl
,ManagedDirectedPathImpl
,ModeImpl
,MotorBikeMode
,MSASmoothing
,MultinomialLogit
,Network
,NetworkLayerImpl
,NetworkLoading
,NewellFundamentalDiagramComponent
,NodeImpl
,NodeModelComponent
,NormBasedGapFunction
,OdPathSets
,OdZoneImpl
,PathChoice
,PedestrianMode
,PlanitComponent
,PlanitOsmNetwork
,PredefinedModeImpl
,RoutedServiceImpl
,RoutedServices
,RoutedServicesLayerImpl
,RoutedTripDepartureImpl
,RoutedTripFrequencyImpl
,RoutedTripImpl
,RoutedTripScheduleImpl
,ServiceLegImpl
,ServiceLegSegmentImpl
,ServiceNetwork
,ServiceNetworkLayerImpl
,ServiceNodeImpl
,Smoothing
,SpeedConnectoidTravelTimeCost
,StaticLtm
,StaticTrafficAssignment
,SteadyStateTravelTimeCost
,StochasticPathChoice
,SubwayMode
,TampereNodeModelComponent
,TimePeriodImpl
,TopologicalLayerImpl
,TopologicalLayerNetwork
,TraditionalStaticAssignment
,TrafficAssignment
,TrainMode
,TramMode
,TransferZoneGroupImpl
,TransferZoneImpl
,TravellerType
,UndirectedConnectoidImpl
,UntypedNetworkLayerImpl
,UntypedPhysicalLayerImpl
,UntypedPhysicalNetwork
,UserClass
,VertexImpl
,VirtualNetworkImpl
,ZoneImpl
,Zoning
public interface ExternalIdAble extends IdAble
A class implementing this interface signals that it is external id-able. Anything that has an external id by definition should also be Idable as well. Unlike an id, the external id is by definition modifiable. further, something that can have an external id also has an xmlId reflecting a unique id used for persistence. This differs from the regular id in that it is less stringent, it is modifiable, and only needs to be unique. It is not necessarily a number and it does not need to be consecutively numbers from zero.- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
appendExternalId(String appendWith)
append the external id with additional id if non-empty, separated with commadefault void
appendExternalId(String appendWith, Character separator)
append the external id with additional id if non-empty, separated with provided separatorString
getExternalId()
get external id of the entitydefault String
getIdsAsString()
Returns string representation contain the three ids, id, XMLid and external iddefault String[]
getSplitExternalId()
Collect external id split by default comma separatordefault String[]
getSplitExternalId(char separator)
Collect external id split by custom separatorString
getXmlId()
the id exposed to users as the "normal" id in the PLANit native xml formatdefault boolean
hasExternalId()
check if external id is available or notdefault boolean
hasXmlId()
check if external id is available or notvoid
setExternalId(String externalId)
set the external iddefault void
setXmlId(long xmlId)
set the external idvoid
setXmlId(String xmlId)
set the external id-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, deepClone, getId, idEquals, idHashCode, shallowClone
-
-
-
-
Method Detail
-
getExternalId
String getExternalId()
get external id of the entity- Returns:
- external id
-
setExternalId
void setExternalId(String externalId)
set the external id- Parameters:
externalId
- to set
-
getXmlId
String getXmlId()
the id exposed to users as the "normal" id in the PLANit native xml format- Returns:
- xmlId
-
setXmlId
void setXmlId(String xmlId)
set the external id- Parameters:
xmlId
- to set
-
setXmlId
default void setXmlId(long xmlId)
set the external id- Parameters:
xmlId
- to set
-
hasXmlId
default boolean hasXmlId()
check if external id is available or not- Returns:
- true when not null, false otherwise
-
hasExternalId
default boolean hasExternalId()
check if external id is available or not- Returns:
- true when nont null, false otherwise
-
appendExternalId
default void appendExternalId(String appendWith)
append the external id with additional id if non-empty, separated with comma- Parameters:
appendWith
- to append external id with
-
getSplitExternalId
default String[] getSplitExternalId()
Collect external id split by default comma separator- Returns:
- split external ids as array
-
getSplitExternalId
default String[] getSplitExternalId(char separator)
Collect external id split by custom separator- Parameters:
separator
- to split by- Returns:
- split external ids as array
-
appendExternalId
default void appendExternalId(String appendWith, Character separator)
append the external id with additional id if non-empty, separated with provided separator- Parameters:
appendWith
- to append external id withseparator
- to use
-
getIdsAsString
default String getIdsAsString()
Returns string representation contain the three ids, id, XMLid and external id- Returns:
- string representation
-
-