Package com.funnelback.filter.api
Interface DocumentType
-
- All Known Implementing Classes:
DocumentType._DocumentType
public interface DocumentType
Holds the information describing the type of the document.The type of the document such as HTML, PDF, XML etc. This does not include the charset.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
DocumentType._DocumentType
-
Field Summary
Fields Modifier and Type Field Description static DocumentType
APPLICATION_JSON_TEXT
Deprecated.static DocumentType
MIME_APPLICATION_JSON_TEXT
Simple json MIME type which should be used when a filter converts a document to json.static DocumentType
MIME_CSV_TEXT
Standard CSV MIME type which should be used when a filter converts a document to CSVstatic DocumentType
MIME_HTML_TEXT
Simple html MIME type which should be used when a filter converts a document to html.static DocumentType
MIME_TEXT_PLAIN
A document type for plain text documents.static DocumentType
MIME_UNKNOWN
A mime type that is unknown.static DocumentType
MIME_XHTML_TEXT
Deprecated.static DocumentType
MIME_XHTML_XML
Simple xhtml MIME type which should be used when a filter converts a document to xhtml.static DocumentType
MIME_XML_TEXT
Simple xml MIME type which should be used when a filter converts a document to xml.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
asContentType()
Gets the document type as a Content-Type header value.boolean
isHTML()
boolean
isJSON()
boolean
isXML()
-
-
-
Field Detail
-
MIME_HTML_TEXT
static final DocumentType MIME_HTML_TEXT
Simple html MIME type which should be used when a filter converts a document to html.
-
MIME_APPLICATION_JSON_TEXT
static final DocumentType MIME_APPLICATION_JSON_TEXT
Simple json MIME type which should be used when a filter converts a document to json.
-
APPLICATION_JSON_TEXT
@Deprecated static final DocumentType APPLICATION_JSON_TEXT
Deprecated.Simple json MIME type which should be used when a filter converts a document to json.
-
MIME_XML_TEXT
static final DocumentType MIME_XML_TEXT
Simple xml MIME type which should be used when a filter converts a document to xml.
-
MIME_CSV_TEXT
static final DocumentType MIME_CSV_TEXT
Standard CSV MIME type which should be used when a filter converts a document to CSV
-
MIME_XHTML_TEXT
@Deprecated static final DocumentType MIME_XHTML_TEXT
Deprecated.Deprecated do not use, use MIME_XHTML instead.
-
MIME_XHTML_XML
static final DocumentType MIME_XHTML_XML
Simple xhtml MIME type which should be used when a filter converts a document to xhtml.
-
MIME_UNKNOWN
static final DocumentType MIME_UNKNOWN
A mime type that is unknown. Filters may be written to detect this and replace the mime type with something better.
-
MIME_TEXT_PLAIN
static final DocumentType MIME_TEXT_PLAIN
A document type for plain text documents.
-
-
Method Detail
-
isHTML
boolean isHTML()
- Returns:
- true if the document type is considered to be HTML, includes xhtml, otherwise false.
-
isXML
boolean isXML()
- Returns:
- true if the document type is considered to be XML, includes xhtml, otherwise false.
-
isJSON
boolean isJSON()
- Returns:
- true if the document type is considered to be JSON, otherwise false.
-
asContentType
String asContentType()
Gets the document type as a Content-Type header value.- Returns:
- the document type as a HTTP compatible Content-Type.
-
-