Package Torello.HTML

Enum Robots

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Robots>

    public enum Robots
    extends java.lang.Enum<Robots>
    An enumeration of the standard Search Engine index-directives.

    This class is used to help guarantee that valid String's are passed to the 'ROBOTS' Meta-Tag Attribute. Google's Robots are automated Web-Crawlers that visit Web-Pages, and download their content to store salient facts & features about the page in a Master Google-Database. This Master-Database of key-words, phrases and fun is used whenever someone types or enters information into a Google Search Bar.

    The alleged purpose of the 'ROBOTS' Meta-Tag key-word is that it is supposedly used to either PREVENT and / or FORCE search-engines from utilizing the information on your Web-Pages / Web-Sites from being used in their algorithms.

    An analysis of the usefulness of these Meta-Tags is beyond the scope of this Java Documentation Page.
    See Also:
    Features.Meta.insertRobots(Vector, boolean, boolean), Features.Meta.getAllRobots(Vector), Features.Meta.robotsMetaTag


    • Field Summary

      Fields 
      Modifier and Type Field
      String name
    • Method Summary

       
      Convert String to Enum Constant
      Modifier and Type Method
      static Robots valueOf​(String name)
       
      List all Enum Constants
      Modifier and Type Method
      static Robots[] values()
       
      More Methods
      Modifier and Type Method
      static Robots getRobot​(String robotParam)
      static Robots getRobotNOMHE​(String robotParam)
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        🡇     🗕  🗗  🗖
        public static Robots[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Robots c : Robots.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        🡅  🡇     🗕  🗗  🗖
        public static Robots valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getRobot

        🡅  🡇     🗕  🗗  🗖
        public static Robots getRobot​(java.lang.String robotParam)
                               throws MalformedHTMLException
        This will retrieve the robot that maps to this parameter-String. The String should be a valid HMTL Meta-Tag 'robots' attribute-value. The valid values are the ones listed by this enumeration. If an attempt is made to retrieve a copy of an invalid 'robots' attribute-value, then a MalformedHTMLException will be thrown.
        Parameters:
        robotParam - This parameter should be a String retrieved from a vectorized-html page that is was found inside the content='...' attribute-value of a 'robots' meta-tag.
        Returns:
        An instance of this enumerated type. The instance will map to the passed-String parameter.
        Throws:
        MalformedHTMLException - If the passed parameter was not a valid robotParam.
        See Also:
        Features.Meta.insertRobots(Vector, boolean, boolean), Features.Meta.getAllRobots(Vector)
        Code:
        Exact Method Body:
         Robots r = lookup.get(robotParam.toLowerCase());
        
         if (r != null) return r;
        
         else
        
             throw new MalformedHTMLException(
                 "The robot parameter you are asking about does not exist: [" + robotParam + "]. " +
                 "Please review the list of valid parameters to meta-tag robots."
             );
        
      • getRobotNOMHE

        🡅  🡇     🗕  🗗  🗖
        public static Robots getRobotNOMHE​(java.lang.String robotParam)
        This will retrieve the robot that maps to this parameter string. The string should be a valid HMTL Meta-Tag robots attribute value. The valid values are the ones listed by this enumeration.

        NOTE: This method will not throw an "Invalid HTML Exception" if an invalid robots-parameter is passed. Instead 'null' will simply be returned.
        Parameters:
        robotParam - This parameter should be a string retrieved from a vectorized-html page that was in the content='...' attribute-field of a robots meta-tag.
        Returns:
        An instance of this enumerated type. The instance will be retrieved using 'robotParam'.
        See Also:
        Features.Meta.insertRobots(Vector, boolean, boolean), Features.Meta.getAllRobots(Vector)
        Code:
        Exact Method Body:
         return lookup.get(robotParam.toLowerCase());