|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
org.eclipse.xsd.util.XSDParser
The SAX Parser for the model.
This handles the conversion of SAX parse exceptions to XSDDiagnostics.
It also computes line column information,
which is stored in a map of each node to its user data.
This class is not intended for reuse outside of the model implementation and is subject to change.
| Field Summary | |
|---|---|
protected int |
column
|
protected org.w3c.dom.Document |
document
|
protected org.w3c.dom.Element |
element
|
protected java.lang.String |
encoding
|
protected JAXPPool |
jaxpPool
|
protected int |
line
|
protected org.xml.sax.Locator |
locator
|
protected javax.xml.parsers.SAXParser |
saxParser
|
protected java.util.Stack |
stack
|
protected static java.util.Map |
userDataMap
|
protected java.util.List |
xsdDiagnostics
|
protected XSDFactory |
xsdFactory
|
protected XSDSchema |
xsdSchema
|
| Constructor Summary | |
|---|---|
XSDParser()
Deprecated. since 2.2 |
|
XSDParser(java.util.Map options)
|
|
| Method Summary | |
|---|---|
void |
characters(char[] characters,
int start,
int length)
|
void |
comment(char[] characters,
int start,
int length)
|
static org.w3c.dom.Document |
createDocument()
|
void |
endCDATA()
|
void |
endDocument()
|
void |
endDTD()
|
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
|
void |
endEntity(java.lang.String name)
|
void |
error(org.xml.sax.SAXParseException exception)
|
protected void |
fatalError(java.io.IOException exception)
|
protected void |
fatalError(javax.xml.parsers.ParserConfigurationException exception)
|
void |
fatalError(org.xml.sax.SAXException exception)
|
void |
fatalError(org.xml.sax.SAXParseException exception)
|
java.util.Collection |
getDiagnostics()
|
org.w3c.dom.Document |
getDocument()
|
java.lang.String |
getEncoding()
|
static int |
getEndColumn(org.w3c.dom.Node node)
Returns the column at which the given node ends. |
static int |
getEndLine(org.w3c.dom.Node node)
Returns the line at which the given node ends. |
XSDSchema |
getSchema()
|
static int |
getStartColumn(org.w3c.dom.Node node)
Returns the column at which the given node starts. |
static int |
getStartLine(org.w3c.dom.Node node)
Returns the line at which the given node starts. |
static java.util.Map |
getUserData(org.w3c.dom.Node node)
Returns the user data associated with the node. |
void |
parse(org.xml.sax.InputSource inputSource)
|
void |
parse(java.io.InputStream inputStream)
|
void |
parse(java.lang.String uri)
|
void |
parseString(java.lang.String input)
|
void |
processingInstruction(java.lang.String target,
java.lang.String data)
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
|
protected void |
saveLocation()
|
void |
setDocumentLocator(org.xml.sax.Locator locator)
|
void |
setSchema(XSDSchema xsdSchema)
|
void |
startCDATA()
|
void |
startDocument()
|
void |
startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
|
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
|
void |
startEntity(java.lang.String name)
|
void |
warning(org.xml.sax.SAXParseException exception)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, ignorableWhitespace, notationDecl, skippedEntity, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.util.Map userDataMap
protected XSDFactory xsdFactory
protected XSDSchema xsdSchema
protected java.util.List xsdDiagnostics
protected javax.xml.parsers.SAXParser saxParser
protected JAXPPool jaxpPool
protected org.w3c.dom.Document document
protected java.util.Stack stack
protected org.w3c.dom.Element element
protected org.xml.sax.Locator locator
protected int line
protected int column
protected java.lang.String encoding
| Constructor Detail |
public XSDParser()
public XSDParser(java.util.Map options)
| Method Detail |
public static java.util.Map getUserData(org.w3c.dom.Node node)
node - the node to query.
public static int getStartLine(org.w3c.dom.Node node)
node - the node to query.
public static int getStartColumn(org.w3c.dom.Node node)
node - the node to query.
public static int getEndLine(org.w3c.dom.Node node)
node - the node to query.
public static int getEndColumn(org.w3c.dom.Node node)
node - the node to query.
public void parse(java.lang.String uri)
public void parseString(java.lang.String input)
public void parse(org.xml.sax.InputSource inputSource)
public void parse(java.io.InputStream inputStream)
public java.lang.String getEncoding()
public org.w3c.dom.Document getDocument()
public void setSchema(XSDSchema xsdSchema)
public XSDSchema getSchema()
public java.util.Collection getDiagnostics()
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXExceptionpublic void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator in interface org.xml.sax.ContentHandlerpublic void startDocument()
startDocument in interface org.xml.sax.ContentHandlerpublic static org.w3c.dom.Document createDocument()
public void endDocument()
endDocument in interface org.xml.sax.ContentHandler
public void characters(char[] characters,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlerorg.xml.sax.SAXException
public void comment(char[] characters,
int start,
int length)
throws org.xml.sax.SAXException
comment in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void startCDATA()
startCDATA in interface org.xml.sax.ext.LexicalHandlerpublic void endCDATA()
endCDATA in interface org.xml.sax.ext.LexicalHandler
public void startDTD(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
startDTD in interface org.xml.sax.ext.LexicalHandlerpublic void endDTD()
endDTD in interface org.xml.sax.ext.LexicalHandlerpublic void startEntity(java.lang.String name)
startEntity in interface org.xml.sax.ext.LexicalHandlerpublic void endEntity(java.lang.String name)
endEntity in interface org.xml.sax.ext.LexicalHandler
public void processingInstruction(java.lang.String target,
java.lang.String data)
processingInstruction in interface org.xml.sax.ContentHandlerprotected void fatalError(java.io.IOException exception)
protected void fatalError(javax.xml.parsers.ParserConfigurationException exception)
public void fatalError(org.xml.sax.SAXException exception)
public void fatalError(org.xml.sax.SAXParseException exception)
fatalError in interface org.xml.sax.ErrorHandlerpublic void error(org.xml.sax.SAXParseException exception)
error in interface org.xml.sax.ErrorHandlerpublic void warning(org.xml.sax.SAXParseException exception)
warning in interface org.xml.sax.ErrorHandlerprotected void saveLocation()
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
resolveEntity in interface org.xml.sax.EntityResolverorg.xml.sax.SAXException
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||