|
|||||||||||
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 XSDDiagnostic
s.
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 Document |
document
|
protected Element |
element
|
protected String |
encoding
|
protected JAXPPool |
jaxpPool
|
protected int |
line
|
protected Locator |
locator
|
protected SAXParser |
saxParser
|
protected Stack |
stack
|
protected static Map |
userDataMap
|
protected List |
xsdDiagnostics
|
protected XSDFactory |
xsdFactory
|
protected XSDSchema |
xsdSchema
|
Constructor Summary | |
XSDParser()
Deprecated. since 2.2 |
|
XSDParser(Map options)
|
Method Summary | |
void |
characters(char[] characters,
int start,
int length)
|
void |
comment(char[] characters,
int start,
int length)
|
static Document |
createDocument()
|
void |
endCDATA()
|
void |
endDocument()
|
void |
endDTD()
|
void |
endElement(String uri,
String localName,
String qName)
|
void |
endEntity(String name)
|
void |
error(SAXParseException exception)
|
protected void |
fatalError(IOException exception)
|
protected void |
fatalError(ParserConfigurationException exception)
|
void |
fatalError(SAXException exception)
|
void |
fatalError(SAXParseException exception)
|
Collection |
getDiagnostics()
|
Document |
getDocument()
|
String |
getEncoding()
|
static int |
getEndColumn(Node node)
Returns the column at which the given node ends. |
static int |
getEndLine(Node node)
Returns the line at which the given node ends. |
XSDSchema |
getSchema()
|
static int |
getStartColumn(Node node)
Returns the column at which the given node starts. |
static int |
getStartLine(Node node)
Returns the line at which the given node starts. |
static Map |
getUserData(Node node)
Returns the user data associated with the node. |
void |
parse(InputSource inputSource)
|
void |
parse(InputStream inputStream)
|
void |
parse(String uri)
|
void |
parseString(String input)
|
void |
processingInstruction(String target,
String data)
|
InputSource |
resolveEntity(String publicId,
String systemId)
|
protected void |
saveLocation()
|
void |
setDocumentLocator(Locator locator)
|
void |
setSchema(XSDSchema xsdSchema)
|
void |
startCDATA()
|
void |
startDocument()
|
void |
startDTD(String name,
String publicId,
String systemId)
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
|
void |
startEntity(String name)
|
void |
warning(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 Map userDataMap
protected XSDFactory xsdFactory
protected XSDSchema xsdSchema
protected List xsdDiagnostics
protected SAXParser saxParser
protected JAXPPool jaxpPool
protected Document document
protected Stack stack
protected Element element
protected Locator locator
protected int line
protected int column
protected String encoding
Constructor Detail |
public XSDParser()
public XSDParser(Map options)
Method Detail |
public static Map getUserData(Node node)
node
- the node to query.
public static int getStartLine(Node node)
node
- the node to query.
public static int getStartColumn(Node node)
node
- the node to query.
public static int getEndLine(Node node)
node
- the node to query.
public static int getEndColumn(Node node)
node
- the node to query.
public void parse(String uri)
public void parseString(String input)
public void parse(InputSource inputSource)
public void parse(InputStream inputStream)
public String getEncoding()
public Document getDocument()
public void setSchema(XSDSchema xsdSchema)
public XSDSchema getSchema()
public Collection getDiagnostics()
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
SAXException
public void endElement(String uri, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
SAXException
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
public void startDocument()
startDocument
in interface ContentHandler
public static Document createDocument()
public void endDocument()
endDocument
in interface ContentHandler
public void characters(char[] characters, int start, int length) throws SAXException
characters
in interface ContentHandler
SAXException
public void comment(char[] characters, int start, int length) throws SAXException
comment
in interface LexicalHandler
SAXException
public void startCDATA()
startCDATA
in interface LexicalHandler
public void endCDATA()
endCDATA
in interface LexicalHandler
public void startDTD(String name, String publicId, String systemId)
startDTD
in interface LexicalHandler
public void endDTD()
endDTD
in interface LexicalHandler
public void startEntity(String name)
startEntity
in interface LexicalHandler
public void endEntity(String name)
endEntity
in interface LexicalHandler
public void processingInstruction(String target, String data)
processingInstruction
in interface ContentHandler
protected void fatalError(IOException exception)
protected void fatalError(ParserConfigurationException exception)
public void fatalError(SAXException exception)
public void fatalError(SAXParseException exception)
fatalError
in interface ErrorHandler
public void error(SAXParseException exception)
error
in interface ErrorHandler
public void warning(SAXParseException exception)
warning
in interface ErrorHandler
protected void saveLocation()
public InputSource resolveEntity(String publicId, String systemId) throws SAXException
resolveEntity
in interface EntityResolver
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 |