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

java.lang.Object
  extended byorg.eclipse.emf.ecore.xmi.impl.XMLHandler
      extended byorg.eclipse.emf.ecore.xmi.impl.SAXXMLHandler

public class SAXXMLHandler
extends XMLHandler

This class implements the XML deserializer which creates EObjects from XML files.


Nested Class Summary
 
Nested classes inherited from class org.eclipse.emf.ecore.xmi.impl.XMLHandler
XMLHandler.ManyReference, XMLHandler.MyStack, XMLHandler.SingleReference
 
Field Summary
protected  Attributes attribs
           
protected  Locator locator
           
 
Fields inherited from class org.eclipse.emf.ecore.xmi.impl.XMLHandler
anySimpleType, anyType, ARRAY_SIZE, capacity, contextFeature, DEBUG_DEMANDED_PACKAGES, disableNotify, DOCUMENT_ROOT_TYPE, elements, eObjectToExtensionMap, ERROR_TYPE, extendedMetaData, extent, forwardManyReferences, forwardSingleReferences, helper, hrefAttribute, idAttribute, identifiers, isIDREF, isSimpleFeature, mixedTargets, NIL_ATTRIB, NO_NAMESPACE_SCHEMA_LOCATION_ATTRIB, notFeatures, OBJECT_TYPE, objects, oldStyleProxyURIs, packageRegistry, positions, prefixesToFactories, recordUnknownFeature, REFERENCE_THRESHOLD, resolve, resourceSet, resourceURI, sameDocumentProxies, SCHEMA_LOCATION_ATTRIB, text, TYPE_ATTRIB, types, UNKNOWN_FEATURE_TYPE, urisToLocations, xmlMap, xmlResource, xmlSchemaTypePackage
 
Constructor Summary
SAXXMLHandler(XMLResource xmiResource, XMLHelper helper, Map options)
          Constructor.
 
Method Summary
protected  int getColumnNumber()
           
protected  EStructuralFeature getContentFeature(EObject object)
           
protected  int getLineNumber()
           
protected  String getXSIType()
          Returns the xsi type attribute's value.
protected  void handleNamespaceAttribs()
          Handle the XML namespace attributes.
protected  void handleObjectAttribs(EObject obj)
          Process the XML attributes for the newly created object.
protected  boolean isNull()
          Returns true if the xsi:nil attribute is in the list of attributes.
protected  void processObject(EObject object)
          Add object to appropriate stacks.
protected  Object setAttributes(Object attributes)
          Sets the current attributes and returns the old ones.
 void setLocator(Object locator)
          Sets the object that might be used for determining the line and column number.
 
Methods inherited from class org.eclipse.emf.ecore.xmi.impl.XMLHandler
characters, comment, createObject, createObjectByType, createObjectFromFactory, createObjectFromFeatureType, createObjectFromTypeName, createTopObject, endCDATA, endDocument, endElement, endPrefixMapping, error, fatalError, getExtension, getFactoryForPrefix, getFeature, getFeature, getLocation, getPackageForURI, getURIConverter, getXMLEncoding, growArrays, handleCDATA, handleComment, handleFeature, handleForwardReferences, handleForwardReferences, handleMissingPackage, handleMixedText, handleProxy, handleTopLocations, handleUnknownFeature, handleXMLNSAttribute, handleXSINoNamespaceSchemaLocation, handleXSISchemaLocation, isError, isTextFeatureValue, processElement, processTopObject, recordUnknownFeature, reportUnknownFeature, setAttribValue, setExtendedMetaDataOption, setFeatureValue, setFeatureValue, setFeatureValues, setValueFromId, startCDATA, startDocument, startDTD, startElement, startPrefixMapping, validateCreateObjectFromFactory, validateCreateObjectFromFactory, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

locator

protected Locator locator

attribs

protected Attributes attribs
Constructor Detail

SAXXMLHandler

public SAXXMLHandler(XMLResource xmiResource,
                     XMLHelper helper,
                     Map options)
Constructor.

Method Detail

setAttributes

protected Object setAttributes(Object attributes)
Description copied from class: XMLHandler
Sets the current attributes and returns the old ones.

Specified by:
setAttributes in class XMLHandler

setLocator

public void setLocator(Object locator)
Description copied from class: XMLHandler
Sets the object that might be used for determining the line and column number.

Specified by:
setLocator in class XMLHandler

getLineNumber

protected int getLineNumber()
Overrides:
getLineNumber in class XMLHandler

getColumnNumber

protected int getColumnNumber()
Overrides:
getColumnNumber in class XMLHandler

isNull

protected boolean isNull()
Returns true if the xsi:nil attribute is in the list of attributes.

Specified by:
isNull in class XMLHandler

handleNamespaceAttribs

protected void handleNamespaceAttribs()
Handle the XML namespace attributes.

Specified by:
handleNamespaceAttribs in class XMLHandler

getXSIType

protected String getXSIType()
Description copied from class: XMLHandler
Returns the xsi type attribute's value.

Specified by:
getXSIType in class XMLHandler

handleObjectAttribs

protected void handleObjectAttribs(EObject obj)
Process the XML attributes for the newly created object.

Specified by:
handleObjectAttribs in class XMLHandler

processObject

protected void processObject(EObject object)
Description copied from class: XMLHandler
Add object to appropriate stacks.

Overrides:
processObject in class XMLHandler

getContentFeature

protected EStructuralFeature getContentFeature(EObject object)

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