com.gisgraphy.domain.valueobject
Enum Output.OutputFormat
java.lang.Object
java.lang.Enum<Output.OutputFormat>
com.gisgraphy.domain.valueobject.Output.OutputFormat
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Output.OutputFormat>
- Enclosing class:
- Output
public static enum Output.OutputFormat
- extends java.lang.Enum<Output.OutputFormat>
All the possible fulltext search output format, all the OUTPUFORMAT enum
should be in uppercase
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 |
XML
public static final Output.OutputFormat XML
JSON
public static final Output.OutputFormat JSON
PYTHON
public static final Output.OutputFormat PYTHON
PHP
public static final Output.OutputFormat PHP
ATOM
public static final Output.OutputFormat ATOM
GEORSS
public static final Output.OutputFormat GEORSS
RUBY
public static final Output.OutputFormat RUBY
RSS_VERSION
public static final java.lang.String RSS_VERSION
- See Also:
- Constant Field Values
ATOM_VERSION
public static final java.lang.String ATOM_VERSION
- See Also:
- Constant Field Values
values
public static Output.OutputFormat[] 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 (Output.OutputFormat c : Output.OutputFormat.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static Output.OutputFormat 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
getDefault
public static Output.OutputFormat getDefault()
- Returns:
- The default format
getParameterValue
public abstract java.lang.String getParameterValue()
- Returns:
- The value of the parameter (e.g : the query type for fulltext
query)
getContentType
public abstract java.lang.String getContentType()
- Returns:
- The value of the HTTP contenttype associated to the Output
format
getFromString
public static Output.OutputFormat getFromString(java.lang.String format)
- Parameters:
format
- the format as String
- Returns:
- the outputFormat from the String or the default OutputFormat
if the format can not be determine
- See Also:
getDefault()
getDefaultForServiceIfNotSupported
public static Output.OutputFormat getDefaultForServiceIfNotSupported(Output.OutputFormat format,
GisgraphyServiceType serviceType)
- Parameters:
format
- the format to checkserviceType
- the service type we'd like to know if the format is
applicable
- Returns:
- the format if the format is applicable for the service or the
default one.
- Throws:
UnsupportedFormatException
- if the service is not implemented by the algorithm
isSupported
public abstract boolean isSupported(GisgraphyServiceType serviceType)
- Parameters:
serviceType
- the type of service we'd like to know if the format is supported
- Returns:
- true if the format is supported by the specified
GisgraphyServiceType
listByService
public static Output.OutputFormat[] listByService(GisgraphyServiceType serviceType)
- Parameters:
serviceType
- the service type we'd like to know all the formats
- Returns:
- the formats for the specified service
- Throws:
org.apache.commons.lang.NotImplementedException
- if the service is not implemented by the algorithm
accept
public abstract java.lang.String accept(IoutputFormatVisitor visitor)
- Method to implement the visitor pattern
- Parameters:
visitor
- accept a visitor
- Returns:
- a string return by the visitor
- See Also:
IoutputFormatVisitor
,
GeolocErrorVisitor
Copyright © 2010. All Rights Reserved.