public class ContentTypeParser
extends java.lang.Object
Constructor and Description |
---|
ContentTypeParser(org.xml.sax.ErrorHandler errorHandler,
boolean laxContentType) |
ContentTypeParser(org.xml.sax.ErrorHandler errorHandler,
boolean laxContentType,
boolean allowRnc,
boolean allowHtml,
boolean allowXhtml,
boolean acceptAllKnownXmlTypes,
boolean allowGenericXml) |
Modifier and Type | Method and Description |
---|---|
TypedInputSource |
buildTypedInputSource(java.lang.String baseUri,
java.lang.String publicId,
java.lang.String contentType) |
boolean |
isAcceptAllKnownXmlTypes()
Returns the acceptAllKnownXmlTypes.
|
boolean |
isAllowGenericXml()
Returns the allowGenericXml.
|
boolean |
isAllowHtml()
Returns the allowHtml.
|
boolean |
isAllowRnc()
Returns the allowRnc.
|
boolean |
isAllowXhtml()
Returns the allowXhtml.
|
boolean |
isLaxContentType()
Returns the laxContentType.
|
boolean |
isOnlyHtmlAllowed() |
protected boolean |
rncContentType(java.lang.String type,
org.xml.sax.InputSource is) |
void |
setAcceptAllKnownXmlTypes(boolean acceptAllKnownXmlTypes)
Sets the acceptAllKnownXmlTypes.
|
void |
setAllowGenericXml(boolean allowGenericXml)
Sets the allowGenericXml.
|
void |
setAllowHtml(boolean allowHtml)
Sets the allowHtml.
|
void |
setAllowRnc(boolean allowRnc)
Sets the allowRnc.
|
void |
setAllowXhtml(boolean allowXhtml)
Sets the allowXhtml.
|
void |
setLaxContentType(boolean laxContentType)
Sets the laxContentType.
|
protected boolean |
xmlContentType(java.lang.String type,
org.xml.sax.InputSource is) |
public ContentTypeParser(org.xml.sax.ErrorHandler errorHandler, boolean laxContentType, boolean allowRnc, boolean allowHtml, boolean allowXhtml, boolean acceptAllKnownXmlTypes, boolean allowGenericXml)
errorHandler
- laxContentType
- allowRnc
- allowHtml
- allowXhtml
- acceptAllKnownXmlTypes
- allowGenericXml
- public ContentTypeParser(org.xml.sax.ErrorHandler errorHandler, boolean laxContentType)
protected boolean xmlContentType(java.lang.String type, org.xml.sax.InputSource is) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected boolean rncContentType(java.lang.String type, org.xml.sax.InputSource is) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public TypedInputSource buildTypedInputSource(java.lang.String baseUri, java.lang.String publicId, java.lang.String contentType) throws org.xml.sax.SAXException, org.xml.sax.SAXParseException
baseUri
- publicId
- contentType
- org.xml.sax.SAXException
org.xml.sax.SAXParseException
public boolean isAcceptAllKnownXmlTypes()
public void setAcceptAllKnownXmlTypes(boolean acceptAllKnownXmlTypes)
acceptAllKnownXmlTypes
- the acceptAllKnownXmlTypes to setpublic boolean isAllowGenericXml()
public void setAllowGenericXml(boolean allowGenericXml)
allowGenericXml
- the allowGenericXml to setpublic boolean isAllowHtml()
public void setAllowHtml(boolean allowHtml)
allowHtml
- the allowHtml to setpublic boolean isAllowRnc()
public void setAllowRnc(boolean allowRnc)
allowRnc
- the allowRnc to setpublic boolean isAllowXhtml()
public void setAllowXhtml(boolean allowXhtml)
allowXhtml
- the allowXhtml to setpublic boolean isLaxContentType()
public void setLaxContentType(boolean laxContentType)
laxContentType
- the laxContentType to setpublic boolean isOnlyHtmlAllowed()