org.cybertory.MSS
Class XMLHandlerArray

java.lang.Object
  extended byorg.cybertory.MSS.XMLHandler
      extended byorg.cybertory.MSS.XMLHandlerArray
All Implemented Interfaces:
java.lang.Comparable

public class XMLHandlerArray
extends XMLHandler

This class is to handle arrays of non-atomic types.


Field Summary
 
Fields inherited from class org.cybertory.MSS.XMLHandler
handledClass
 
Constructor Summary
protected XMLHandlerArray(java.lang.Class cls, XMLHandler componentHandler)
          Constructor, should only be called from XMLHandler.getHandler(java.lang.Class) so as to control the propagation of instances of handlers.
 
Method Summary
protected  boolean allowBackwardRef()
          Allow data in the "defs" section, with later backward references ?
protected  boolean allowMultiple()
           
protected  boolean needsTypedef()
          Set up separate global typedef and always refer to it by type name ?
protected  java.lang.Object parseElement(org.jdom.Element elem, XMLAltData altData)
          Given that the element already extracted from it's context, parse the data (whose type should match that of the handler).
 java.lang.String xmlTypeName()
          Return the label to be used in the name of schema type defs.
 
Methods inherited from class org.cybertory.MSS.XMLHandler
alternateElement, compareTo, extractChildren, getAllHandlers, getHandledClasses, getHandler, getHandlersDefs, getXMLChildFilter, getXMLChildFilter, handledClass, handlersReport, parseChildren, parseRequest, parseXMLDocument, schemaDocument, schemaInContext, schemaInContext, schemaInContext, schemaInContext, schemaTypedef, typeDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLHandlerArray

protected XMLHandlerArray(java.lang.Class cls,
                          XMLHandler componentHandler)
                   throws XMLUnhandledTypeException
Constructor, should only be called from XMLHandler.getHandler(java.lang.Class) so as to control the propagation of instances of handlers.

Parameters:
cls - which Class to handle
Method Detail

allowMultiple

protected boolean allowMultiple()
Specified by:
allowMultiple in class XMLHandler

allowBackwardRef

protected boolean allowBackwardRef()
Allow data in the "defs" section, with later backward references ?

Specified by:
allowBackwardRef in class XMLHandler

needsTypedef

protected boolean needsTypedef()
Set up separate global typedef and always refer to it by type name ?

Specified by:
needsTypedef in class XMLHandler

parseElement

protected java.lang.Object parseElement(org.jdom.Element elem,
                                        XMLAltData altData)
                                 throws XMLParseException,
                                        XMLUnhandledTypeException
Given that the element already extracted from it's context, parse the data (whose type should match that of the handler).

Specified by:
parseElement in class XMLHandler
Parameters:
elem - the JDOM element containing the data
altData - the background data context for parsing
Returns:
an object of the appropriate type
Throws:
XMLParseException
XMLUnhandledTypeException

xmlTypeName

public java.lang.String xmlTypeName()
Description copied from class: XMLHandler
Return the label to be used in the name of schema type defs.

Specified by:
xmlTypeName in class XMLHandler
Returns:
schema type label (or null if no data type name is to be used)