Class RouteManager

    • Method Detail

      • getRouteByName

        public Route getRouteByName​(java.lang.String name)
        Parameters:
        name - The string name of the Route.
        Returns:
        requested Route object or null if none exists
      • newRoute

        public Route newRoute​(java.lang.String name)
        Finds an existing route or creates a new route if needed requires route's name creates a unique id for this route
        Parameters:
        name - The string name of the new Route.
        Returns:
        new route or existing route
      • register

        public void register​(Route route)
        Remember a NamedBean Object created outside the manager.
        Parameters:
        route - The Route to add.
      • deregister

        public void deregister​(Route route)
        Forget a NamedBean Object created outside the manager.
        Parameters:
        route - The Route to delete.
      • getRoutesByNameList

        public java.util.List<RoutegetRoutesByNameList()
        Sort by route name
        Returns:
        list of routes ordered by name
      • getRoutesByIdList

        public java.util.List<RoutegetRoutesByIdList()
        Sort by route number, number can alpha numeric
        Returns:
        list of routes ordered by id numbers
      • isLocationInUse

        public Route isLocationInUse​(Location loc)
        Used to determine if a location is part of any route.
        Parameters:
        loc - The location being checked.
        Returns:
        null if location isn't used, otherwise a route using the location.
      • copyRoute

        public Route copyRoute​(Route route,
                               java.lang.String routeName,
                               boolean invert)
        Copy route, returns a new route named routeName. If invert is true the reverse of the route is returned.
        Parameters:
        route - The route to be copied
        routeName - The name of the new route
        invert - If true, return the inversion of route
        Returns:
        A copy of the route
      • numEntries

        public int numEntries()
        Returns:
        Number of routes
      • load

        public void load​(org.jdom2.Element root)
      • store

        public void store​(org.jdom2.Element root)
      • setDirtyAndFirePropertyChange

        protected void setDirtyAndFirePropertyChange​(java.lang.String p,
                                                     java.lang.Object old,
                                                     java.lang.Object n)