ilog.cpl.storage
Class IlpSAXArrayHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by ilog.cpl.storage.IlpAbstractSAXHandler
          extended by ilog.cpl.storage.IlpAbstractChainedSAXHandler
              extended by ilog.cpl.storage.IlpSAXArrayHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class IlpSAXArrayHandler
extends IlpAbstractChainedSAXHandler

Default SAX handler for arrays.

This class is used to retrieve the values of an array in an XML file or stream. It reads the following format:

[value [isNull="true"|"false"] javaClass="Java class name">VVV</value>]* where isNull is false by defaulr and the javaClass is by default the class of the attribute.

VVV can be anything, as long as it can be converted using the type converter IlpDefaultTypeConverter.

Since:
JTGO 3.0

Constructor Summary
IlpSAXArrayHandler()
           
 
Method Summary
 void endElement(String namespaceURI, String localName, String qName)
          Notifies that the end of an element is reached.
 void readValue(IlpAbstractSAXHandler parent, IlpSAXAttributeValueHandler.ResultHandler resultHandler, Class targetClass, IlpTypeConverter typeConverter)
           
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
          Notifies the beginning of an element.
 
Methods inherited from class ilog.cpl.storage.IlpAbstractChainedSAXHandler
getLocator, getLogger, getParent, getXMLReader, setParent
 
Methods inherited from class ilog.cpl.storage.IlpAbstractSAXHandler
characters, checkState, clearContent, clearState, error, fatalError, getContent, getState, ignoreUntil, log, logIgnoreElement, processSAXParseException, removeState, setState, throwSAXParseException, warning
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpSAXArrayHandler

public IlpSAXArrayHandler()
Method Detail

readValue

public void readValue(IlpAbstractSAXHandler parent,
                      IlpSAXAttributeValueHandler.ResultHandler resultHandler,
                      Class targetClass,
                      IlpTypeConverter typeConverter)
Internal method or field: do not use!

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Notifies the beginning of an element. By default, this method checks whether there is a null XML attribute and clears the content of the element. If you redefine this method, make sure you always call this implementation.

Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
                throws SAXException
Notifies that the end of an element is reached. When this method is called for the finalTag element, the getAttributeValue method is called, the resultHandler.setAttributeValue method is called, and the parsing continues with the parent contentHandler. If you redefine this method, make sure you always call this implementation.

Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.