org.netbeans.spi.xml.cookies
public class ValidateXMLSupport extends Object implements ValidateXMLCookie
ValidateXMLCookie
implementation support simplifing cookie
providers based on InputSource
s 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); ValidateXMLSupport cookieImpl = new ValidateXMLSupport(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.
Constructor and Description |
---|
ValidateXMLSupport(InputSource inputSource)
Create new ValidateXMLSupport for given data object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
validateXML(CookieObserver l)
Validate XML document entity.
|
public ValidateXMLSupport(InputSource inputSource)
inputSource
- Supported InputSource.public boolean validateXML(CookieObserver l)
ValidateXMLCookie
validateXML
in interface ValidateXMLCookie
l
- Optional listener (null
allowed)
giving judgement details via XMLProcessorDetail
s.protected EntityResolver createEntityResolver()
null
protected InputSource createInputSource() throws IOException
null
IOException
- if I/O error occurs.protected XMLReader createParser(boolean validate)
validate
- true if validation module is requirednull
createEntityResolver()
Built on March 18 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.