org.eclipse.emf.ecore.xmi.impl
Class EMOFHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by org.eclipse.emf.ecore.xmi.impl.XMLHandler
          extended by org.eclipse.emf.ecore.xmi.impl.XMIHandler
              extended by org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler
                  extended by org.eclipse.emf.ecore.xmi.impl.EMOFHandler
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

public class EMOFHandler
extends SAXXMIHandler


Nested Class Summary
static interface EMOFHandler.Helper
           
 
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.xmi.impl.XMLHandler
XMLHandler.ManyReference, XMLHandler.MyEObjectStack, XMLHandler.MyStack<E>, XMLHandler.SingleReference
 
Field Summary
protected static java.lang.String ECORE_EXTENSION_TYPE
           
protected  EMOFHandler.Helper emofHelper
           
 
Fields inherited from class org.eclipse.emf.ecore.xmi.impl.XMIHandler
ID_ATTRIB, UUID_ATTRIB, VERSION_ATTRIB, XMI_ELEMENT_NAME, XMI_ELEMENT_TYPE, XMI_EXTENSION, XMI_TYPE_ATTRIB, XMI_UUID
 
Fields inherited from class org.eclipse.emf.ecore.xmi.impl.XMLHandler
anySimpleType, anyType, ARRAY_SIZE, attribs, capacity, contextFeature, DEBUG_DEMANDED_PACKAGES, deferIDREFResolution, deferredExtent, disableNotify, DOCUMENT_ROOT_TYPE, documentRoot, ecoreBuilder, elements, eObjectToExtensionMap, ERROR_TYPE, extendedMetaData, extent, externalURIToLocations, featuresToKinds, forwardManyReferences, forwardSingleReferences, helper, hrefAttribute, idAttribute, identifiers, isIDREF, isNamespaceAware, isRoot, isSimpleFeature, laxWildcardProcessing, locator, mixedTargets, needsPushContext, NIL_ATTRIB, NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB, notFeatures, OBJECT_TYPE, objects, oldStyleProxyURIs, packageRegistry, positions, prefixesToFactories, processAnyXML, processSchemaLocations, recordAnyTypeNSDecls, recordUnknownFeature, REFERENCE_THRESHOLD, resolve, resourceEntityHandler, resourceSet, resourceURI, sameDocumentProxies, SCHEMA_LOCATION_ATTRIB, suppressDocumentRoot, text, TYPE_ATTRIB, types, UNKNOWN_FEATURE_TYPE, uriHandler, urisToLocations, useConfigurationCache, usedNullNamespacePackage, useNewMethods, xmlMap, xmlResource, xmlSchemaTypePackage
 
Constructor Summary
EMOFHandler(XMLResource xmiResource, EMOFHandler.Helper helper, java.util.Map<?,?> options)
           
 
Method Summary
 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.
protected  void handleFeature(java.lang.String prefix, java.lang.String name)
          The XML element represents a feature.
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  void handleProxy(InternalEObject proxy, java.lang.String uriLiteral)
           
protected  void processElement(java.lang.String name, java.lang.String prefix, java.lang.String localName)
           
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.
 
Methods inherited from class org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler
getXSIType, handleObjectAttribs
 
Methods inherited from class org.eclipse.emf.ecore.xmi.impl.XMIHandler
createDocumentRoot, createObject, handleUnknownFeature, isTextFeatureValue, startElement
 
Methods inherited from class org.eclipse.emf.ecore.xmi.impl.XMLHandler
characters, comment, createEcoreBuilder, createObject, createObjectByType, createObjectFromFactory, createObjectFromFeatureType, createObjectFromTypeName, createTopObject, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, error, error, fatalError, fatalError, getColumnNumber, getExtension, getFactoryForPrefix, getFeature, getFeature, getLineNumber, getLocation, getPackageForURI, getURIConverter, getXMLEncoding, growArrays, handleCDATA, handleComment, handleForwardReferences, handleMissingPackage, handleMixedText, handleNamespaceAttribs, handleProcessingInstruction, handleSchemaLocation, handleTopLocations, handleXMLNSAttribute, handleXSINoNamespaceSchemaLocation, handleXSISchemaLocation, ignorableWhitespace, isError, isNull, notationDecl, prepare, processingInstruction, processObject, processSchemaLocations, processTopObject, recordHeaderInformation, recordNamespacesSchemaLocations, recordUnknownFeature, reportUnknownFeature, reset, resolveEntity, setAttributes, setDocumentLocator, setExtendedMetaDataOption, setFeatureValue, setFeatureValue, setFeatureValues, setLocator, setValueFromId, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping, toXMIException, unparsedEntityDecl, validateCreateObjectFromFactory, validateCreateObjectFromFactory, validateCreateObjectFromFactory, warning, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emofHelper

protected EMOFHandler.Helper emofHelper

ECORE_EXTENSION_TYPE

protected static final java.lang.String ECORE_EXTENSION_TYPE
See Also:
Constant Field Values
Constructor Detail

EMOFHandler

public EMOFHandler(XMLResource xmiResource,
                   EMOFHandler.Helper helper,
                   java.util.Map<?,?> options)
Method Detail

handleProxy

protected void handleProxy(InternalEObject proxy,
                           java.lang.String uriLiteral)
Overrides:
handleProxy in class XMLHandler

handleForwardReferences

protected void handleForwardReferences(boolean isEndDocument)
Description copied from class: XMLHandler
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.

Overrides:
handleForwardReferences in class XMLHandler

processElement

protected void processElement(java.lang.String name,
                              java.lang.String prefix,
                              java.lang.String localName)
Overrides:
processElement in class XMIHandler

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String name)
Description copied from class: XMLHandler
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 XMLHandler

setAttribValue

protected void setAttribValue(EObject object,
                              java.lang.String name,
                              java.lang.String value)
Description copied from class: XMLHandler
Create a feature with the given name for the given object with the given values.

Overrides:
setAttribValue in class XMLHandler

handleFeature

protected void handleFeature(java.lang.String prefix,
                             java.lang.String name)
Description copied from class: XMLHandler
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.

Overrides:
handleFeature in class XMLHandler

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