public class MIMEDetector extends DocumentProcessor implements com.exalead.util.Checkable, java.io.Serializable
DocumentProcessor.FromDataModel, DocumentProcessor.Transformer<T>
Modifier and Type | Field and Description |
---|---|
java.lang.String |
defaultCharset |
java.lang.String |
defaultValue |
acceptCondition, dataModelClass, dataModelProperty, dataModelState, DEFAULT_DISABLED, disabled, fromDataModel, name
Constructor and Description |
---|
MIMEDetector() |
MIMEDetector(MIMEDetector o)
Copy constructor
|
MIMEDetector(java.lang.String defaultCharset) |
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(DocumentProcessor.Transformer<T> transformer,
T[] t) |
void |
check(boolean deep,
java.lang.String errorContext)
Checks this MIMEDetector.
|
static MIMEDetector |
fromString(java.lang.String s)
String representation of this MIMEDetector.
|
java.lang.String |
getDefaultCharset()
On text or HTML files, the MIME detector tries to detect charset encoding automatically.
If the encoding cannot be detected, this 'defaultCharset' is used. |
java.lang.String |
getDefaultValue()
Default mime to use if not detected.
|
MIMEDetector |
makeCopy()
Creates and returns a deep copy of this MIMEDetector.
|
static MIMEDetector |
readFrom(java.io.InputStream is)
Read this MIMEDetector from an XML fragment.
|
void |
setDefaultCharset(java.lang.String defaultCharset)
On text or HTML files, the MIME detector tries to detect charset encoding automatically.
If the encoding cannot be detected, this 'defaultCharset' is used. |
void |
setDefaultValue(java.lang.String defaultValue)
Default mime to use if not detected.
|
java.lang.String |
toString()
String representation of this MIMEDetector.
|
MIMEDetector |
withAcceptCondition(AcceptCondition acceptCondition) |
MIMEDetector |
withDataModelClass(java.lang.String dataModelClass) |
MIMEDetector |
withDataModelProperty(java.lang.String dataModelProperty) |
MIMEDetector |
withDataModelState(java.lang.String dataModelState) |
MIMEDetector |
withDefaultCharset(java.lang.String defaultCharset) |
MIMEDetector |
withDefaultValue(java.lang.String defaultValue) |
MIMEDetector |
withDisabled(boolean disabled) |
MIMEDetector |
withDisabled(java.lang.Boolean disabled) |
MIMEDetector |
withFromDataModel(DocumentProcessor fromDataModel) |
MIMEDetector |
withName(java.lang.String name) |
void |
writeTo(java.io.OutputStream os)
Write this MIMEDetector as an XML fragment
|
getAcceptCondition, getDataModelClass, getDataModelProperty, getDataModelState, getFromDataModel, getName, isDisabled, setAcceptCondition, setDataModelClass, setDataModelProperty, setDataModelState, setDisabled, setFromDataModel, setName
public java.lang.String defaultValue
public java.lang.String defaultCharset
public MIMEDetector()
public MIMEDetector(java.lang.String defaultCharset)
public MIMEDetector(MIMEDetector o)
public MIMEDetector withAcceptCondition(AcceptCondition acceptCondition)
withAcceptCondition
in class DocumentProcessor
public MIMEDetector withName(java.lang.String name)
withName
in class DocumentProcessor
public MIMEDetector withDataModelState(java.lang.String dataModelState)
withDataModelState
in class DocumentProcessor
public MIMEDetector withFromDataModel(DocumentProcessor fromDataModel)
public MIMEDetector withDataModelClass(java.lang.String dataModelClass)
withDataModelClass
in class DocumentProcessor
public MIMEDetector withDataModelProperty(java.lang.String dataModelProperty)
withDataModelProperty
in class DocumentProcessor
public MIMEDetector withDisabled(boolean disabled)
withDisabled
in class DocumentProcessor
public MIMEDetector withDisabled(java.lang.Boolean disabled)
withDisabled
in class DocumentProcessor
public void setDefaultValue(java.lang.String defaultValue)
public java.lang.String getDefaultValue()
public MIMEDetector withDefaultValue(java.lang.String defaultValue)
public void setDefaultCharset(java.lang.String defaultCharset)
public java.lang.String getDefaultCharset()
public MIMEDetector withDefaultCharset(java.lang.String defaultCharset)
public MIMEDetector makeCopy()
makeCopy
in class DocumentProcessor
public static MIMEDetector readFrom(java.io.InputStream is) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public void writeTo(java.io.OutputStream os) throws javax.xml.bind.JAXBException, java.io.IOException
writeTo
in class DocumentProcessor
javax.xml.bind.JAXBException
java.io.IOException
public static MIMEDetector fromString(java.lang.String s) throws javax.xml.bind.JAXBException, java.io.UnsupportedEncodingException
javax.xml.bind.JAXBException
java.io.UnsupportedEncodingException
public java.lang.String toString()
toString
in class DocumentProcessor
public void check(boolean deep, java.lang.String errorContext) throws com.exalead.util.TypedException
check
in interface com.exalead.util.Checkable
check
in class DocumentProcessor
com.exalead.util.TypedException
public <T> T accept(DocumentProcessor.Transformer<T> transformer, T[] t) throws com.exalead.util.TypedException
accept
in class DocumentProcessor
com.exalead.util.TypedException
Copyright © 2021 Dassault Systèmes, All Rights Reserved.