org.progeeks.meta.xml
Class FormatRegistryHandler

java.lang.Object
  extended by org.progeeks.util.xml.AbstractObjectHandler
      extended by org.progeeks.meta.xml.FormatRegistryHandler
All Implemented Interfaces:
ObjectHandler

Deprecated. This class has been superceded by org.progeeks.meta.xml.TypeRegistryHandler.

public class FormatRegistryHandler
extends AbstractObjectHandler

Object handler implementation to deal with converting XML to a FormatRegistry. This handler supports several shortcuts for simplifying the process of specifying property types, etc.

Here is a sample configuration:

       
           
               
               
                   java.lang.Object
                   
                       
                   
               
               
               
                   
                       
                   
                   
                       
                   
               
               
               
                   
                       model.IPAddressNode
                   
                   
                       
                   
               
               
               
                   
                       test.WorkingSetNode
                   
                   
                       
                   
               
           
       
 

Version:
$Revision: 1.11 $
Author:
Paul Wisneskey

Field Summary
static java.lang.String DEFAULT_ENTRY_TAG
          Deprecated. Tag denoting a default format entry in the format registry.
static java.lang.String FORMAT_REGISTRY_TAG
          Deprecated. Tag denoting a format registry.
static java.lang.String MAPPINGS_TAG
          Deprecated. Tag denoting the mappings for a format registry.
static java.lang.String REGISTRY_ENTRY_TAG
          Deprecated. Tag denoting an individual entry in the format registry that maps a particular PropertyType to a particular PropertyFormat.
 
Constructor Summary
FormatRegistryHandler()
          Deprecated.  
 
Method Summary
 boolean canHandle(java.lang.String tag)
          Deprecated. See if we can handle that tag we're being presented with.
 java.lang.Object createObject(java.lang.String tag, org.xml.sax.Attributes atts, ObjectXmlReader reader)
          Deprecated. Creates and returns an object based on the specified parameters.
 java.lang.Object getProperty(java.lang.Object obj, java.lang.String field, ObjectXmlReader reader)
          Deprecated. Returns the current value of the specified property in the specified object.
 java.lang.Class getPropertyClass(java.lang.Object object, java.lang.String field, ObjectXmlReader reader)
          Deprecated. Returns the base type for the specified field for the given object.
 java.util.Collection getPropertyCollection(java.lang.Object obj, java.lang.String field, ObjectXmlReader reader)
          Deprecated. Returns the a collection for the specified field that can be used to accumulate multiple object values.
 void setProperty(java.lang.Object object, java.lang.String field, java.lang.Object value, ObjectXmlReader reader)
          Deprecated. Sets a property on the specified object.
 void setTextProperty(java.lang.Object object, java.lang.String field, java.lang.String value, ObjectXmlReader reader)
          Deprecated. Sets a text property on the specified object.
 
Methods inherited from class org.progeeks.util.xml.AbstractObjectHandler
resolveObject, setConfigurationProperty, setContainedText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_REGISTRY_TAG

public static final java.lang.String FORMAT_REGISTRY_TAG
Deprecated. 
Tag denoting a format registry.

See Also:
Constant Field Values

REGISTRY_ENTRY_TAG

public static final java.lang.String REGISTRY_ENTRY_TAG
Deprecated. 
Tag denoting an individual entry in the format registry that maps a particular PropertyType to a particular PropertyFormat.

See Also:
Constant Field Values

DEFAULT_ENTRY_TAG

public static final java.lang.String DEFAULT_ENTRY_TAG
Deprecated. 
Tag denoting a default format entry in the format registry.

See Also:
Constant Field Values

MAPPINGS_TAG

public static final java.lang.String MAPPINGS_TAG
Deprecated. 
Tag denoting the mappings for a format registry. Includes both the format entries and default entries.

See Also:
Constant Field Values
Constructor Detail

FormatRegistryHandler

public FormatRegistryHandler()
Deprecated. 
Method Detail

canHandle

public boolean canHandle(java.lang.String tag)
Deprecated. 
See if we can handle that tag we're being presented with. This could either be a PropertyRegistry tag or an individual entry tag. We'll deal with either one.

Specified by:
canHandle in interface ObjectHandler
Specified by:
canHandle in class AbstractObjectHandler
See Also:
ObjectHandler.canHandle(java.lang.String)

setProperty

public void setProperty(java.lang.Object object,
                        java.lang.String field,
                        java.lang.Object value,
                        ObjectXmlReader reader)
Deprecated. 
Sets a property on the specified object. The object may either be the format registry or one of the private entry objects. In the latter case, the set is just delegated to the object itself.

Specified by:
setProperty in interface ObjectHandler
Specified by:
setProperty in class AbstractObjectHandler
See Also:
ObjectHandler.setProperty(java.lang.Object, java.lang.String, java.lang.Object, org.progeeks.util.xml.ObjectXmlReader)

setTextProperty

public void setTextProperty(java.lang.Object object,
                            java.lang.String field,
                            java.lang.String value,
                            ObjectXmlReader reader)
Deprecated. 
Sets a text property on the specified object. The object may either be the format registry or one of the private entry objects. In the latter case, the set is just delegated to the object itself.

Specified by:
setTextProperty in interface ObjectHandler
Specified by:
setTextProperty in class AbstractObjectHandler
See Also:
ObjectHandler.setTextProperty(java.lang.Object, java.lang.String, java.lang.String, org.progeeks.util.xml.ObjectXmlReader)

getPropertyClass

public java.lang.Class getPropertyClass(java.lang.Object object,
                                        java.lang.String field,
                                        ObjectXmlReader reader)
Deprecated. 
Returns the base type for the specified field for the given object. The object may either be the format registry or one of the private entry objects. In the latter case, the set is just delegated to the object itself.

Specified by:
getPropertyClass in interface ObjectHandler
Specified by:
getPropertyClass in class AbstractObjectHandler
See Also:
ObjectHandler.getPropertyClass(java.lang.Object, java.lang.String, org.progeeks.util.xml.ObjectXmlReader)

getPropertyCollection

public java.util.Collection getPropertyCollection(java.lang.Object obj,
                                                  java.lang.String field,
                                                  ObjectXmlReader reader)
Deprecated. 
Returns the a collection for the specified field that can be used to accumulate multiple object values. This is used when the XML field declaration specifies the progressive attribute.

Specified by:
getPropertyCollection in interface ObjectHandler
Specified by:
getPropertyCollection in class AbstractObjectHandler

getProperty

public java.lang.Object getProperty(java.lang.Object obj,
                                    java.lang.String field,
                                    ObjectXmlReader reader)
Deprecated. 
Returns the current value of the specified property in the specified object. This is used by the xml.existingValue directive and may eventually replace getPropertyCollection() as well.

Specified by:
getProperty in interface ObjectHandler
Specified by:
getProperty in class AbstractObjectHandler

createObject

public java.lang.Object createObject(java.lang.String tag,
                                     org.xml.sax.Attributes atts,
                                     ObjectXmlReader reader)
Deprecated. 
Creates and returns an object based on the specified parameters. The object returned may either be a FormatRegistry itself or one of our private entry classes that we'll used to build a registry from.

Specified by:
createObject in interface ObjectHandler
Specified by:
createObject in class AbstractObjectHandler
See Also:
ObjectHandler.createObject(java.lang.String, org.xml.sax.Attributes, org.progeeks.util.xml.ObjectXmlReader)


Copyright © 2002-2003 Paul Speed. All Rights Reserved.