org.cybertory.MSS
Class XMLHandlerSuper

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

public class XMLHandlerSuper
extends XMLHandler

Class for automatic generation of XML handlers for super classes of the custom handlers.


Field Summary
 
Fields inherited from class org.cybertory.MSS.XMLHandler
handledClass
 
Constructor Summary
XMLHandlerSuper(java.lang.Class cls)
           
 
Method Summary
 boolean allowBackwardRef()
          Allow multiple elements for this data type ?
 boolean allowMultiple()
           
 boolean needsTypedef()
          Allow data in the "defs" section, with later backward references ?
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).
 org.jdom.Element schemaTypedef()
          Generate Schema type definition for the class (using JDOM).
 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, typeDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLHandlerSuper

public XMLHandlerSuper(java.lang.Class cls)
                throws XMLUnhandledTypeException
Method Detail

needsTypedef

public boolean needsTypedef()
Description copied from class: XMLHandler
Allow data in the "defs" section, with later backward references ?

Specified by:
needsTypedef in class XMLHandler

allowBackwardRef

public boolean allowBackwardRef()
Description copied from class: XMLHandler
Allow multiple elements for this data type ?

Specified by:
allowBackwardRef in class XMLHandler

allowMultiple

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

schemaTypedef

public org.jdom.Element schemaTypedef()
                               throws XMLUnhandledTypeException
Generate Schema type definition for the class (using JDOM).

Overrides:
schemaTypedef in class XMLHandler
Returns:
a JDOM Element with schema for type definition
Throws:
XMLUnhandledTypeException

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()
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)