public class CheckXMLSupport extends Object implements CheckXMLCookie
CheckXMLCookie implementation support simplifing cookie providers
based on InputSources representing XML documents and entities.
Primary use case in a DataObject subclass (which primary file is XML):
CookieSet cookies = getCookieSet(); InputSource in = DataObjectAdapters.inputSource(this); CheckXMLSupport cookieImpl = new CheckXMLSupport(in); cookies.add(cookieImpl);
Secondary use case: Subclasses can customize the class by customization protected methods. The customized subclass can be used according to primary use case.
| Modifier and Type | Field and Description |
|---|---|
static int |
CHECK_ENTITY_MODE
General parsed entity strategy.
|
static int |
CHECK_PARAMETER_ENTITY_MODE
Parameter parsed entity strategy.
|
static int |
DOCUMENT_MODE
XML document entity strategy.
|
| Constructor and Description |
|---|
CheckXMLSupport(InputSource inputSource)
Create new CheckXMLSupport for given data object using DOCUMENT_MODE strategy.
|
CheckXMLSupport(InputSource inputSource,
int strategy)
Create new CheckXMLSupport for given data object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkXML(CookieObserver l)
Check XML parsed entity for syntax wellformedness.
|
protected EntityResolver |
createEntityResolver()
Parametrizes default parser creatin process.
|
protected InputSource |
createInputSource()
Create InputSource to be checked.
|
protected XMLReader |
createParser(boolean validate)
Create and preconfigure new parser.
|
public static final int CHECK_ENTITY_MODE
public static final int CHECK_PARAMETER_ENTITY_MODE
public static final int DOCUMENT_MODE
public CheckXMLSupport(InputSource inputSource)
inputSource - Supported data object.public CheckXMLSupport(InputSource inputSource, int strategy)
inputSource - Supported data object.strategy - One of *_MODE constants.public boolean checkXML(CookieObserver l)
CheckXMLCookiecheckXML in interface CheckXMLCookiel - optional listener (null allowed)
giving judgement details via XMLProcessorDetails.true if syntax check passesprotected EntityResolver createEntityResolver()
nullprotected InputSource createInputSource() throws IOException
nullIOException - if I/O error occurs.protected XMLReader createParser(boolean validate)
validate - true if validation module is requirednullcreateEntityResolver()Built on May 22 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.