org.dmdf.dmt
Class DMT

java.lang.Object
  extended by org.dmdf.dmt.DMT

public class DMT
extends java.lang.Object

Author:
Steven Wang

DMT is the user's interface to use Domain Model Transportation framework, in the serverside call encode(object); which will return a serializale object. When pass this object to the client side, call decode(object); it will return the your object back to you.

The object get back in the client side will have the graph and attributes as configured in the DMTSchema.

Client side need to use same schame as serverside used to encode the object.

         Externalizable myObjectGraphInDomainModel = ....;
         ObjectOutput out = ...;
         out.writeObject(new DMT("adminUser").encode(myObjectGraphInModel));
  
         ObjectInput in = ....;
         Object adminUserPortionOfModel = new DMT("adminUser").decode(in.readObject());
         
         //Note: the "adminUser" is the schema name defined in your schema file
 

Constructor Summary
DMT()
           
DMT(java.lang.String schemaName)
           
DMT(java.lang.String schemaName, int version)
           
 
Method Summary
 java.lang.Object decode(DMTCart ot)
           
 DMTCart encode(java.io.Serializable obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DMT

public DMT()

DMT

public DMT(java.lang.String schemaName,
           int version)

DMT

public DMT(java.lang.String schemaName)
Method Detail

decode

public java.lang.Object decode(DMTCart ot)
                        throws java.io.IOException,
                               java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

encode

public DMTCart encode(java.io.Serializable obj)
               throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2005 org.dmdt. All Rights Reserved.