## org.eclipse.emf.ecore.xmi.impl
Class XMLHandler

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          org.eclipse.emf.ecore.xmi.impl.XMLHandler

All Implemented Interfaces:
  XMLDefaultHandler, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler

Direct Known Subclasses:
  SAXXMLHandler, XMIHandler

    public abstract class XMLHandler

extends org.xml.sax.helpers.DefaultHandler
implements XMLDefaultHandler

This class is a generic interface for loading XML files and creating EObjects from them. Its subclasses include the SAXXMLHandler class, which wraps this class in a SAX default handler.

Nested Class Summary
`protected static class` `XMLHandler.ManyReference`
`protected static class` `XMLHandler.MyEObjectStack`
`protected static class` `XMLHandler.MyStack<E>`
`protected static class` `XMLHandler.SingleReference` For unresolved forward references, the line number where the incorrect id appeared in an XML resource is needed, so the Value for the forward reference and the line number where the forward reference occurred must be saved until the end of the XML resource is encountered.

Field Summary
`protected EClass` `anySimpleType`
`protected EClass` `anyType`
`protected static int` `ARRAY_SIZE`
`protected org.xml.sax.Attributes` `attribs`
`protected int` `capacity`
`protected EStructuralFeature` `contextFeature`
`protected static boolean` `DEBUG_DEMANDED_PACKAGES`
`protected boolean` `deferIDREFResolution`
`protected java.util.List<EObject>` `deferredExtent`
`protected boolean` `disableNotify`
`protected static java.lang.String` `DOCUMENT_ROOT_TYPE`
`protected EObject` `documentRoot`
`protected EcoreBuilder` `ecoreBuilder`
`protected XMLHandler.MyStack<java.lang.String>` `elements`
`protected java.util.Map<EObject,AnyType>` `eObjectToExtensionMap`
`protected static java.lang.String` `ERROR_TYPE`
`protected ExtendedMetaData` `extendedMetaData`
`protected InternalEList<EObject>` `extent`
`protected java.util.Map<java.lang.String,URI>` `externalURIToLocations`
`protected java.util.Map<EStructuralFeature,java.lang.Integer>` `featuresToKinds`
`protected java.util.List<XMLHandler.ManyReference>` `forwardManyReferences`
`protected java.util.List<XMLHandler.SingleReference>` `forwardSingleReferences`
`protected XMLHelper` `helper`
`protected java.lang.String` `hrefAttribute`
`protected java.lang.String` `idAttribute`
`protected java.lang.Object[]` `identifiers`
`protected boolean` `isIDREF`
`protected boolean` `isRoot`
`protected boolean` `isSimpleFeature`
`protected org.xml.sax.Locator` `locator`
`protected XMLHandler.MyStack<FeatureMap>` `mixedTargets`
`protected boolean` `needsPushContext`
`protected static java.lang.String` `NIL_ATTRIB`
`protected static java.lang.String` `NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB`
`protected java.util.Set<java.lang.String>` `notFeatures`
`protected static java.lang.String` `OBJECT_TYPE`
`protected XMLHandler.MyEObjectStack` `objects`
`protected boolean` `oldStyleProxyURIs`
`protected EPackage.Registry` `packageRegistry`
`protected int[]` `positions`
`protected java.util.Map<java.lang.String,EFactory>` `prefixesToFactories`
`protected boolean` `processAnyXML`
`protected boolean` `processSchemaLocations`
`protected boolean` `recordAnyTypeNSDecls`
`protected boolean` `recordUnknownFeature`
`protected static int` `REFERENCE_THRESHOLD`
`protected boolean` `resolve`
`protected XMLResource.ResourceEntityHandler` `resourceEntityHandler`
`protected ResourceSet` `resourceSet`
`protected URI` `resourceURI`
`protected java.util.List<InternalEObject>` `sameDocumentProxies`
`protected static java.lang.String` `SCHEMA_LOCATION_ATTRIB`
`protected java.lang.StringBuffer` `text`
`protected static java.lang.String` `TYPE_ATTRIB`
`protected XMLHandler.MyStack<java.lang.Object>` `types`
`protected static java.lang.String` `UNKNOWN_FEATURE_TYPE`
`protected XMLResource.URIHandler` `uriHandler`
`protected java.util.Map<java.lang.String,URI>` `urisToLocations`
`protected boolean` `useConfigurationCache`
`protected boolean` `usedNullNamespacePackage`
`protected boolean` `useNewMethods`
`protected XMLResource.XMLMap` `xmlMap`
`protected XMLResource` `xmlResource`
`protected EPackage` `xmlSchemaTypePackage`

Constructor Summary
`XMLHandler(XMLResource xmlResource, XMLHelper helper, java.util.Map<?,?> options)`

Method Summary
`void` `characters(char[] ch, int start, int length)`
`void` `comment(char[] ch, int start, int length)`
`protected EObject` `createDocumentRoot(java.lang.String prefix, java.lang.String uri, java.lang.String name, EFactory eFactory, boolean top)`
`protected EcoreBuilder` `createEcoreBuilder(java.util.Map<?,?> options, ExtendedMetaData extendedMetaData)`
`protected EObject` `createObject(EFactory eFactory, EClassifier type, boolean documentRoot)`
`protected void` `createObject(EObject peekObject, EStructuralFeature feature)` Create an object based on the given feature and attributes.
`protected EObject` `createObjectByType(java.lang.String prefix, java.lang.String name, boolean top)` Create an object based on the prefix and type name.
`protected EObject` `createObjectFromFactory(EFactory factory, java.lang.String typeName)` Deprecated. since 2.2 Create an object given a content helper, a factory, and a type name, and process the XML attributes.
`protected EObject` `createObjectFromFeatureType(EObject peekObject, EStructuralFeature feature)` Create an object based on the type of the given feature.
`protected EObject` `createObjectFromTypeName(EObject peekObject, java.lang.String typeQName, EStructuralFeature feature)` Create an object from the given qualified type name.
`protected void` `createTopObject(java.lang.String prefix, java.lang.String name)`
`void` `endCDATA()`
`void` `endDocument()` Check if the values of the forward references have been set (they may have been set due to a bi-directional reference being set).
`void` `endDTD()`
`void` `endElement(java.lang.String uri, java.lang.String localName, java.lang.String name)` Pop the appropriate stacks and set features whose values are in the content of XML elements.
`void` `endEntity(java.lang.String name)`
`void` `endPrefixMapping(java.lang.String prefix)`
`void` `error(org.xml.sax.SAXParseException e)`
`void` `error(XMIException e)`
`void` `fatalError(org.xml.sax.SAXParseException e)`
`void` `fatalError(XMIException e)`
`protected int` `getColumnNumber()`
`protected AnyType` `getExtension(EObject peekObject)`
`protected EFactory` `getFactoryForPrefix(java.lang.String prefix)`
`protected EStructuralFeature` `getFeature(EObject object, java.lang.String prefix, java.lang.String name)` Deprecated.
`protected EStructuralFeature` `getFeature(EObject object, java.lang.String prefix, java.lang.String name, boolean isElement)` Get the EStructuralFeature from the metaObject for the given object and feature name.
`protected int` `getLineNumber()`
`protected java.lang.String` `getLocation()`
`protected EPackage` `getPackageForURI(java.lang.String uriString)` Attempt to get the namespace for the given prefix, then return ERegister.getPackage() or null.
`protected URIConverter` `getURIConverter()`
`static java.lang.String` `getXMLEncoding(byte[] bytes)` Searches the array of bytes to determine the XML encoding.
`protected abstract java.lang.String` `getXSIType()` Returns the xsi type attribute's value.
`protected void` `growArrays()`
`protected void` `handleCDATA()`
`protected void` `handleComment(java.lang.String comment)`
`protected void` `handleFeature(java.lang.String prefix, java.lang.String name)` The XML element represents a feature.
`protected void` `handleForwardReferences()`
`protected void` `handleForwardReferences(boolean isEndDocument)` Check if the values of the forward references have been set (they may have been set due to a bidirectional reference being set).
`protected EPackage` `handleMissingPackage(java.lang.String uriString)`
`protected void` `handleMixedText()`
`protected void` `handleNamespaceAttribs()` Deprecated. since 2.2
`protected abstract void` `handleObjectAttribs(EObject obj)` Process the XML attributes for the newly created object.
`protected void` `handleProcessingInstruction(java.lang.String target, java.lang.String data)`
`protected void` `handleProxy(InternalEObject proxy, java.lang.String uriLiteral)`
`protected void` `handleSchemaLocation()`
`protected void` `handleTopLocations(java.lang.String prefix, java.lang.String name)`
`protected void` `handleUnknownFeature(java.lang.String prefix, java.lang.String name, boolean isElement, EObject peekObject, java.lang.String value)`
`protected void` `handleXMLNSAttribute(java.lang.String attrib, java.lang.String value)`
`protected void` `handleXSINoNamespaceSchemaLocation(java.lang.String noNamespaceSchemaLocation)`
`protected void` `handleXSISchemaLocation(java.lang.String schemaLocations)`
`void` `ignorableWhitespace(char[] ch, int start, int length)`
`protected boolean` `isError()` Returns true if there was an error in the last XML element; false otherwise.
`protected boolean` `isNull()` Returns true if the xsi:nil attribute is in the list of attributes.
`protected boolean` `isTextFeatureValue(java.lang.Object type)`
`void` `notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)`
`void` `prepare(XMLResource resource, XMLHelper helper, java.util.Map<?,?> options)`
`protected void` `processElement(java.lang.String name, java.lang.String prefix, java.lang.String localName)`
`void` `processingInstruction(java.lang.String target, java.lang.String data)`
`protected void` `processObject(EObject object)` Add object to appropriate stacks.
`protected void` `processSchemaLocations(java.lang.String prefix, java.lang.String name)`
`protected void` `processTopObject(EObject object)` Add object to extent and call processObject.
`protected void` `recordHeaderInformation()`
`protected EMap<java.lang.String,java.lang.String>` `recordNamespacesSchemaLocations(EObject root)`
`protected void` `recordUnknownFeature(java.lang.String prefix, java.lang.String name, boolean isElement, EObject peekObject, java.lang.String value)`
`protected void` `reportUnknownFeature(java.lang.String prefix, java.lang.String name, boolean isElement, EObject peekObject, java.lang.String value)`
`void` `reset()`
`org.xml.sax.InputSource` `resolveEntity(java.lang.String publicId, java.lang.String systemId)`
`protected java.lang.Object` `setAttributes(java.lang.Object attributes)` Sets the current attributes and returns the old ones.
`protected void` `setAttribValue(EObject object, java.lang.String name, java.lang.String value)` Create a feature with the given name for the given object with the given values.
`void` `setDocumentLocator(org.xml.sax.Locator locator)`
`protected void` `setExtendedMetaDataOption(java.lang.Object extendedMetaDataOption)`
`protected void` `setFeatureValue(EObject object, EStructuralFeature feature, java.lang.Object value)`
`protected void` `setFeatureValue(EObject object, EStructuralFeature feature, java.lang.Object value, int position)` Set the given feature of the given object to the given value.
`protected void` `setFeatureValues(XMLHandler.ManyReference reference)` Set the values for the given multi-valued forward reference.
`protected void` `setLocator(java.lang.Object locator)` Sets the object that might be used for determining the line and column number.
`protected void` `setValueFromId(EObject object, EReference eReference, java.lang.String ids)` Create a ValueLine object and put it in the list of references to resolve at the end of the document.
`void` `skippedEntity(java.lang.String name)`
`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 name)` This method determines whether to make an object or not, then makes an object based on the XML attributes and the metamodel.
`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` `startPrefixMapping(java.lang.String prefix, java.lang.String uri)`
`protected XMIException` `toXMIException(org.xml.sax.SAXParseException e)`
`void` `unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName)`
`protected void` `validateCreateObjectFromFactory(EFactory factory, java.lang.String typeName, EObject newObject)`
`protected EObject` `validateCreateObjectFromFactory(EFactory factory, java.lang.String typeName, EObject newObject, boolean top)`
`protected EObject` `validateCreateObjectFromFactory(EFactory factory, java.lang.String typeName, EObject newObject, EStructuralFeature feature)`
`void` `warning(org.xml.sax.SAXParseException e)`
`void` `warning(XMIException e)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ERROR_TYPE

    protected static final java.lang.String ERROR_TYPE

See Also:
  Constant Field Values

### OBJECT_TYPE

    protected static final java.lang.String OBJECT_TYPE

See Also:
  Constant Field Values

### UNKNOWN_FEATURE_TYPE

    protected static final java.lang.String UNKNOWN_FEATURE_TYPE

See Also:
  Constant Field Values

### DOCUMENT_ROOT_TYPE

    protected static final java.lang.String DOCUMENT_ROOT_TYPE

See Also:
  Constant Field Values

### TYPE_ATTRIB

    protected static final java.lang.String TYPE_ATTRIB

See Also:
  Constant Field Values

### NIL_ATTRIB

    protected static final java.lang.String NIL_ATTRIB

See Also:
  Constant Field Values

### SCHEMA_LOCATION_ATTRIB

    protected static final java.lang.String SCHEMA_LOCATION_ATTRIB

See Also:
  Constant Field Values

### NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB

    protected static final java.lang.String NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB

See Also:
  Constant Field Values

### DEBUG_DEMANDED_PACKAGES

    protected static final boolean DEBUG_DEMANDED_PACKAGES

See Also:
  Constant Field Values

### xmlResource

    protected XMLResource xmlResource

### helper

    protected XMLHelper helper

### elements

    protected XMLHandler.MyStack<java.lang.String> elements

### objects

    protected XMLHandler.MyEObjectStack objects

### types

    protected XMLHandler.MyStack<java.lang.Object> types

### mixedTargets

    protected XMLHandler.MyStack<FeatureMap> mixedTargets

### prefixesToFactories

    protected java.util.Map<java.lang.String,EFactory> prefixesToFactories

### urisToLocations

    protected java.util.Map<java.lang.String,URI> urisToLocations

### externalURIToLocations

    protected java.util.Map<java.lang.String,URI> externalURIToLocations

### processSchemaLocations

    protected boolean processSchemaLocations

### extent

    protected InternalEList<EObject> extent

### deferredExtent

    protected java.util.List<EObject> deferredExtent

### resourceSet

    protected ResourceSet resourceSet

### packageRegistry

    protected EPackage.Registry packageRegistry

### resourceURI

    protected URI resourceURI

### resolve

    protected boolean resolve

### oldStyleProxyURIs

    protected boolean oldStyleProxyURIs

### disableNotify

    protected boolean disableNotify

### text

    protected java.lang.StringBuffer text

### isIDREF

    protected boolean isIDREF

### isSimpleFeature

    protected boolean isSimpleFeature

### sameDocumentProxies

    protected java.util.List<InternalEObject> sameDocumentProxies

### forwardSingleReferences

    protected java.util.List<XMLHandler.SingleReference> forwardSingleReferences

### forwardManyReferences

    protected java.util.List<XMLHandler.ManyReference> forwardManyReferences

### identifiers

    protected java.lang.Object[] identifiers

### positions

    protected int[] positions

### ARRAY_SIZE

    protected static final int ARRAY_SIZE

See Also:
  Constant Field Values

### REFERENCE_THRESHOLD

    protected static final int REFERENCE_THRESHOLD

See Also:
  Constant Field Values

### capacity

    protected int capacity

### notFeatures

    protected java.util.Set<java.lang.String> notFeatures

### idAttribute

    protected java.lang.String idAttribute

### hrefAttribute

    protected java.lang.String hrefAttribute

### xmlMap

    protected XMLResource.XMLMap xmlMap

### extendedMetaData

    protected ExtendedMetaData extendedMetaData

### anyType

    protected EClass anyType

### anySimpleType

    protected EClass anySimpleType

### recordUnknownFeature

    protected boolean recordUnknownFeature

### useNewMethods

    protected boolean useNewMethods

### recordAnyTypeNSDecls

    protected boolean recordAnyTypeNSDecls

### eObjectToExtensionMap

    protected java.util.Map<EObject,AnyType> eObjectToExtensionMap

### contextFeature

    protected EStructuralFeature contextFeature

### xmlSchemaTypePackage

    protected EPackage xmlSchemaTypePackage

### deferIDREFResolution

    protected boolean deferIDREFResolution

### processAnyXML

    protected boolean processAnyXML

### ecoreBuilder

    protected EcoreBuilder ecoreBuilder

### isRoot

    protected boolean isRoot

### locator

    protected org.xml.sax.Locator locator

### attribs

    protected org.xml.sax.Attributes attribs

### featuresToKinds

    protected java.util.Map<EStructuralFeature,java.lang.Integer> featuresToKinds

### useConfigurationCache

    protected boolean useConfigurationCache

### needsPushContext

    protected boolean needsPushContext

### resourceEntityHandler

    protected XMLResource.ResourceEntityHandler resourceEntityHandler

### uriHandler

    protected XMLResource.URIHandler uriHandler

### documentRoot

    protected EObject documentRoot

### usedNullNamespacePackage

    protected boolean usedNullNamespacePackage

Constructor Detail

### XMLHandler

    public XMLHandler(XMLResource xmlResource,
                      XMLHelper helper,
                      java.util.Map<?,?> options)

Method Detail

### setExtendedMetaDataOption

    protected void setExtendedMetaDataOption(java.lang.Object extendedMetaDataOption)

### prepare

    public void prepare(XMLResource resource,
                        XMLHelper helper,
                        java.util.Map<?,?> options)

  Specified by:
    `prepare` in interface `XMLDefaultHandler`

### reset

    public void reset()

  Specified by:
    `reset` in interface `XMLDefaultHandler`

### ignorableWhitespace

    public void ignorableWhitespace(char[] ch,
                                    int start,
                                    int length)
                             throws org.xml.sax.SAXException

  Specified by:
    `ignorableWhitespace` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `ignorableWhitespace` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### skippedEntity

    public void skippedEntity(java.lang.String name)
                       throws org.xml.sax.SAXException

  Specified by:
    `skippedEntity` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `skippedEntity` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### toXMIException

    protected XMIException toXMIException(org.xml.sax.SAXParseException e)

### warning

    public void warning(org.xml.sax.SAXParseException e)
                 throws org.xml.sax.SAXException

  Specified by:
    `warning` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `warning` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### error

    public void error(org.xml.sax.SAXParseException e)
               throws org.xml.sax.SAXException

  Specified by:
    `error` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `error` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### fatalError

    public void fatalError(org.xml.sax.SAXParseException e)
                    throws org.xml.sax.SAXException

  Specified by:
    `fatalError` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `fatalError` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### setDocumentLocator

    public void setDocumentLocator(org.xml.sax.Locator locator)

  Specified by:
    `setDocumentLocator` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `setDocumentLocator` in class `org.xml.sax.helpers.DefaultHandler`

### startElement

    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

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### startEntity

    public void startEntity(java.lang.String name)

  Specified by:
    `startEntity` in interface `org.xml.sax.ext.LexicalHandler`

### endEntity

    public void endEntity(java.lang.String name)

  Specified by:
    `endEntity` in interface `org.xml.sax.ext.LexicalHandler`

### comment

    public void comment(char[] ch,
                        int start,
                        int length)

  Specified by:
    `comment` in interface `org.xml.sax.ext.LexicalHandler`

### startCDATA

    public void startCDATA()

  Specified by:
    `startCDATA` in interface `org.xml.sax.ext.LexicalHandler`

### endCDATA

    public void endCDATA()

  Specified by:
    `endCDATA` in interface `org.xml.sax.ext.LexicalHandler`

### startDTD

    public void startDTD(java.lang.String name,
                         java.lang.String publicId,
                         java.lang.String systemId)

  Specified by:
    `startDTD` in interface `org.xml.sax.ext.LexicalHandler`

### endDTD

    public void endDTD()

  Specified by:
    `endDTD` in interface `org.xml.sax.ext.LexicalHandler`

### unparsedEntityDecl

    public void unparsedEntityDecl(java.lang.String name,
                                   java.lang.String publicId,
                                   java.lang.String systemId,
                                   java.lang.String notationName)
                            throws org.xml.sax.SAXException

  Specified by:
    `unparsedEntityDecl` in interface `org.xml.sax.DTDHandler`
  Overrides:
    `unparsedEntityDecl` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### notationDecl

    public void notationDecl(java.lang.String name,
                             java.lang.String publicId,
                             java.lang.String systemId)
                      throws org.xml.sax.SAXException

  Specified by:
    `notationDecl` in interface `org.xml.sax.DTDHandler`
  Overrides:
    `notationDecl` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### resolveEntity

    public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                                 java.lang.String systemId)
                                          throws org.xml.sax.SAXException

  Specified by:
    `resolveEntity` in interface `org.xml.sax.EntityResolver`
  Overrides:
    `resolveEntity` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### getXSIType

    protected abstract java.lang.String getXSIType()

  Returns the xsi type attribute's value.

### handleObjectAttribs

    protected abstract void handleObjectAttribs(EObject obj)

  Process the XML attributes for the newly created object.

### handleNamespaceAttribs

    @Deprecated
    protected void handleNamespaceAttribs()

  Deprecated. since 2.2

  Process the XML namespace declarations.

### handleSchemaLocation

    protected void handleSchemaLocation()

### isNull

    protected boolean isNull()

  Returns true if the xsi:nil attribute is in the list of attributes.

### setAttributes

    protected java.lang.Object setAttributes(java.lang.Object attributes)

  Sets the current attributes and returns the old ones.

### setLocator

    protected void setLocator(java.lang.Object locator)

  Sets the object that might be used for determining the line and column number.

### recordHeaderInformation

    protected void recordHeaderInformation()

### startDocument

    public void startDocument()

  Specified by:
    `startDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startDocument` in class `org.xml.sax.helpers.DefaultHandler`

### startElement

    public void startElement(java.lang.String uri,
                             java.lang.String localName,
                             java.lang.String name)

  This method determines whether to make an object or not, then makes an object based on the XML attributes and the metamodel.

### processElement

    protected void processElement(java.lang.String name,
                                  java.lang.String prefix,
                                  java.lang.String localName)

### handleForwardReferences

    protected void handleForwardReferences()

### handleForwardReferences

    protected void handleForwardReferences(boolean isEndDocument)

  Check if the values of the forward references have been set (they may have been set due to a bidirectional reference being set). If not, set them. If this is called during end document processing, errors should be diagnosed. If it is called in the middle of a document, we need to clean up the forward reference lists to avoid processing resolved references again later.

### endDocument

    public void endDocument()

  Check if the values of the forward references have been set (they may have been set due to a bi-directional reference being set). If not, set them.

  Specified by:
    `endDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endDocument` in class `org.xml.sax.helpers.DefaultHandler`

### recordNamespacesSchemaLocations

    protected EMap<java.lang.String,java.lang.String> recordNamespacesSchemaLocations(EObject root)

### createObjectByType

    protected EObject createObjectByType(java.lang.String prefix,
                                         java.lang.String name,
                                         boolean top)

  Create an object based on the prefix and type name.

### createDocumentRoot

    protected EObject createDocumentRoot(java.lang.String prefix,
                                         java.lang.String uri,
                                         java.lang.String name,
                                         EFactory eFactory,
                                         boolean top)

### createTopObject

    protected void createTopObject(java.lang.String prefix,
                                   java.lang.String name)

### processTopObject

    protected void processTopObject(EObject object)

  Add object to extent and call processObject.

### endElement

    public void endElement(java.lang.String uri,
                           java.lang.String localName,
                           java.lang.String name)

  Pop the appropriate stacks and set features whose values are in the content of XML elements.

  Specified by:
    `endElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endElement` in class `org.xml.sax.helpers.DefaultHandler`

### isTextFeatureValue

    protected boolean isTextFeatureValue(java.lang.Object type)

### startPrefixMapping

    public void startPrefixMapping(java.lang.String prefix,
                                   java.lang.String uri)

  Specified by:
    `startPrefixMapping` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startPrefixMapping` in class `org.xml.sax.helpers.DefaultHandler`

### endPrefixMapping

    public void endPrefixMapping(java.lang.String prefix)

  Specified by:
    `endPrefixMapping` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `endPrefixMapping` in class `org.xml.sax.helpers.DefaultHandler`

### characters

    public void characters(char[] ch,
                           int start,
                           int length)

  Specified by:
    `characters` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `characters` in class `org.xml.sax.helpers.DefaultHandler`

### processingInstruction

    public void processingInstruction(java.lang.String target,
                                      java.lang.String data)

  Specified by:
    `processingInstruction` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `processingInstruction` in class `org.xml.sax.helpers.DefaultHandler`

### handleXMLNSAttribute

    protected void handleXMLNSAttribute(java.lang.String attrib,
                                        java.lang.String value)

### handleXSISchemaLocation

    protected void handleXSISchemaLocation(java.lang.String schemaLocations)

### handleXSINoNamespaceSchemaLocation

    protected void handleXSINoNamespaceSchemaLocation(java.lang.String noNamespaceSchemaLocation)

### processSchemaLocations

    protected void processSchemaLocations(java.lang.String prefix,
                                          java.lang.String name)

### handleTopLocations

    protected void handleTopLocations(java.lang.String prefix,
                                      java.lang.String name)

### handleFeature

    protected void handleFeature(java.lang.String prefix,
                                 java.lang.String name)

  The XML element represents a feature. There are two cases to handle: 1. The feature has a type that is a datatype. 2. The feature has a type that is a class.

### getLineNumber

    protected int getLineNumber()

### getColumnNumber

    protected int getColumnNumber()

### getLocation

    protected java.lang.String getLocation()

### getExtension

    protected AnyType getExtension(EObject peekObject)

### handleUnknownFeature

    protected void handleUnknownFeature(java.lang.String prefix,
                                        java.lang.String name,
                                        boolean isElement,
                                        EObject peekObject,
                                        java.lang.String value)

### recordUnknownFeature

    protected void recordUnknownFeature(java.lang.String prefix,
                                        java.lang.String name,
                                        boolean isElement,
                                        EObject peekObject,
                                        java.lang.String value)

### reportUnknownFeature

    protected void reportUnknownFeature(java.lang.String prefix,
                                        java.lang.String name,
                                        boolean isElement,
                                        EObject peekObject,
                                        java.lang.String value)

### error

    public void error(XMIException e)

### warning

    public void warning(XMIException e)

### fatalError

    public void fatalError(XMIException e)

### createObject

    protected void createObject(EObject peekObject,
                                EStructuralFeature feature)

  Create an object based on the given feature and attributes.

### createObjectFromTypeName

    protected EObject createObjectFromTypeName(EObject peekObject,
                                               java.lang.String typeQName,
                                               EStructuralFeature feature)

  Create an object from the given qualified type name.

### createObjectFromFeatureType

    protected EObject createObjectFromFeatureType(EObject peekObject,
                                                  EStructuralFeature feature)

  Create an object based on the type of the given feature.

### createObjectFromFactory

    @Deprecated
    protected EObject createObjectFromFactory(EFactory factory,
                                                         java.lang.String typeName)

  Deprecated. since 2.2 Create an object given a content helper, a factory, and a type name, and process the XML attributes.

### createObject

    protected EObject createObject(EFactory eFactory,
                                   EClassifier type,
                                   boolean documentRoot)

### validateCreateObjectFromFactory

    protected EObject validateCreateObjectFromFactory(EFactory factory,
                                                      java.lang.String typeName,
                                                      EObject newObject,
                                                      boolean top)

### validateCreateObjectFromFactory

    protected void validateCreateObjectFromFactory(EFactory factory,
                                                   java.lang.String typeName,
                                                   EObject newObject)

### validateCreateObjectFromFactory

    protected EObject validateCreateObjectFromFactory(EFactory factory,
                                                      java.lang.String typeName,
                                                      EObject newObject,
                                                      EStructuralFeature feature)

### processObject

    protected void processObject(EObject object)

  Add object to appropriate stacks.

### getFactoryForPrefix

    protected EFactory getFactoryForPrefix(java.lang.String prefix)

### getPackageForURI

    protected EPackage getPackageForURI(java.lang.String uriString)

  Attempt to get the namespace for the given prefix, then return ERegister.getPackage() or null.

### handleMissingPackage

    protected EPackage handleMissingPackage(java.lang.String uriString)

### getURIConverter

    protected URIConverter getURIConverter()

### setFeatureValue

    protected void setFeatureValue(EObject object,
                                   EStructuralFeature feature,
                                   java.lang.Object value)

### setFeatureValue

    protected void setFeatureValue(EObject object,
                                   EStructuralFeature feature,
                                   java.lang.Object value,
                                   int position)

  Set the given feature of the given object to the given value.

### setFeatureValues

    protected void setFeatureValues(XMLHandler.ManyReference reference)

  Set the values for the given multi-valued forward reference.

### setAttribValue

    protected void setAttribValue(EObject object,
                                  java.lang.String name,
                                  java.lang.String value)

  Create a feature with the given name for the given object with the given values.

### setValueFromId

    protected void setValueFromId(EObject object,
                                  EReference eReference,
                                  java.lang.String ids)

  Create a ValueLine object and put it in the list of references to resolve at the end of the document.

### handleProxy

    protected void handleProxy(InternalEObject proxy,
                               java.lang.String uriLiteral)

### growArrays

    protected void growArrays()

### isError

    protected boolean isError()

  Returns true if there was an error in the last XML element; false otherwise.

### getFeature

    @Deprecated
    protected EStructuralFeature getFeature(EObject object,
                                                       java.lang.String prefix,
                                                       java.lang.String name)

  Deprecated.

### getFeature

    protected EStructuralFeature getFeature(EObject object,
                                            java.lang.String prefix,
                                            java.lang.String name,
                                            boolean isElement)

  Get the EStructuralFeature from the metaObject for the given object and feature name.

### getXMLEncoding

    public static java.lang.String getXMLEncoding(byte[] bytes)

  Searches the array of bytes to determine the XML encoding.

### handleComment

    protected void handleComment(java.lang.String comment)

### handleMixedText

    protected void handleMixedText()

### handleCDATA

    protected void handleCDATA()

### handleProcessingInstruction

    protected void handleProcessingInstruction(java.lang.String target,
                                               java.lang.String data)

### createEcoreBuilder

    protected EcoreBuilder createEcoreBuilder(java.util.Map<?,?> options,
                                              ExtendedMetaData extendedMetaData)

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.