org.onemind.commons.relabean.serialize
Class BeanModelWriter

java.lang.Object
  extended byorg.onemind.commons.relabean.serialize.BeanModelWriter

public class BeanModelWriter
extends java.lang.Object

A BeanModelWriter writes bean models, based on as BeanModelDescriptor, into XML. In addition, it can also write out the meta-model of the bean model.

Version:
$Id: BeanModelWriter.java,v 1.2 2004/08/26 16:29:00 thlee Exp $ $Name: $
Author:
TiongHiang Lee (thlee@onemindsoft.org)

Constructor Summary
BeanModelWriter(RelationalBeanModel model, NameBinding binding)
          {@inheritDoc}
 
Method Summary
 NameBinding getBinding()
          Return the binding
 RelationalBeanModel getModel()
          Get the model
 void setBinding(NameBinding binding)
          Set the binding
 void setModel(RelationalBeanModel model)
          Set the model
 void writeMetaModel(java.io.Writer w, java.lang.Class modelRoot)
          Write the meta model from starting from the root class
 void writeMetaModel(java.io.Writer w, java.util.Collection modelRoots)
          Write multiple meta model from given model root classes
 void writeModel(java.io.Writer writer, java.util.Collection objects)
          Write the model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanModelWriter

public BeanModelWriter(RelationalBeanModel model,
                       NameBinding binding)
{@inheritDoc}

Method Detail

writeMetaModel

public void writeMetaModel(java.io.Writer w,
                           java.lang.Class modelRoot)
                    throws java.io.IOException
Write the meta model from starting from the root class

Parameters:
w - the writer
modelRoot - the model root class
Throws:
java.io.IOException - if there's IO problem

writeMetaModel

public void writeMetaModel(java.io.Writer w,
                           java.util.Collection modelRoots)
                    throws java.io.IOException
Write multiple meta model from given model root classes

Parameters:
w - the writer
modelRoots - the model root classes
Throws:
java.io.IOException - if there's IO problem

writeModel

public void writeModel(java.io.Writer writer,
                       java.util.Collection objects)
                throws java.io.IOException
Write the model

Parameters:
writer - the writer
objects - the objects
Throws:
java.io.IOException - if there's IO problem

getBinding

public NameBinding getBinding()
Return the binding

Returns:
the binding

getModel

public RelationalBeanModel getModel()
Get the model

Returns:
the model

setBinding

public void setBinding(NameBinding binding)
Set the binding

Parameters:
binding - the binding

setModel

public void setModel(RelationalBeanModel model)
Set the model

Parameters:
model - the model


Copyright © 2004-2005 . All Rights Reserved.