Package jmri

Interface SignalAppearanceMap

  • All Known Implementing Classes:
    DefaultSignalAppearanceMap

    public interface SignalAppearanceMap
    Access to signal appearance information.

    Maps to an appearance file in a signal system. This interface does not provide any methods to change the map.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DANGER
      Constant representing the "danger" aspect for a signal
      static int DARK
      Constant representing the "dark" aspect for a signal
      static int HELD
      Constant representing the "held" aspect for a signal
      static int PERMISSIVE
      Constant representing the "permissive" aspect for a signal
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean checkAspect​(java.lang.String aspect)
      Check if an aspect can be displayed.
      java.util.Enumeration<java.lang.String> getAspects()
      Get all available aspect names.
      java.lang.String getImageLink​(java.lang.String aspect, java.lang.String key)
      Get an Image Link associated with a specific aspect and type
      java.util.Vector<java.lang.String> getImageTypes​(java.lang.String aspect)
      Get a list of valid icon sets.
      java.lang.String getProperty​(java.lang.String aspect, java.lang.String key)
      Get a property associated with a specific aspect
      SignalSystem getSignalSystem()
      Get the associated signal system and the common information it contains.
      java.lang.String getSpecificAppearance​(int appearance)
      Return the aspect for a specific appearance.
      java.lang.String[] getValidAspectsForAdvancedAspect​(java.lang.String advancedAspect)
      Get a list of potential aspects that we could set the SignalMast to, given the state of the advanced signal mast.
      java.lang.String summary()
      Provide a multi-line summary of the signal system content, typically for printing.
    • Method Detail

      • checkAspect

        boolean checkAspect​(java.lang.String aspect)
        Check if an aspect can be displayed.
        Parameters:
        aspect - the aspect to check
        Returns:
        true if the aspect can be displayed; false otherwise
      • getAspects

        java.util.Enumeration<java.lang.String> getAspects()
        Get all available aspect names.
        Returns:
        an enumeration of available aspects
      • getSignalSystem

        SignalSystem getSignalSystem()
        Get the associated signal system and the common information it contains.
        Returns:
        the signal system
      • getProperty

        java.lang.String getProperty​(java.lang.String aspect,
                                     java.lang.String key)
        Get a property associated with a specific aspect
        Parameters:
        aspect - the aspect containing the property
        key - the property key
        Returns:
        the property value or null if none is defined for key
      • getImageLink

        java.lang.String getImageLink​(java.lang.String aspect,
                                      java.lang.String key)
        Get an Image Link associated with a specific aspect and type
        Parameters:
        aspect - the aspect
        key - the image link key
        Returns:
        the image link or an empty String if none is defined
      • getImageTypes

        java.util.Vector<java.lang.String> getImageTypes​(java.lang.String aspect)
        Get a list of valid icon sets.
        Parameters:
        aspect - the aspect to get icon sets for
        Returns:
        a list of sets or an empty list if none are defined
      • getSpecificAppearance

        java.lang.String getSpecificAppearance​(int appearance)
        Return the aspect for a specific appearance.
        Parameters:
        appearance - the appearance
        Returns:
        the aspect
      • getValidAspectsForAdvancedAspect

        java.lang.String[] getValidAspectsForAdvancedAspect​(java.lang.String advancedAspect)
        Get a list of potential aspects that we could set the SignalMast to, given the state of the advanced signal mast.
        Parameters:
        advancedAspect - the aspect
        Returns:
        a string array of potential aspects or null if none defined
      • summary

        java.lang.String summary()
        Provide a multi-line summary of the signal system content, typically for printing.

        Not intended for further parsing, i.e. for persistence, as format likely to differ from type to type, and to change often.

        Returns:
        summary string.