Package Torello.HTML
Enum Robots
- java.lang.Object
-
- java.lang.Enum<Robots>
-
- Torello.HTML.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 validString'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
Hi-Lited Source-Code:- View Here: Torello/HTML/Robots.java
- Open New Browser-Tab: Torello/HTML/Robots.java
File Size: 4,897 Bytes Line Count: 133 '\n' Characters Found
-
-
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)
-
-
-
Enum Constant Detail
-
Index
-
NoIndex
-
Follow
-
NoFollow
-
NoImageIndex
public static final Robots NoImageIndex
Tells a crawler not to index any images on a page.
-
None
-
NoArchive
-
NoCache
-
NoSnippet
-
All
-
NoYDir
-
NoODP
-
-
Field Detail
-
name
public final java.lang.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 namejava.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
. TheString
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 aMalformedHTMLException
will be thrown.- Parameters:
robotParam
- This parameter should be aString
retrieved from a vectorized-html page that is was found inside thecontent='...'
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 thecontent='...'
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());
-
-