Package com.funnelback.filter.api
Interface DocumentType
-
- All Known Implementing Classes:
DocumentType._DocumentType
public interface DocumentTypeHolds 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 classDocumentType._DocumentType
-
Field Summary
Fields Modifier and Type Field Description static DocumentTypeAPPLICATION_JSON_TEXTDeprecated.static DocumentTypeMIME_APPLICATION_JSON_TEXTSimple json MIME type which should be used when a filter converts a document to json.static DocumentTypeMIME_CSV_TEXTStandard CSV MIME type which should be used when a filter converts a document to CSVstatic DocumentTypeMIME_HTML_TEXTSimple html MIME type which should be used when a filter converts a document to html.static DocumentTypeMIME_TEXT_PLAINA document type for plain text documents.static DocumentTypeMIME_UNKNOWNA mime type that is unknown.static DocumentTypeMIME_XHTML_TEXTDeprecated.static DocumentTypeMIME_XHTML_XMLSimple xhtml MIME type which should be used when a filter converts a document to xhtml.static DocumentTypeMIME_XML_TEXTSimple 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 StringasContentType()Gets the document type as a Content-Type header value.booleanisHTML()booleanisJSON()booleanisXML()
-
-
-
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.
-
-