org.eclipse.emf.ecore.xmi.impl
Class XMLLoadImpl
java.lang.Object
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl
- All Implemented Interfaces:
- XMLLoad
- Direct Known Subclasses:
- GenericXMLResourceImpl.GenericXMLLoadImpl, XMILoadImpl
- public class XMLLoadImpl
- extends Object
- implements XMLLoad
This class begins parsing with the given input stream using the XML
deserializer.
Method Summary |
protected String |
getEncoding()
|
void |
load(XMLResource resource,
InputStream inputStream,
Map options)
Start parsing with the default handler; either XMI
or XML. |
void |
load(XMLResource resource,
Node node,
Map options)
|
protected DefaultHandler |
makeDefaultHandler()
|
protected SAXParser |
makeParser()
Make either a validating or non-validating parser;
throw an if one could not be made. |
protected byte[] |
readBuffer()
|
protected void |
traverse(Node node,
XMLLoadImpl.AttributesProxy attributesProxy,
DefaultHandler handler,
LexicalHandler lexicalHandler)
|
protected void |
traverseElement(Element element,
XMLLoadImpl.AttributesProxy attributesProxy,
DefaultHandler handler,
LexicalHandler lexicalHandler)
Special case: traversing root element using namespaces in scope |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAX_LEXICAL_PROPERTY
protected static final String SAX_LEXICAL_PROPERTY
- See Also:
- Constant Field Values
BUFFER_SIZE
protected static final int BUFFER_SIZE
- See Also:
- Constant Field Values
resource
protected XMLResource resource
is
protected InputStream is
helper
protected XMLHelper helper
options
protected Map options
XMLLoadImpl
public XMLLoadImpl(XMLHelper helper)
load
public void load(XMLResource resource,
InputStream inputStream,
Map options)
throws IOException
- Start parsing with the default handler; either XMI
or XML.
- Specified by:
load
in interface XMLLoad
- Throws:
IOException
makeParser
protected SAXParser makeParser()
throws ParserConfigurationException,
SAXException
- Make either a validating or non-validating parser;
throw an if one could not be made.
- Throws:
ParserConfigurationException
SAXException
makeDefaultHandler
protected DefaultHandler makeDefaultHandler()
getEncoding
protected String getEncoding()
throws IOException
- Throws:
IOException
readBuffer
protected byte[] readBuffer()
throws IOException
- Throws:
IOException
load
public void load(XMLResource resource,
Node node,
Map options)
throws IOException
- Specified by:
load
in interface XMLLoad
- Throws:
IOException
traverseElement
protected void traverseElement(Element element,
XMLLoadImpl.AttributesProxy attributesProxy,
DefaultHandler handler,
LexicalHandler lexicalHandler)
throws SAXException
- Special case: traversing root element using namespaces in scope
- Throws:
SAXException
traverse
protected void traverse(Node node,
XMLLoadImpl.AttributesProxy attributesProxy,
DefaultHandler handler,
LexicalHandler lexicalHandler)
throws SAXException
- Throws:
SAXException