|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.xml.AbstractObjectHandler
org.progeeks.meta.xml.MetaObjectHandler
public class MetaObjectHandler
Object handler implementation to deal with converting XML to MetaObjects.
Field Summary | |
---|---|
static java.lang.String |
CONFIG_IMPORT_PACKAGE
|
Constructor Summary | |
---|---|
MetaObjectHandler()
Creates a new meta-object handler that will use a MapMetaKit to create new objects and the context class registry to resolve meta-classes. |
|
MetaObjectHandler(MetaClassRegistry classRegistry,
FormatRegistry formats,
MetaKit metaKit)
Creates a new meta-object handler that will use the specified meta-kit to create new objects and the specified class registry to resolve meta-classes |
|
MetaObjectHandler(MetaKit metaKit)
Creates a new meta-object handler that will use the specified meta-kit to create new objects and the context class registry to resolve meta-classes. |
Method Summary | |
---|---|
void |
addClassPrefix(java.lang.String prefix)
Adds a prefix to the class prefix list. |
boolean |
canHandle(java.lang.String tag)
Returns true if this handler applies to the specified object tag. |
java.lang.Object |
createObject(java.lang.String tag,
org.xml.sax.Attributes atts,
ObjectXmlReader reader)
Creates and returns an object based on the specified parameters. |
java.util.List |
getClassPrefixes()
Returns the current list of class prefixes. |
FormatRegistry |
getFormatRegistry()
Returns the format registry associated with this handler. |
MetaClassRegistry |
getMetaClassRegistry()
Returns the class registry associated with this handler. |
java.lang.Object |
getProperty(java.lang.Object obj,
java.lang.String field,
ObjectXmlReader reader)
Returns the current value of the specified property in the specified object. |
java.lang.Class |
getPropertyClass(java.lang.Object obj,
java.lang.String field,
ObjectXmlReader reader)
Returns the base type for the specified field. |
java.util.Collection |
getPropertyCollection(java.lang.Object obj,
java.lang.String field,
ObjectXmlReader reader)
Returns the a collection for the specified field that can be used to accumulate multiple object values. |
protected boolean |
ignoreAttribute(java.lang.String name,
ObjectXmlReader reader)
Returns true if the specified attribute should be ignored within the context of the specified reader. |
void |
importPackage(java.lang.String p)
Adds a package + '.' to the list of class prefixes. |
void |
importPackages(java.util.List packages)
Adds all packages specified to the list of class prefixes after appending a '.'. |
protected MetaClass |
resolveTagClass(java.lang.String tag)
Attempts to find a meta-class that matches the specified tag. |
void |
setClassPrefixes(java.util.List prefixes)
Sets the class prefix list. |
void |
setConfigurationProperty(java.lang.String property,
java.lang.String value)
Sends a configuration property to the handler implementation. |
void |
setFormatRegistry(FormatRegistry formats)
Sets the format registry associated with this handler. |
void |
setMetaClassRegistry(MetaClassRegistry registry)
Sets the class registry associated with this handler. |
protected void |
setObjectProperties(MetaObject obj,
org.xml.sax.Attributes atts,
ObjectXmlReader reader)
|
void |
setProperty(java.lang.Object obj,
java.lang.String field,
java.lang.Object value,
ObjectXmlReader reader)
Sets a property on the specified object. |
void |
setTextProperty(java.lang.Object obj,
java.lang.String field,
java.lang.String value,
ObjectXmlReader reader)
Sets a text-value property on the specified object. |
Methods inherited from class org.progeeks.util.xml.AbstractObjectHandler |
---|
resolveObject, setContainedText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONFIG_IMPORT_PACKAGE
Constructor Detail |
---|
public MetaObjectHandler()
public MetaObjectHandler(MetaKit metaKit)
public MetaObjectHandler(MetaClassRegistry classRegistry, FormatRegistry formats, MetaKit metaKit)
Method Detail |
---|
public void setMetaClassRegistry(MetaClassRegistry registry)
public MetaClassRegistry getMetaClassRegistry()
public void setFormatRegistry(FormatRegistry formats)
public FormatRegistry getFormatRegistry()
public void addClassPrefix(java.lang.String prefix)
public java.util.List getClassPrefixes()
public void setClassPrefixes(java.util.List prefixes)
public void importPackage(java.lang.String p)
public void importPackages(java.util.List packages)
public void setConfigurationProperty(java.lang.String property, java.lang.String value)
setConfigurationProperty
in interface ObjectHandler
setConfigurationProperty
in class AbstractObjectHandler
protected MetaClass resolveTagClass(java.lang.String tag)
public boolean canHandle(java.lang.String tag)
canHandle
in interface ObjectHandler
canHandle
in class AbstractObjectHandler
public void setProperty(java.lang.Object obj, java.lang.String field, java.lang.Object value, ObjectXmlReader reader)
setProperty
in interface ObjectHandler
setProperty
in class AbstractObjectHandler
public void setTextProperty(java.lang.Object obj, java.lang.String field, java.lang.String value, ObjectXmlReader reader)
setTextProperty
in interface ObjectHandler
setTextProperty
in class AbstractObjectHandler
public java.lang.Class getPropertyClass(java.lang.Object obj, java.lang.String field, ObjectXmlReader reader)
getPropertyClass
in interface ObjectHandler
getPropertyClass
in class AbstractObjectHandler
public java.util.Collection getPropertyCollection(java.lang.Object obj, java.lang.String field, ObjectXmlReader reader)
getPropertyCollection
in interface ObjectHandler
getPropertyCollection
in class AbstractObjectHandler
public java.lang.Object getProperty(java.lang.Object obj, java.lang.String field, ObjectXmlReader reader)
getProperty
in interface ObjectHandler
getProperty
in class AbstractObjectHandler
protected boolean ignoreAttribute(java.lang.String name, ObjectXmlReader reader)
protected void setObjectProperties(MetaObject obj, org.xml.sax.Attributes atts, ObjectXmlReader reader)
public java.lang.Object createObject(java.lang.String tag, org.xml.sax.Attributes atts, ObjectXmlReader reader)
createObject
in interface ObjectHandler
createObject
in class AbstractObjectHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |