net.sf.uadetector
Enum UserAgentType

java.lang.Object
  extended by java.lang.Enum<UserAgentType>
      extended by net.sf.uadetector.UserAgentType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<UserAgentType>

public enum UserAgentType
extends java.lang.Enum<UserAgentType>

This enum represents the type of an user agent. The assignment to a type is performed within the UAS data.

Author:
André Rouél

Enum Constant Summary
BROWSER
          A web browser, especially on a desktop, notebook or workstation
EMAIL_CLIENT
          An email client, email reader
FEED_READER
          A news aggregator, also termed a feed aggregator, feed reader, news reader, RSS reader or simply aggregator
LIBRARY
          A library is a collection of resources used to develop software.
MEDIAPLAYER
          Media player, also called multimedia player, is a term typically used to describe computer software for playing back multimedia files.
MOBILE_BROWSER
          A mobile browser, also called a microbrowser, minibrowser, or wireless internet browser (WIB), is a web browser designed for use on a mobile device.
OFFLINE_BROWSER
          Offline browser which may download completely or partially a website to a hard drive
OTHER
          A software that doesn't match the other types
ROBOT
          Bots, such as Web crawlers
UNKNOWN
          An unknown user agent type
USERAGENT_ANONYMIZER
          A software to hide the real user agent information
VALIDATOR
          A software or service that validates parts of a website or webservice, such as CSS, HTML, JSON, XML
WAP_BROWSER
          A WAP browser is a web browser for mobile devices such as mobile phones that uses the Wireless Application Protocol (WAP).
 
Method Summary
static UserAgentType evaluateByTypeName(java.lang.String typeName)
          This method try to find by the given type name a matching enum value.
 java.lang.String getName()
          Returns the name of the user agent type.
static UserAgentType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static UserAgentType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
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

BROWSER

public static final UserAgentType BROWSER
A web browser, especially on a desktop, notebook or workstation


EMAIL_CLIENT

public static final UserAgentType EMAIL_CLIENT
An email client, email reader


FEED_READER

public static final UserAgentType FEED_READER
A news aggregator, also termed a feed aggregator, feed reader, news reader, RSS reader or simply aggregator


LIBRARY

public static final UserAgentType LIBRARY
A library is a collection of resources used to develop software.


MEDIAPLAYER

public static final UserAgentType MEDIAPLAYER
Media player, also called multimedia player, is a term typically used to describe computer software for playing back multimedia files.


MOBILE_BROWSER

public static final UserAgentType MOBILE_BROWSER
A mobile browser, also called a microbrowser, minibrowser, or wireless internet browser (WIB), is a web browser designed for use on a mobile device.


OFFLINE_BROWSER

public static final UserAgentType OFFLINE_BROWSER
Offline browser which may download completely or partially a website to a hard drive


OTHER

public static final UserAgentType OTHER
A software that doesn't match the other types


ROBOT

public static final UserAgentType ROBOT
Bots, such as Web crawlers


UNKNOWN

public static final UserAgentType UNKNOWN
An unknown user agent type


USERAGENT_ANONYMIZER

public static final UserAgentType USERAGENT_ANONYMIZER
A software to hide the real user agent information


VALIDATOR

public static final UserAgentType VALIDATOR
A software or service that validates parts of a website or webservice, such as CSS, HTML, JSON, XML


WAP_BROWSER

public static final UserAgentType WAP_BROWSER
A WAP browser is a web browser for mobile devices such as mobile phones that uses the Wireless Application Protocol (WAP). WAP is a technical standard for accessing information over a mobile wireless network.

Method Detail

values

public static UserAgentType[] 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 (UserAgentType c : UserAgentType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static UserAgentType 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

evaluateByTypeName

public static UserAgentType evaluateByTypeName(@Nonnull
                                               java.lang.String typeName)
This method try to find by the given type name a matching enum value. The type name must match against an user agent entry in UAS data file.

Parameters:
typeName - name of an user agent type
Returns:
the matching enum value or UserAgentType#UNKNOWN
Throws:
net.sf.qualitycheck.exception.IllegalNullArgumentException - if the given argument is null

getName

@Nonnull
public java.lang.String getName()
Returns the name of the user agent type.

Returns:
name of the type


Copyright © 2011-2014. All Rights Reserved.