org.cybertory.MSS
Class XMLHandlerStd

java.lang.Object
  extended byorg.cybertory.MSS.XMLHandler
      extended byorg.cybertory.MSS.XMLHandlerStd
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
X_AngleBias, X_BorderExtender, X_CircleFeatureShapeFactory, X_FeatureCharacteristics, X_FeaturesIntensitiesImpl, X_FeaturesSpecs, X_FeatureTextureConst, X_FeatureTextureDonut, X_FeatureTextureFunction, X_File, X_FImageLayout, X_FloatTiff, X_GradientFunction, X_GrayscaleTiffs, X_GridFeaturesIntensities, X_GridMaLayout, X_IFunctionFromName, X_IntensitiesFileReader, X_Jpeg, X_MaDimensions, X_NumberOfChannels, X_Packed2ZonesMaLayout, X_PendingRenderedOp, X_PolynomialNoiseFunction, X_PolynomialNoiseTerm, X_Properties, X_Random, X_RawIntensitiesData, X_RawIntensitiesRecord, X_RenderedImage, X_RImageFileLibrary, X_Scan, X_Scanner, X_SpotterTipConst, X_SpotterTipFunction, X_SpotterTipLocationEffects, X_SquareFeatureShapeFactory, X_ZoneCharacteristics, X_ZonesInfoImpl

public abstract class XMLHandlerStd
extends XMLHandler

The base class for most custom handler extensions.


Field Summary
 
Fields inherited from class org.cybertory.MSS.XMLHandler
handledClass
 
Constructor Summary
XMLHandlerStd(java.lang.Class cls)
           
XMLHandlerStd(java.lang.Class cls, boolean allowBackwardRef)
           
 
Method Summary
protected  boolean allowBackwardRef()
          Allow multiple elements for this data type ?
protected  boolean allowMultiple()
          Allow data in the "defs" section, with later backward references ?
protected  boolean needsTypedef()
          Allow multiple elements for this data type ?
protected abstract  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).
protected abstract  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

XMLHandlerStd

public XMLHandlerStd(java.lang.Class cls,
                     boolean allowBackwardRef)

XMLHandlerStd

public XMLHandlerStd(java.lang.Class cls)
Method Detail

schemaTypedef

protected abstract 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
Throws:
XMLUnhandledTypeException

parseElement

protected abstract 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)

allowBackwardRef

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

Specified by:
allowBackwardRef in class XMLHandler

allowMultiple

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

Specified by:
allowMultiple in class XMLHandler

needsTypedef

protected final boolean needsTypedef()
Allow multiple elements for this data type ?

Specified by:
needsTypedef in class XMLHandler