Eclipse Platform
2.0

org.eclipse.update.core.model
Class DefaultFeatureParser

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--org.eclipse.update.core.model.DefaultFeatureParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class DefaultFeatureParser
extends org.xml.sax.helpers.DefaultHandler

Default feature parser. Parses the feature manifest file as defined by the platform. Defers to a model factory to create the actual concrete model objects. The update framework supplies two factory implementations:

Since:
2.0

Constructor Summary
DefaultFeatureParser(FeatureModelFactory factory)
          Constructs a feature parser.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Handle character text
 void endElement(String uri, String localName, String qName)
          Handle end of element tags
 void error(org.xml.sax.SAXParseException ex)
          Handle errors
 void fatalError(org.xml.sax.SAXParseException ex)
          Handle fatal errors
 MultiStatus getStatus()
          Returns all status objects accumulated by the parser.
 FeatureModel parse(InputStream in)
          Parses the specified input steam and constructs a feature model.
 void startElement(String uri, String localName, String qName, org.xml.sax.Attributes attributes)
          Handle start of element tags
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, 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
 

Constructor Detail

DefaultFeatureParser

public DefaultFeatureParser(FeatureModelFactory factory)
Constructs a feature parser.

Parameters:
factory - feature model factory
Since:
2.0
Method Detail

parse

public FeatureModel parse(InputStream in)
                   throws org.xml.sax.SAXException,
                          IOException
Parses the specified input steam and constructs a feature model. The input stream is not closed as part of this operation.

Parameters:
in - input stream
Returns:
feature model
Throws:
org.xml.sax.SAXException
IOException
Since:
2.0

getStatus

public MultiStatus getStatus()
Returns all status objects accumulated by the parser.

Returns:
multi-status containing accumulated status, or null.
Since:
2.0

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Handle start of element tags

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
Since:
2.0
See Also:
DefaultHandler.startElement(String, String, String, Attributes)

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
Handle end of element tags

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
Since:
2.0
See Also:
DefaultHandler.endElement(String, String, String)

characters

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

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Since:
2.0
See Also:
DefaultHandler.characters(char[], int, int)

error

public void error(org.xml.sax.SAXParseException ex)
Handle errors

Specified by:
error in interface org.xml.sax.ErrorHandler
Overrides:
error in class org.xml.sax.helpers.DefaultHandler
Since:
2.0
See Also:
DefaultHandler.error(SAXParseException)

fatalError

public void fatalError(org.xml.sax.SAXParseException ex)
                throws org.xml.sax.SAXException
Handle fatal errors

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Overrides:
fatalError in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException
Since:
2.0
See Also:
DefaultHandler.fatalError(SAXParseException)

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.