Package Torello.HTML

Enum Robots

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

    public enum Robots
    extends java.lang.Enum<Robots>
    Robots - Documentation.

    This class is used to help guarantee that valid string-values are passed to the robots meta-tag attribute.

    The new "voodoo" is conversation that happens in my mind all day long. Writing computer-software eventually forces you to feel like a 'sorcerer' ... eventually. The reality of mind-control in this country is horrifying, and it usually very easy to say everything is Google Corporation's fault. I don't want to defend Google Corporation, but I can make a few points that most everyone who writes web-pages on the internet seems to agree with. One such consistency you will read is how the "robots" HTML <META NAME='robots' CONTENT='...'> element actually works.

    The theory behind the magic spell is that Google has software programs - which are referred to by any number of names including:

    • Bots, or Robots
    • Crawlers, Spiders
    • Trolls, Daemons
    • Indexers
    That visit web-pages, sort-of 'by automatic', and download the content of the page, and keep key-words, salient phrases, or other various and sundry facts about the page in a master database. This 'master database' is used whenever somebody types or enters information into a Google Search Bar. The alleged purpose of the 'Robots' key-word is that is supposedly used to either PREVENT and / or FORCE search-engines from utilizing the information that you have incorporated into a web-page in ways that are amenable to you, the author. The usefulness of these "Meta Tags" is beyond the scope of these Java Documentation Pages, but you may read more about them by searching for any of the key-words or phrases that established as Enumerated Types in this Java Enumerated-Type: 'Robots'
    See Also:
    Features.Meta.insertRobots(Vector, boolean, boolean), Features.Meta.getAllRobots(Vector), Features.Meta.robotsMetaTag



    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      All
      Prevents all search-engine stuff.
      Follow
      Even if the page isn’t indexed, the crawler should follow all the links on a page and pass equity to the linked pages.
      Index
      Tells a search engine to index a page.
      NoArchive
      Search engines should not show a cached link to this page on a SERP.
      NoCache
      Same as 'noarchive', but only used by Internet Explorer and Firefox.
      NoFollow
      Tells a crawler not to follow any links on a page or pass along any link equity.
      NoImageIndex
      Tells a crawler not to index any images on a page.
      NoIndex
      Tells a search engine not to index a page.
      None
      Equivalent to using both the 'noindex' and 'nofollow' tags simultaneously.
      NoODP
      [OBSOLETE]: Prevents search engines from using a page’s DMOZ description as the SERP snippet for this page.
      NoSnippet
      Tells a search engine not to show a snippet of this page (i.e.
      NoYDir
      [OBSOLETE]: Prevents search engines from using a page’s DMOZ description as the SERP snippet for this page.
    • Field Summary

      Fields 
      Modifier and Type Field
      String name
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method
      static Robots getRobot​(String robotParam)
      static Robots getRobotNOMHE​(String robotParam)
      static Robots valueOf​(String name)
      static Robots[] values()
      • 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
    • Enum Constant Detail

      • Index

        public static final Robots Index
        Tells a search engine to index a page. Note that you don’t need to add this meta tag; it’s the default.
      • NoIndex

        public static final Robots NoIndex
        Tells a search engine not to index a page.
      • Follow

        public static final Robots Follow
        Even if the page isn’t indexed, the crawler should follow all the links on a page and pass equity to the linked pages.
      • NoFollow

        public static final Robots NoFollow
        Tells a crawler not to follow any links on a page or pass along any link equity.
      • NoImageIndex

        public static final Robots NoImageIndex
        Tells a crawler not to index any images on a page.
      • None

        public static final Robots None
        Equivalent to using both the 'noindex' and 'nofollow' tags simultaneously.
      • NoArchive

        public static final Robots NoArchive
        Search engines should not show a cached link to this page on a SERP.
      • NoCache

        public static final Robots NoCache
        Same as 'noarchive', but only used by Internet Explorer and Firefox.
      • NoSnippet

        public static final Robots NoSnippet
        Tells a search engine not to show a snippet of this page (i.e. meta 'description') of this page on a SERP.
      • All

        public static final Robots All
        Prevents all search-engine stuff.
      • NoYDir

        public static final Robots NoYDir
        [OBSOLETE]: Prevents search engines from using a page’s DMOZ description as the SERP snippet for this page. However, DMOZ was retired in early 2017, making this tag obsolete.
      • NoODP

        public static final Robots NoODP
        [OBSOLETE]: Prevents search engines from using a page’s DMOZ description as the SERP snippet for this page. However, DMOZ was retired in early 2017, making this tag obsolete.
    • Field Detail

      • name

        public final java.lang.String name
        Code:
        Exact Field Declaration Expression:
        1
        public final String name;
        
    • 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:
        1
        2
        3
        4
        5
        6
        7
        8
        9
         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 is was in the content='...' attribute-field of a robots meta-tag.
        Returns:
        An instance of this enumerated type. The instance will map to the passed-string parameter.
        See Also:
        Features.Meta.insertRobots(Vector, boolean, boolean), Features.Meta.getAllRobots(Vector)
        Code:
        Exact Method Body:
        1
         return lookup.get(robotParam.toLowerCase());