KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > xml > querying > impl > xtas > object > ObjectMarshaller


1 package org.exoplatform.services.xml.querying.impl.xtas.object;
2
3 import org.exoplatform.services.xml.querying.object.ObjectMappingException;
4 import org.exoplatform.services.xml.querying.object.ObjectMarshalException;
5 import org.w3c.dom.Document JavaDoc;
6 import java.util.Collection JavaDoc;
7
8 /**
9  * Abstract Java-Object/ XML marshaller/unmarshaller
10  * Every concrete marshaller must implement this.
11  * @version $Id: ObjectMarshaller.java 566 2005-01-25 12:50:49Z kravchuk $ */

12 public interface ObjectMarshaller
13 {
14
15     /**
16      * Loads mapping for marshalling/unmarshalling.
17      * As it is does not be realised for now constraints for
18      * mapping's format - incoming object is ANY subclass
19      * of Java Object
20      */

21     void loadMapping(Object JavaDoc source) throws ObjectMappingException ;
22
23     /**
24      * Unmarshals XML (as DOM Document) to Collection of Objects using loaded mapping
25      * Note: the loadMapping() must be called first
26      */

27     Collection JavaDoc unmarshal(Document JavaDoc source) throws ObjectMarshalException, ObjectMappingException;
28
29     /**
30      * Marshals Object to XML (as DOM Document) using loaded mapping
31      * Note: the loadMapping() must be called first
32      */

33     Document JavaDoc marshal(Object JavaDoc obj) throws ObjectMarshalException, ObjectMappingException;
34
35 }
36
Popular Tags