|
Esri Geoportal Server 1.2.9
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.gpt.framework.robots.BotsUtils
public final class BotsUtils
Robots txt utility class/shortcut methods
Constructor Summary | |
---|---|
BotsUtils()
|
Method Summary | |
---|---|
static Pattern |
compileWildcardPattern(String patternWithWildcards)
Compiles wildcard pattern into a regular expression. |
static BotsParser |
parser()
Gets default parser |
static Bots |
readBots(BotsMode mode,
MatchingStrategy matchingStrategy,
WinningStrategy winningStrategy,
String serverUrl)
Reads robots.txt |
static Bots |
readBots(BotsMode mode,
MatchingStrategy matchingStrategy,
WinningStrategy winningStrategy,
URL serverUrl)
Reads robots.txt |
static Bots |
readBots(BotsMode mode,
String serverUrl)
Reads robots.txt |
static Bots |
readBots(BotsMode mode,
URL serverUrl)
Reads robots.txt |
static Access |
requestAccess(Bots bots,
String path)
Request access to the resource. |
static String |
transformUrl(Bots bots,
String url)
Replaces host part in given url if "host" directive found in robots.txt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BotsUtils()
Method Detail |
---|
public static BotsParser parser()
null
)public static Bots readBots(BotsMode mode, MatchingStrategy matchingStrategy, WinningStrategy winningStrategy, String serverUrl)
mode
- robots.txt modematchingStrategy
- matching strategywinningStrategy
- winning strategyserverUrl
- url of the server which is expected to have robots.txt
present
Bots
or null
if unable to
obtain robots.txtpublic static Bots readBots(BotsMode mode, MatchingStrategy matchingStrategy, WinningStrategy winningStrategy, URL serverUrl)
mode
- robots.txt modematchingStrategy
- matching strategywinningStrategy
- winning strategyserverUrl
- url of the server which is expected to have robots.txt
present
Bots
or null
if unable to
obtain robots.txtpublic static Bots readBots(BotsMode mode, String serverUrl)
mode
- robots.txt modeserverUrl
- url of the server which is expected to have robots.txt
present
Bots
or null
if unable to
obtain robots.txtpublic static Bots readBots(BotsMode mode, URL serverUrl)
mode
- robots.txt modeserverUrl
- url of the server which is expected to have robots.txt
present
Bots
or null
if unable to
obtain robots.txtpublic static Access requestAccess(Bots bots, String path)
bots
- robotspath
- relative path to the resource
null
public static String transformUrl(Bots bots, String url)
bots
- robots.txturl
- url to transform
public static Pattern compileWildcardPattern(String patternWithWildcards)
Allowed wildcards:
* - matches any sequence of characters
$ - matches end of sequence
patternWithWildcards
- pattern with wildcards
|
Esri Geoportal Server 1.2.9
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |