Package org.apache.wsil.xml
Class XMLReader
- java.lang.Object
-
- org.apache.wsil.xml.XMLReader
-
- All Implemented Interfaces:
DocumentReader
public class XMLReader extends java.lang.Object implements DocumentReader
This class will use a DOM parser to read and process the contents of a WS-Inspection document.- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description protected ExtensionRegistryextRegistryWSIL extension registry.protected java.io.ReaderreaderReader which is used to obtain contents of a WSIL document.protected WSILDocumentwsilDocumentWSIL document.
-
Constructor Summary
Constructors Constructor Description XMLReader()Create a WSIL document reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractparseAbstract(org.w3c.dom.Element abstractElement, WSILElementWithAbstract wsilElement)Parse abstract element.protected DescriptionparseDescription(org.w3c.dom.Element descriptionElement, Service service)Parse description element.voidparseDocument(WSILDocument wsilDocument, java.io.Reader reader)Create a WSIL document from the contents of a reader.protected ExtensionElementparseExtensionElement(org.w3c.dom.Element element, WSILElement wsilElement)Parse extension element.protected voidparseInspection(org.w3c.dom.Element inspectionElement)Parse inspection element.protected LinkparseLink(org.w3c.dom.Element linkElement, Inspection inspection)Parse link element.protected ServiceparseService(org.w3c.dom.Element serviceElement, Inspection inspection)Parse service element.protected ServiceNameparseServiceName(org.w3c.dom.Element nameElement, Service service)Parse service name element.protected org.w3c.dom.DocumentparseXML(java.io.Reader reader)Parse the XML document.protected voidsaveNS(org.w3c.dom.Element element, Inspection inspection)Save namespace settings.
-
-
-
Field Detail
-
reader
protected java.io.Reader reader
Reader which is used to obtain contents of a WSIL document.
-
wsilDocument
protected WSILDocument wsilDocument
WSIL document.
-
extRegistry
protected ExtensionRegistry extRegistry
WSIL extension registry.
-
-
Method Detail
-
parseAbstract
protected Abstract parseAbstract(org.w3c.dom.Element abstractElement, WSILElementWithAbstract wsilElement) throws WSILException
Parse abstract element.- Parameters:
abstractElement- the DOM element that contains the abstract elementwsilElement- the WSIL element with that contains the abstract element- Throws:
WSILException
-
parseDescription
protected Description parseDescription(org.w3c.dom.Element descriptionElement, Service service) throws WSILException
Parse description element.- Parameters:
descriptionElement- the DOM element that contains the description elementservice- the service element- Throws:
WSILException
-
parseDocument
public void parseDocument(WSILDocument wsilDocument, java.io.Reader reader) throws WSILException
Create a WSIL document from the contents of a reader.- Specified by:
parseDocumentin interfaceDocumentReader- Parameters:
wsilDocument- WS-Inspection document objectreader- the reader from which to obtain the contents of the document- Throws:
WSILException
-
parseExtensionElement
protected ExtensionElement parseExtensionElement(org.w3c.dom.Element element, WSILElement wsilElement) throws WSILException
Parse extension element.- Parameters:
element- the DOM element that contains the extension elementwsilElement- the WSIL element that contains the extension element- Throws:
WSILException
-
parseInspection
protected void parseInspection(org.w3c.dom.Element inspectionElement) throws WSILExceptionParse inspection element.- Parameters:
inspectionElement- the DOM element that contains the inspection element- Throws:
WSILException
-
parseLink
protected Link parseLink(org.w3c.dom.Element linkElement, Inspection inspection) throws WSILException
Parse link element.- Parameters:
linkElement- the DOM element that contains the link elementinspection- the inspection element- Throws:
WSILException
-
parseService
protected Service parseService(org.w3c.dom.Element serviceElement, Inspection inspection) throws WSILException
Parse service element.- Parameters:
linkElement- the DOM element that contains the service elementinspection- the inspection element- Throws:
WSILException
-
parseServiceName
protected ServiceName parseServiceName(org.w3c.dom.Element nameElement, Service service) throws WSILException
Parse service name element.- Parameters:
linkElement- the DOM element that contains the name elementservice- the service element- Throws:
WSILException
-
parseXML
protected org.w3c.dom.Document parseXML(java.io.Reader reader) throws WSILExceptionParse the XML document.- Throws:
WSILException
-
saveNS
protected void saveNS(org.w3c.dom.Element element, Inspection inspection)Save namespace settings.
-
-