01: /*
02: * Copyright 1999-2002,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.jasig.portal.serialize;
18:
19: import java.io.IOException;
20: import org.w3c.dom.Element;
21: import org.w3c.dom.Document;
22: import org.w3c.dom.DocumentFragment;
23:
24: /**
25: * Interface for a DOM serializer implementation.
26: *
27: *
28: * @version $Revision: 36559 $ $Date: 2006-04-28 11:38:13 -0700 (Fri, 28 Apr 2006) $
29: * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
30: * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
31: */
32: public interface DOMSerializer {
33:
34: /**
35: * Serialized the DOM element. Throws an exception only if
36: * an I/O exception occured while serializing.
37: *
38: * @param elem The element to serialize
39: * @throws IOException An I/O exception occured while
40: * serializing
41: */
42: public void serialize(Element elem) throws IOException;
43:
44: /**
45: * Serializes the DOM document. Throws an exception only if
46: * an I/O exception occured while serializing.
47: *
48: * @param doc The document to serialize
49: * @throws IOException An I/O exception occured while
50: * serializing
51: */
52: public void serialize(Document doc) throws IOException;
53:
54: /**
55: * Serializes the DOM document fragment. Throws an exception
56: * only if an I/O exception occured while serializing.
57: *
58: * @param frag The document fragment to serialize
59: * @throws IOException An I/O exception occured while
60: * serializing
61: */
62: public void serialize(DocumentFragment frag) throws IOException;
63:
64: }
|