Home » Castor-1.3-src » org.exolab.castor » xml » [javadoc | source]
org.exolab.castor.xml
public class: XMLContext [javadoc | source]
java.lang.Object
   org.exolab.castor.xml.XMLContext
Bootstrap class for Castor XML that allows you to load information about the domain objects used with Castor XML (marshallers and unmarshallers) by various means.
Constructor:
 public XMLContext() 
Method from org.exolab.castor.xml.XMLContext Summary:
addClass,   addClasses,   addMapping,   addPackage,   addPackages,   createChangeLog2XML,   createMapping,   createMappingTool,   createMarshaller,   createUnmarshaller,   getInternalContext,   getProperty,   setProperty,   setProperty
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.exolab.castor.xml.XMLContext Detail:
 public  void addClass(Class clazz) throws ResolverException 
    Loads the class descriptor for the class instance specified. The use of this method is useful when no mapping is used, as happens when the domain classes has been generated using the XML code generator (in which case instead of a mapping file class descriptor files will be generated).
 public  void addClasses(Class[] clazzes) throws ResolverException 
    Loads the class descriptor for the class instance specified. The use of this method is useful when no mapping is used, as happens when the domain classes hase been generated using the XML code generator (in which case instead of a mapping file class descriptor files will be generated).
 public  void addMapping(Mapping mapping) throws MappingException 
    Instructs Castor to load class descriptors from the mapping given.
 public  void addPackage(String packageName) throws ResolverException 
    Loads class descriptors from the package specified. The use of this method is useful when no mapping is used, as happens when the domain classes hase been generated using the XML code generator (in which case instead of a mapping file class descriptor files will be generated).

    Please note that this functionality will work only if you provide the .castor.cdr file with your generated classes (as generated by the XML code generator).

 public  void addPackages(String[] packageNames) throws ResolverException 
    Loads class descriptors from the packages specified. The use of this method is useful when no mapping is used, as happens when the domain classes hase been generated using the XML code generator (in which case instead of a mapping file class descriptor files will be generated).

    Please note that this functionality will work only if you provide the .castor.cdr files with your generated classes (as generated by the XML code generator).

 public ChangeLog2XML createChangeLog2XML() 
 public Mapping createMapping() 
    Creates an instance of a Castor XML specific Mapping instance.
 public MappingTool createMappingTool() 
    To create a MappingTool instance.
 public Marshaller createMarshaller() 
    Creates a new Marshaller instance to be used for marshalling.
 public Unmarshaller createUnmarshaller() 
    Creates a new Unmarshaller instance to be used for unmarshalling.
 public InternalContext getInternalContext() 
Deprecated!
    To get the InternalContext as used when instantiating other classes. Mind that this method is only used in tests and should NOT be used in production code!
 public Object getProperty(String propertyName) 
    To get the value of a specific property.
 public  void setProperty(String propertyName,
    Object value) 
    To set properties for marshalling and unmarshalling behavior.
 public  void setProperty(String propertyName,
    boolean value) 
    To set properties for marshalling and unmarshalling behavior.