com.abra.j2xb.beans.xmlModel
Class MoXmlBeanDescriptor

java.lang.Object
  extended by com.abra.j2xb.beans.xmlModel.MoXmlBeanDescriptor

public class MoXmlBeanDescriptor
extends java.lang.Object

Since:
JDK1.5
Version:
1.0, May 1, 2008
Author:
Yoav Abrahami

Constructor Summary
MoXmlBeanDescriptor(MoXmlSchema schema, MOBeanDescriptor beanDescriptor)
           
 
Method Summary
 MOBeanDescriptor getBeanDescriptor()
           
 java.lang.Object getPropertyValue(XmlNode xmlNode, MoXmlElement xmlElement)
          this method accepts a propertyPath in terms of the JAVA representations, and returns the value from the representation.
 java.lang.String getQualifiedSubstitutionGroup()
           
 java.lang.String getQualifiedXmlName()
           
 MoXmlSchema getSchema()
           
 java.util.Map<javax.xml.namespace.QName,MoXmlBeanDescriptor> getSubclassXmlBeanDescriptors()
           
 MoXmlBeanDescriptor getSuperclassXmlBeanDescriptor()
           
 MoXmlElement getXmlElementOfProperty(java.lang.String propertyPath)
           
 java.lang.String getXmlName()
           
 MoXmlContainerType getXmlType()
           
 boolean isAbstract()
           
protected  MoXmlElement mapJavaToXmlProperty(MOPropertyDescriptor propertyDescriptor)
           
 void persistInstance(XmlNode elementNode, java.lang.Object sourceInstance)
           
 XmlDocumentContext persistInstance(XmlPersistFactory xmlPersistFactory, java.lang.Object sourceInstance)
           
 void printType(java.io.PrintWriter pw, java.lang.String indent)
           
 java.lang.Object readInstance(XmlDocumentContext document)
           
 java.lang.Object readInstance(XmlNode xmlNode, MOConstructorFacade constructorFacade, java.lang.Object parentInstance)
          reads an instance of a Bean from an XML Node.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MoXmlBeanDescriptor

public MoXmlBeanDescriptor(MoXmlSchema schema,
                           MOBeanDescriptor beanDescriptor)
Method Detail

printType

public void printType(java.io.PrintWriter pw,
                      java.lang.String indent)

getXmlName

public java.lang.String getXmlName()

getQualifiedXmlName

public java.lang.String getQualifiedXmlName()

getQualifiedSubstitutionGroup

public java.lang.String getQualifiedSubstitutionGroup()
Returns:
the qualified substitution group name

getXmlType

public MoXmlContainerType getXmlType()

getBeanDescriptor

public MOBeanDescriptor getBeanDescriptor()

readInstance

public java.lang.Object readInstance(XmlDocumentContext document)
                              throws XmlPersistException
Throws:
XmlPersistException

readInstance

public java.lang.Object readInstance(XmlNode xmlNode,
                                     MOConstructorFacade constructorFacade,
                                     java.lang.Object parentInstance)
                              throws XmlPersistException
reads an instance of a Bean from an XML Node. The constructorFacade determines the method of construction of an instance. The parentInstance is the parent object used for initialization of implied properties in the read object.

Parameters:
xmlNode - - the XML node from which the instance is read
constructorFacade - - the constructor facade specifing the construction method (what constructor, factory and initialization properties).
parentInstance - - the parent object for components. can be null for top level objects.
Returns:
the read instance
Throws:
XmlPersistException

getPropertyValue

public java.lang.Object getPropertyValue(XmlNode xmlNode,
                                         MoXmlElement xmlElement)
                                  throws XmlPersistException
this method accepts a propertyPath in terms of the JAVA representations, and returns the value from the representation.

Parameters:
xmlNode - the XMl representation
xmlElement - - the XML element representing the value to read
Returns:
the property value as it is represented in XML
Throws:
XmlPersistException

getXmlElementOfProperty

public MoXmlElement getXmlElementOfProperty(java.lang.String propertyPath)
                                     throws XmlPersistException
Throws:
XmlPersistException

mapJavaToXmlProperty

protected MoXmlElement mapJavaToXmlProperty(MOPropertyDescriptor propertyDescriptor)
                                     throws XmlPersistException
Throws:
XmlPersistException

persistInstance

public XmlDocumentContext persistInstance(XmlPersistFactory xmlPersistFactory,
                                          java.lang.Object sourceInstance)
                                   throws XmlPersistException
Throws:
XmlPersistException

persistInstance

public void persistInstance(XmlNode elementNode,
                            java.lang.Object sourceInstance)
                     throws XmlPersistException
Throws:
XmlPersistException

getSchema

public MoXmlSchema getSchema()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getSuperclassXmlBeanDescriptor

public MoXmlBeanDescriptor getSuperclassXmlBeanDescriptor()

getSubclassXmlBeanDescriptors

public java.util.Map<javax.xml.namespace.QName,MoXmlBeanDescriptor> getSubclassXmlBeanDescriptors()

isAbstract

public boolean isAbstract()


Copyright © 2008. All Rights Reserved.