UML Modeling Layer

com.ibm.xtools.uml.msl.internal.resources.parsers
Class FragmentHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by com.ibm.xtools.uml.msl.internal.resources.parsers.FragmentHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class FragmentHandler
extends DefaultHandler

SAX handler specialized for fast extracting of the fragment data.


Field Summary
protected  String EANNOTATION_SOURCE
          The 'source' attribute of the 'eAnnotations' tag in the serialized file
protected  String EANNOTATIONS_TAG
          The 'eAnnotations' tag in the serialized file
protected  String XMI_TAG_SUFFIX
          The optional 'XMI' tag suffix in the serialized file
 
Constructor Summary
FragmentHandler()
           
 
Method Summary
 void endElement(String uri, String localName, String qName)
           
 String getContainerURI()
           
 List<String> getFragmentURIs()
           
 String getRootId()
           
 void startElement(String uri, String localName, String qName, Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMI_TAG_SUFFIX

protected final String XMI_TAG_SUFFIX
The optional 'XMI' tag suffix in the serialized file

See Also:
Constant Field Values

EANNOTATIONS_TAG

protected final String EANNOTATIONS_TAG
The 'eAnnotations' tag in the serialized file


EANNOTATION_SOURCE

protected final String EANNOTATION_SOURCE
The 'source' attribute of the 'eAnnotations' tag in the serialized file

Constructor Detail

FragmentHandler

public FragmentHandler()
Method Detail

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attributes)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException
See Also:
DefaultHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException
See Also:
DefaultHandler.endElement(java.lang.String, java.lang.String, java.lang.String)

getContainerURI

public String getContainerURI()
Returns:
Container URI in String form. It can be relative. If there is no container it is null.

getFragmentURIs

public List<String> getFragmentURIs()
Returns:
List of fragment URIs in String form. The URIs can be relative. The list can be empty.

getRootId

public String getRootId()
Returns:
XMI ID of the root element of the fragment.

UML Modeling Layer

© Copyright IBM Corp. 2009. All rights reserved.